API reference
createKeyGenMPCGroup
: Generate MPC groups for key generation.Parameters:
req: A
PayloadCreateKeyGenMPCGroupRequest
object containing the configuration for the MPC group.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
ModelMPCGroup
object containing details of the created MPC group, ornil
if the operation fails.
Throws: This method can throw an error if the request fails due to invalid input or other runtime issues.
Example:
createPaillierMPCGroup
: Create Paillier encryption-based MPC groups.Parameters:
req: A
PayloadCreatePaillierMPCGroupRequest
object containing the configuration for the MPC group.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
ModelMPCGroup
object containing details of the created Paillier MPC group, ornil
if the operation fails.
Throws: This method can throw an error if the request fails due to invalid input or other runtime issues.
Example:
paillier
: Performs key generation operations for Paillier cryptosystem.Parameters:
req: A
PayloadPaillierRequest
object containing the details of the operation to be performed.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A boolean value indicating whether the operation was successful (
true
) or not (false
).
Throws: This method can throw an error if the request is invalid, the operation fails, or there are runtime issues.
Example:
createKeyGenMPCGroup
: Performs key generation compatible with Mnemonic phrase.Parameters:
req: A
MnemonicKeyGenRequest
object containing the configuration for the key generation.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
MpcGroup
object containing the details of the generated keys and associated metadata, ornil
if the operation fails.
Throws: This method can throw an error if the request fails due to invalid input, group configuration issues, or other runtime problems.
Example:
mpcKeyGen
: Performs key generation compatible with Mnemonic phrase.Parameters:
req: A
MPCKeyGenRequest
object containing the configuration for the key generation.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
MpcGroup
object containing the details of the generated keys and associated metadata, ornil
if the operation fails.
Throws: This method can throw an error if the request fails due to invalid input, group configuration issues, or other runtime problems.
Example:
listMPCGroups
: Retrieve a paginated list of existing MPC groups.Parameters:
req: A
PayloadPaginationRequest
object containing pagination details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
PayloadListMPCGroupsResponse
object containing the list of MPC groups and pagination metadata, ornil
if the operation fails.
Throws: This method can throw an error if the request parameters are invalid or if there are runtime issues.
Example:
backupData
: Backup critical data securely.Parameters:
req: A
PayloadBackupDataRequest
object containing the data to be backed up.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A boolean value indicating whether the backup operation was successful (
true
) or not (false
).
Throws: This method can throw an error if the request payload is invalid, storage is unavailable, or other runtime issues occur.
Example:
getBackupData
: Retrieve backed-up data for restoration.Parameters:
error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the backed-up data, ornil
if the operation fails.
Throws: This method can throw an error if the backup data is unavailable, corrupted, or if there are runtime issues during the retrieval process.
Example:
buildETHTransaction
: Create Ethereum transactions.Parameters:
req: A
PayloadBuildETHTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Ethereum transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
buildSolTransaction
: Create Solana transactions.Parameters:
req: A
PayloadBuildSolTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Solana transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
buildTronTransaction
: Create Tron transactions.Parameters:
req: A
PayloadBuildTronTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Tron transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
buildTonTransaction
: Create Ton transactions.
Parameters:
req: A
PayloadBuildTonTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Ton transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
buildXrpTransaction
: Create Xrp transactions.
Parameters:
req: A
PayloadBuildXrpTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Xrp transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
buildBtcTransaction
: Create Btc transactions.
Parameters:
req: A
PayloadBuildBtcTransactionRequest
object containing the transaction details.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the raw Btc transaction in serialized form, ornil
if the operation fails.
Throws: This method can throw an error if the input parameters are invalid or if there are issues constructing the transaction.
Example:
listBlockChainTransaction
: Fetch a list of blockchain transactions.Parameters:
req: A
PayloadListBlockchainTransactionsRequest
object containing the parameters for filtering transactions. -pageSize
: The number of transactions per page.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
PayloadListBlockchainTransactionsResponse
object containing the list of transactions and pagination metadata, ornil
if the operation fails.
Throws: This method can throw an error if the request parameters are invalid or if there are runtime issues.
Example:
signing
: Perform signing operations for a given MPC group.Parameters:
req: A
PayloadSigningRequest
object containing the details for the signing operation.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the digital signature, ornil
if the operation fails.
Throws: This method can throw an error if the signing request is invalid, if the group is misconfigured, or if there are runtime issues during the operation.
Example:
profile
: Retrieve the user's profile.Parameters:
error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
ModelUser
object containing the user's profile information, ornil
if the operation fails.
Throws: This method can throw an error if the user's profile is unavailable or if there are runtime issues.
Example:
saveUserSetting
: Save user-specific settings.Parameters:
req: A
PayloadSaveUserSettingRequest
object containing the user settings to save.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A boolean value indicating whether the operation was successful (
true
) or not (false
).
Throws: This method can throw an error if the request payload is invalid or if there are runtime issues.
Example:
getUserSetting
: Retrieve user-specific settings.Parameters:
error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
Data
object containing the serialized user settings, ornil
if the operation fails.
Throws: This method can throw an error if the settings cannot be retrieved or if there are runtime issues.
Example:
prepareAASmartAccount
: Prepare an Account Abstraction smart account.Parameters:
req: A
PayloadPrepareAASmartAccountRequest
object containing the details for the smart account setup.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
PayloadAASmartAccount
object containing the details of the prepared smart account, including the account address and configuration, ornil
if the operation fails.
Throws: This method can throw an error if the request is invalid, the network is unsupported, or there are runtime issues during the setup process.
Example:
prepareAATxUserOp
: Prepare a user operation for Account Abstraction transactions.Parameters:
req: A
PayloadPrepareAATxUserOpRequest
object containing the details of the user operation to prepare.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
PayloadPrepareAATxUserOpResponse
object containing the prepared user operation, including details such as the encoded operation and required fields for signing, ornil
if the operation fails.
Throws: This method can throw an error if the request parameters are invalid or if there are runtime issues during the preparation process.
Example:
sendUserOperation
: Sends a user operation to the blockchain for Account Abstraction (AA) transactions.Parameters:
req: A
PayloadSendUserOperationRequest
object containing the details of the operation to execute.error: An optional pointer to an
Error
object to capture errors, if any.
Returns:
A
String
object containing the transaction hash of the executed operation, ornil
if the operation fails.
Throws: This method can throw an error if the request payload is invalid, the network is unavailable, or the operation fails during execution.
Example:
exportMnemonic
: Retrieve wallet's Mnemonic phrase.Parameters:
keygenGroupId: Master wallet's key generation group ID.
keyIdentities: The key identity of the wallet.
Returns:
A
String
containing your mnemonic, ornil
if the operation fails.
Example:
deleteMPCGroup
: Deletes a Paillier MPC group.Parameters:
groupID: The unique identifier of the group to delete.
Throws: An error if the deletion fails.
Example:
getCurrentPolicy
: Retrieves the current policy as a publisher that emits [Policy] objects.Returns: An [AnyPublisher] emitting [Policy] objects.
Throws: An error if fetching the current policy fails.
Example:
enablePolicy
: Enables the current policy with a specified delay and an option to force the operation.Parameters:
delayHours: The number of hours to delay before enabling the policy.
force: A boolean flag indicating whether to force enable the policy, overriding existing conditions.
Returns: An [AnyPublisher] emitting the updated [Policy] object.
Throws: An error if enabling the policy fails.
Example::
disablePolicy
: isables the current policy and returns a publisher that emits the updated [Policy] object.Returns: An [AnyPublisher] emitting the updated [Policy] object.
Throws: An error if disabling the policy fails.
Example:
addWalletAddress
: Adds a wallet address to the whitelist for a specific network chain with associated labels.Parameters:
address: The wallet address to be added.
networkChain: The identifier for the blockchain network to which the address belongs.
labels: An array of labels to be associated with the wallet address.
Returns: An [AnyPublisher] emitting the newly added [Address] object.
Throws: An error if the wallet address cannot be added.
Example:
removeWalletAddress
: Removes the wallet address associated with the specified identifier.Parameter walletId: The unique identifier of the wallet address to be removed.
Returns: An [AnyPublisher] emitting an optional [String] that indicates the result of the removal operation.
Throws: An error if the wallet address removal fails.
Example:
updateWalletAddress
: Updates an existing wallet address with new labels.Parameters:
walletId: The unique identifier of the wallet address to update.
labels: An array of new labels to associate with the wallet address.
Returns: An [AnyPublisher] emitting the updated [Address] object.
Throws: An error if updating the wallet address fails.
Example:
Last updated