Custodial Wallet Kit
Wallet Manager
Wallet Manager Service is a component of the KrypCore Web3 SDK that provides a set of methods and functionalities for managing wallets and interacting with blockchain networks. It allows developers to perform various wallet-related operations such as creating wallets, retrieving wallet details, signing transactions, getting wallet balances, and more.
With the Wallet Manager Service, developers can easily integrate wallet management capabilities into their decentralized applications (DApps) and streamline the interaction between users and the blockchain network.
Now, let's dive into the documentation for each method provided by the Wallet Manager Service in the KrypCore Web3 SDK:
Table of Contents
Create Wallet
Create and Execute Transaction
Get All Wallets
Get Wallet Details
Get Wallet Balance
Call Contract
Get Transaction History
Sign Message
Sign Transaction Hash
Verify Signature
Sign Typed Data
Deploy Contract
Bootstrapping the SDK for custodial wallet kit
SDK Methods
createWallet(walletName, curveType)
Creates a new wallet with the specified name and curve type.
Parameters:
walletName
(string): The name of the wallet.curveType
(string): The type of elliptic curve to use for key generation.
Usage:
createAndExecuteTx(chainId, contractAddress, abi, isContractTx, method, accessToken, value, args)
Creates and executes a transaction on the specified chain with the given parameters.
Parameters:
chainId
(number): The ID of the chain on which to execute the transaction.contractAddress
(string): The address of the contract.abi
(string): The ABI of the contract in JSON string format.isContractTx
(boolean): Indicates whether the transaction is for a contract method.method
(string): The name of the contract method to invoke.accessToken
(string): The access token for authentication.value
(number): The value to send with the transaction.args
(array): An array of arguments for the contract method.
Usage:
getAllWallets()
Retrieves the details of all wallets associated with the current user.
Usage:
getWallet(walletName)
Retrieves the details of a specific wallet based on its name.
Parameters:
walletName
(string): The name of the wallet to retrieve.
Usage:
getBalance(walletName)
Retrieves the balance of a wallet.
Parameters:
walletName
(string): The name of the wallet.
Usage:
callContract(chainId, contractAddress, abi, method, args, accessToken)
Invokes a view or pure method of a contract.
Parameters:
chainId
(number): The ID of the chain on which the contract is deployed.contractAddress
(string): The address of the contract.abi
(string): The ABI of the contract in JSON string format.method
(string): The name of the contract method to invoke.args
(array): An array of arguments for the contract method.accessToken
(string): The access token for authentication.
Usage:
getTxHistory(chainId, accessToken)
Retrieves the transaction history of the specified chain for the current user.
Parameters:
chainId
(number): The ID of the chain.accessToken
(string): The access token for authentication.
Usage:
signMessage(message, accessToken)
Signs a message using the wallet.
Parameters:
message
(string): The message to sign.accessToken
(string): The access token for authentication.
Usage:
signTxHash(txHash, accessToken)
Signs a transaction hash using the wallet.
Parameters:
txHash
(string): The transaction hash to sign.accessToken
(string): The access token for authentication.
Usage:
verifySignatureOffChain(message, signature, accessToken)
Verifies the off-chain signature.
Parameters:
message
(string): The message that was signed.signature
(string): The signature to verify.accessToken
(string): The access token for authentication.
Usage:
signEip712TypedData(typedData, accessToken)
Signs the EIP-712 typed data using the wallet.
Parameters:
typedData
(string): The EIP-712 typed data as a JSON string.accessToken
(string): The access token for authentication.
Usage:
deployContract(chainId, abi, bytecode, accessToken, constructorParams)
Deploys a contract on the specified chain.
Parameters:
chainId
(number): The ID of the chain on which to deploy the contract.abi
(string): The ABI of the contract in JSON string format.bytecode
(string): The bytecode of the contract.accessToken
(string): The access token for authentication.constructorParams
(array): An array of constructor parameters for the contract.
Usage:
Last updated