All Products
Search
Document Center

Blockchain as a Service:API overview

Last Updated:Oct 16, 2024

This topic summarizes all APIs that the contract platform supports. For more information about the APIs, see the related topics.

Environment API

API

Description

init

Initializes the environment.

Account APIs

API

Description

createAccount

This API is used to create an account.

asyncCreateAccount

This API is called asynchronously to create an account.

transferBalance

This API is called synchronously for transaction transfer.

asyncTransferBalance

This API is called asynchronously for transaction transfer.

setRecoverKey

This API is called synchronously to set a recovery public key.

asyncSetRecoverKey

This API is called asynchronously to set a recovery public key.

preResetPubKey

This API is called synchronously to preset a public key.

asyncPreResetPubKey

This API is called asynchronously to preset a public key.

resetPublicKey

This API is called synchronously to reset a public key.

asyncResetPubKey

This API is called asynchronously to reset a public key.

updateAuthMap

This API is called synchronously to update a weight.

asyncUpdateAuthMap

This API is called asynchronously to update a weight.

freezeAccount

This API is called synchronously to freeze an account.

asyncFreezeAccount

This API is called asynchronously to freeze an account.

unFreezeAccount

This API is called synchronously to unfreeze an account.

asyncUnFreezeAccount

This API is called asynchronously to unfreeze an account.

updateEncryptionKey

This API is called synchronously to update an encryption key.

asyncUpdateEncryptionKey

This API is called asynchronously to update an encryption key.

Contract APIs

API

Description

deployContract

This API is called synchronously to deploy a contract.

asyncDeployContract

This API is called asynchronously to deploy a contract.

callContract

This API is called synchronously to call a contract.

asyncCallContract

This API is called asynchronously to call a contract.

updateContract

This API is called synchronously to update a contract.

asyncUpdateContract

This API is called asynchronously to update a contract.

freezeContract

This API is called synchronously to freeze a contract.

asyncFreezeContract

This API is called asynchronously to freeze a contract.

unFreezeContract

This API is called synchronously to unfreeze a contract.

asyncUnFreezeContract

This API is called asynchronously to unfreeze a contract.

Query APIs

API

Description

queryBlockHeader

This API is used to query for block headers by block hash.

queryBlockHeaderByNumber

This API is used to query for block headers by block number.

queryLastBlockHeader

This API is used to query for the last block header.

queryBlock

This API is used to query for blocks by block hash.

queryBlockByNumber

This API is used to query for blocks by block number.

queryLastBlock

This API is used to query for the last block.

queryTransaction

This API is used to query for transactions by transaction hash.

queryTransactionReceipt

This API is used to query for transaction receipts by transaction hash.

queryAccount

This API is used to query for accounts by account ID.

queryContract

This API is used to query for contracts by contract account.

queryBlockTxReceipts

This API is used to query for transaction receipts in blocks.

Local execution API

API

Description

setLocal

The local execution service API.

Envelope transaction APIs

API

Description

depositEnvelope

This API is called synchronously for envelope transactions.

asyncDepositRequest

This API is called asynchronously for envelope transactions.

Event APIs

API

Description

listenAccount

This API is used to subscribe to an account.

listenContract

This API is used to subscribe to a contract.

listenTopics

This API is used to subscribe to a topic event.

listenBlock

This API is used to subscribe to a block event.

unListenAccount

This API is used to unsubscribe from an account event.

unListenContract

This API is used to unsubscribe from a contract event.

unListenTopics

This API is used to unsubscribe from a topic event.

unListenBlock

This API is used to unsubscribe from a block event.

Monitoring metrics APIs

API

Description

queryNodeMetricsStatus

This API is used for the statistics metrics for the transactions sent by accounts.

queryMetricsMessage

This API is used for the statistics metrics for the query requests sent.

queryTpsLatency

This API is used for the statistics metrics for the number of transactions handled per second.

Privacy protection APIs

API

Description

ValueHiding

This API is used to encrypt the transaction amount.

PedersenCommitment

This API is used to create a commitment to the transaction amount and encrypt the transaction amount by using ValueHiding.

Proofs

This API is used to create the proof required for a transaction.

Native evidence deposit APIs

API

Description

depositData

This API is called synchronously for evidence deposit transactions.

asyncDepositData

This API is called asynchronously for evidence deposit transactions.

Log API

API

Description

AbstractLoggerFactory

The logger factory.