Public methods 📢
Get SDK-instance info
Returns:
an instance of
InfoDatacontaining SDK-related properties.
public async Task<InfoData> getInfo() {
return new InfoData {
apiKey = this.apiKey,
dAppCode = this.dAppCode,
network = this.network,
visitorId = "[not implemented yet]",
sdkEnvironment = this.sdkEnvironment,
sdkVersion = this.sdkVersion
};
}Get balances by Hedera id (address)
Parameters:
accountId: Hedera id (address), example: 0.0.112233
Returns:
an instance of
AccountBalanceDatacontaining account hbar and token balances.
Get account evmAddress and calculated evmAddress from public key
Parameters:
accountId: Hedera id (address), example: 0.0.112233
Returns:
an instance of
AccountInfoDatacontaining account id, evmAddress, calculatedEvmAddress
Method to execute Hbar transfers from current account to receiver
Parameters:
accountId: senderaccountPrivateKey: sender's private key to sign transfer transactionreceiverId: receiveramount: amountmemo: memo (limited to 100 characters)
Returns:
an instance of
ExecuteTxReceiptcontaining transaction receipt
Method to execute token transfers from current account to receiver
Parameters:
tokenId: tokenaccountId: senderaccountPrivateKey: sender's private key to sign transfer transactionreceiverId: receiveramount: amountmemo: memo (limited to 100 characters)freeTransfer: for tokens configured for this dAppCode on Blade backend
Returns:
an instance of
ExecuteTxReceiptcontaining transaction receipt
Method to create Hedera account
Parameters:
deviceId: unique device id (advanced security feature, required only for some dApps)
Returns:
an instance of
CreateAccountDatacontaining new account data
Method to delete Hedera account
Parameters:
deleteAccountId: account to delete - iddeletePrivateKey: account to delete - private keytransferAccountId: The ID of the account to transfer the remaining funds to.operatorAccountId: operator account IdoperatorPrivateKey: operator account private key
Returns:
an instance of
ExecuteTxReceiptcontaining transaction receipt
Method to call smart-contract function
Parameters:
contractId: contract idfunctionName: contract function nameparams: function arguments (instance of ContractFunctionParameters)accountId: sender account idaccountPrivateKey: sender's private key to sign transfer transactiongas: gas amount for transaction (default 100000)bladePayFee: blade pay fee, otherwise fee will be pay from sender accountId
Returns:
an instance of
ExecuteTxReceiptcontaining transaction receipt
Method to call smart-contract query
Parameters:
contractId: contract idfunctionName: contract function nameparams: function arguments (instance of ContractFunctionParameters)accountId: sender account idaccountPrivateKey: sender's private key to sign transfer transactiongas: gas amount for transaction (default 100000)bladePayFee: blade pay fee, otherwise fee will be pay from sender accountIdreturnTypes: array of return types, e.g. ["string", "int32"]
Returns:
an instance of
ContractQueryDatacontaining result from query with types
Method to get C14 url for payment
Parameters:
asset: USDC, HBAR, KARATE or C14 asset uuidaccount: receiver account idamount: amount to buy
Returns:
string with C14 url with preseted paramsbalances.
Sign message with private key
Parameters:
messageEncoded: encoder message stringaccountPrivateKey: private key stringencoding: message encoding. One of: hex, base64, utf8
Returns:
an instance of
SignMessageDatacontaining signature
Verify message signature with public key
Parameters:
messageEncoded: message encodedsignatureHex: hex-encoded signature stringpublicKey: public key stringencoding: message encoding. One of: hex, base64, utf8
Returns:
boolean. True if signature is valid
Sign message with private key (hethers lib)
Parameters:
messageEncoded: encoder message stringaccountPrivateKey: private key stringencoding: message encoding. One of: hex, base64, utf8
Returns:
an instance of
SignMessageDatacontaining signature
Method to split signature into v-r-s
Parameters:
signature: signature string "0x21fbf0696......"
Returns:
an instance of
SplitSignatureDatacontaining v, r, s
Get signature for contract params into v-r-s
Parameters:
params: function arguments (instance of ContractFunctionParameters)accountPrivateKey: account private key string
Returns:
an instance of
SplitSignatureDatacontaining v, r, s
Method to get transactions history
Parameters:
accountId: accountId of historytransactionType: filter by type of transactionnextPage: link from response to load next page of historytransactionsLimit: limit of transactions to load
Returns:
an instance of
TransactionsHistoryDatacontaining transaction records, filtered and aggregated
Last updated