Your verification code is: {code}
Enter this code to complete your registration. It will expire in 15 minutes.
`; export async function requestSignUpEmailCode(email: string, html: string) { return walletService.requestSignUpEmailCode(email, { html }); } ``` # Getting Started Source: https://docs.handcash.io/wallet-api/getting-started Build native wallet infrastructure into your application with email-based user onboarding The **Wallet API** (WaaS) provisions embedded HandCash wallets for your users via `/v1/waas/*`. It is separate from **[HandCash Connect](/v3/connect/authentication)**, which links users who already have HandCash. ## Setup 1. Create an application in the [Developer Dashboard](/developer-dashboard). 2. Save your **App ID** and **App Secret** for server-side calls. 3. Contact [sales@handcash.io](mailto:sales@handcash.io) to enable **wallet creation** for your App ID. 4. Use the API contract: * **OpenAPI:** [cloud.handcash.io/sdk-docs.json](https://cloud.handcash.io/sdk-docs.json) (filter **Wallet API**) * **Explorer:** [cloud.handcash.io/sdk-docs](https://cloud.handcash.io/sdk-docs/) * **Base URL:** `https://cloud.handcash.io` ## Overview | Capability | Endpoints | | - | - | | User onboarding | `POST /v1/waas/account/requestEmailCode`, `POST /v1/waas/account`, `POST /v1/waas/account/accessKey` | | Balances | `GET /v1/waas/wallet/balances` | | Payments | `POST /v1/waas/wallet/pay` | | Transaction history | `GET /v1/waas/wallet/transactions`, `GET /v1/waas/wallet/transaction` | | Deposit info | `GET /v1/waas/wallet/depositInfo` | Account setup uses **`app-id`** and **`app-secret`**. Wallet calls use **[request signing](/wallet-api/request-signing)** with the user’s access private key. ## Next steps * [Create a new wallet](/wallet-api/create-user-account) * [Access an existing wallet](/wallet-api/create-authorization-for-existing-account) * [Request signing](/wallet-api/request-signing) * [Wallet operations](/wallet-api/manage-wallets) * [Wallet API vs Connect](/wallet-api/waas-vs-connect) # Wallet operations Source: https://docs.handcash.io/wallet-api/manage-wallets Get balance, transaction history, and pay from embedded wallets Wallet endpoints live under `/v1/waas/wallet/*`. Every call must be **[signed](/wallet-api/request-signing)** with the user’s access private key, plus `app-id` and `app-secret`. ## Get deposit info ```http theme={null} GET /v1/waas/wallet/depositInfo ``` Signed `GET` with empty body. Response includes paymail, alias, and deposit address fields (see OpenAPI `wallet-depositInfoSchema`). ## Get wallet balance ```http theme={null} GET /v1/waas/wallet/balances ``` Signed `GET`. Returns spendable balances (BSV, MNEE, fiat equivalents per OpenAPI). ## Make a payment ```http theme={null} POST /v1/waas/wallet/pay ``` Signed `POST`. Request body matches Connect-style payments (`instrumentCurrencyCode`, `receivers`, `description`, etc.) — see **Wallet API** → `POST /v1/waas/wallet/pay` in [cloud.handcash.io/sdk-docs](https://cloud.handcash.io/sdk-docs/). ```javascript theme={null} const body = JSON.stringify({ instrumentCurrencyCode: 'BSV', denominationCurrencyCode: 'USD', description: 'Order #1234', receivers: [{ destination: 'merchant_handle', sendAmount: 1.0 }], }); const pathname = '/v1/waas/wallet/pay'; await fetch(`https://cloud.handcash.io${pathname}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'app-id': process.env.HANDCASH_APP_ID, 'app-secret': process.env.HANDCASH_APP_SECRET, ...signWaasRequest({ method: 'POST', pathname, body, accessPrivateKeyHex: process.env.USER_ACCESS_PRIVATE_KEY, }), }, body, }); ``` ## Transaction history ```http theme={null} GET /v1/waas/wallet/transactions GET /v1/waas/wallet/transaction ``` Signed `GET` calls. Query parameters and filters are defined in the OpenAPI spec. ## Self-custody variant If you registered a wallet with `POST /v1/waas/account/selfCustodial`, use `/v1/waas/wallet/selfCustody/*` with the **`wallet-xpub`** header instead of OAuth signing. See the OpenAPI **Wallet API** tag for those paths. # On Ramps Source: https://docs.handcash.io/wallet-api/on-ramps How to Get Money into Your Users Wallets There are several ways for users to deposit money into their new accounts: * **Other BSV Wallets** using `account.getDepositInfo()` * Paymail * Base58 Address * **Credit Card** * **Other Cryptocurrencies** While Paymail and address deposits are straightforward, this guide will cover how to add a widget for Credit Card and Cryptocurrency deposits. Both methods will use the `base58Address` provided in a user's deposit info, and the widget will conveniently pass it into the services to create a seamless user experience. A full example can be found [here](https://github.com/HandCash/external-wallet-demo/blob/master/src/components/wallet/TopUpDialog.tsx).Your BSV receiving address
Your BSV receiving address