Skip to main content

WaaS MPCWalletService

MPCWalletService manages BIP-32-based hierarchically deterministic (HD) collections of on-chain addresses and their associated asset balances. The addresses are backed by the MPCKey resources of MPCKeyService, and information about the assets can be queried using BlockchainService.

Because of the backing by MPC keys, full functionality of these APIs requires the use of the WaaS SDK.

Creating MPCWallets

An MPCWallet has a 1:1 relationship with an MPCKeyService DeviceGroup.

To create an MPCWallet:

  1. Follow steps 1-3 from the MPCKeyService guide to create a Pool and register your device with WaaS.

  2. Create an MPCWallet with the above Pool as parent. Under the hood, this triggers the creation of a DeviceGroup with MPCKeyService.

  3. Poll for and compute the underlying DeviceGroup following steps 4-5 from the MPCKeyService guide.

Generating Addresses

MPCWalletService provides the convenience API GenerateAddress for generating an on-chain address within an MPCWallet. Under the hood, this creates an MPCKey with MPCKeyService, and then derives the public key and on-chain address based on that MPCKey.

Listing Balances

MPCWalletService also tracks confirmed balances of assets on-chain. Call ListBalances and provide the address for which you would like to see the balances. The information about the asset can be retrieved from BlockchainService’s GetAsset API.

Was this helpful?