ensure wallet api is defined