GRPC API Reference

GRPC API Reference

Every node in the Pactus network can be configured to use the gRPC protocol for communication. Here you can find the list of all gRPC methods and messages.

Units

All the amounts are in NanoPAC units, which are atomic and the smallest unit in the Pactus blockchain. Each PAC is equivalent to 1,000,000,000 or 109 NanoPACs.

Packages

For seamless integration with Pactus, you can use these client libraries:

gRPC Services

Transaction Service

Transaction service defines various RPC methods for interacting with transactions.

GetTransaction

GetTransaction retrieves transaction details based on the provided request parameters.

GetTransactionRequest Request

FieldTypeDescription
idstringThe unique ID of the transaction to retrieve.
verbosityTransactionVerbosity(Enum)The verbosity level for transaction details.
Available values:
  • TRANSACTION_VERBOSITY_DATA = 0 (Request transaction data only.)
  • TRANSACTION_VERBOSITY_INFO = 1 (Request detailed transaction information.)

GetTransactionResponse Response

FieldTypeDescription
block_heightuint32The height of the block containing the transaction.
block_timeuint32The UNIX timestamp of the block containing the transaction.
transactionTransactionInfoDetailed information about the transaction.
transaction.idstringThe unique ID of the transaction.
transaction.datastringThe raw transaction data in hexadecimal format.
transaction.versionint32The version of the transaction.
transaction.lock_timeuint32The lock time for the transaction.
transaction.valueint64The value of the transaction in NanoPAC.
transaction.feeint64The fee for the transaction in NanoPAC.
transaction.payload_typePayloadType(Enum)The type of transaction payload.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)
transaction.transferPayloadTransfer(OneOf)Transfer transaction payload.
transaction.transfer.senderstringThe sender's address.
transaction.transfer.receiverstringThe receiver's address.
transaction.transfer.amountint64The amount to be transferred in NanoPAC.
transaction.bondPayloadBond(OneOf)Bond transaction payload.
transaction.bond.senderstringThe sender's address.
transaction.bond.receiverstringThe receiver's address.
transaction.bond.stakeint64The stake amount in NanoPAC.
transaction.bond.public_keystringThe public key of the validator.
transaction.sortitionPayloadSortition(OneOf)Sortition transaction payload.
transaction.sortition.addressstringThe validator address associated with the sortition proof.
transaction.sortition.proofstringThe proof for the sortition.
transaction.unbondPayloadUnbond(OneOf)Unbond transaction payload.
transaction.unbond.validatorstringThe address of the validator to unbond from.
transaction.withdrawPayloadWithdraw(OneOf)Withdraw transaction payload.
transaction.withdraw.validator_addressstringThe address of the validator to withdraw from.
transaction.withdraw.account_addressstringThe address of the account to withdraw to.
transaction.withdraw.amountint64The withdrawal amount in NanoPAC.
transaction.memostringA memo string for the transaction.
transaction.public_keystringThe public key associated with the transaction.
transaction.signaturestringThe signature for the transaction.

CalculateFee

CalculateFee calculates the transaction fee based on the specified amount and payload type.

CalculateFeeRequest Request

FieldTypeDescription
amountint64The amount involved in the transaction, specified in NanoPAC.
payload_typePayloadType(Enum)The type of transaction payload.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)
fixed_amountboolIndicates if the amount should be fixed and include the fee.

CalculateFeeResponse Response

FieldTypeDescription
amountint64The calculated amount in NanoPAC.
feeint64The calculated transaction fee in NanoPAC.

BroadcastTransaction

BroadcastTransaction broadcasts a signed transaction to the network.

BroadcastTransactionRequest Request

FieldTypeDescription
signed_raw_transactionstringThe signed raw transaction data to be broadcasted.

BroadcastTransactionResponse Response

FieldTypeDescription
idstringThe unique ID of the broadcasted transaction.

GetRawTransferTransaction

GetRawTransferTransaction retrieves raw details of a transfer transaction.

GetRawTransferTransactionRequest Request

FieldTypeDescription
lock_timeuint32The lock time for the transaction. If not set, defaults to the last block height.
senderstringThe sender's account address.
receiverstringThe receiver's account address.
amountint64The amount to be transferred, specified in NanoPAC. Must be greater than 0.
feeint64The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
memostringA memo string for the transaction.

GetRawTransactionResponse Response

FieldTypeDescription
raw_transactionstringThe raw transaction data in hexadecimal format.
idstringThe unique ID of the transaction.

GetRawBondTransaction

GetRawBondTransaction retrieves raw details of a bond transaction.

GetRawBondTransactionRequest Request

FieldTypeDescription
lock_timeuint32The lock time for the transaction. If not set, defaults to the last block height.
senderstringThe sender's account address.
receiverstringThe receiver's validator address.
stakeint64The stake amount in NanoPAC. Must be greater than 0.
public_keystringThe public key of the validator.
feeint64The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
memostringA memo string for the transaction.

GetRawTransactionResponse Response

FieldTypeDescription
raw_transactionstringThe raw transaction data in hexadecimal format.
idstringThe unique ID of the transaction.

GetRawUnbondTransaction

GetRawUnbondTransaction retrieves raw details of an unbond transaction.

GetRawUnbondTransactionRequest Request

FieldTypeDescription
lock_timeuint32The lock time for the transaction. If not set, defaults to the last block height.
validator_addressstringThe address of the validator to unbond from.
memostringA memo string for the transaction.

GetRawTransactionResponse Response

FieldTypeDescription
raw_transactionstringThe raw transaction data in hexadecimal format.
idstringThe unique ID of the transaction.

GetRawWithdrawTransaction

GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.

GetRawWithdrawTransactionRequest Request

FieldTypeDescription
lock_timeuint32The lock time for the transaction. If not set, defaults to the last block height.
validator_addressstringThe address of the validator to withdraw from.
account_addressstringThe address of the account to withdraw to.
amountint64The withdrawal amount in NanoPAC. Must be greater than 0.
feeint64The transaction fee in NanoPAC. If not set, it is set to the estimated fee.
memostringA memo string for the transaction.

GetRawTransactionResponse Response

FieldTypeDescription
raw_transactionstringThe raw transaction data in hexadecimal format.
idstringThe unique ID of the transaction.

DecodeRawTransaction

DecodeRawTransaction accepts raw transaction and returns decoded transaction.

DecodeRawTransactionRequest Request

FieldTypeDescription
raw_transactionstringThe raw transaction data in hexadecimal format.

DecodeRawTransactionResponse Response

FieldTypeDescription
transactionTransactionInfoThe decoded transaction information.
transaction.idstringThe unique ID of the transaction.
transaction.datastringThe raw transaction data in hexadecimal format.
transaction.versionint32The version of the transaction.
transaction.lock_timeuint32The lock time for the transaction.
transaction.valueint64The value of the transaction in NanoPAC.
transaction.feeint64The fee for the transaction in NanoPAC.
transaction.payload_typePayloadType(Enum)The type of transaction payload.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)
transaction.transferPayloadTransfer(OneOf)Transfer transaction payload.
transaction.transfer.senderstringThe sender's address.
transaction.transfer.receiverstringThe receiver's address.
transaction.transfer.amountint64The amount to be transferred in NanoPAC.
transaction.bondPayloadBond(OneOf)Bond transaction payload.
transaction.bond.senderstringThe sender's address.
transaction.bond.receiverstringThe receiver's address.
transaction.bond.stakeint64The stake amount in NanoPAC.
transaction.bond.public_keystringThe public key of the validator.
transaction.sortitionPayloadSortition(OneOf)Sortition transaction payload.
transaction.sortition.addressstringThe validator address associated with the sortition proof.
transaction.sortition.proofstringThe proof for the sortition.
transaction.unbondPayloadUnbond(OneOf)Unbond transaction payload.
transaction.unbond.validatorstringThe address of the validator to unbond from.
transaction.withdrawPayloadWithdraw(OneOf)Withdraw transaction payload.
transaction.withdraw.validator_addressstringThe address of the validator to withdraw from.
transaction.withdraw.account_addressstringThe address of the account to withdraw to.
transaction.withdraw.amountint64The withdrawal amount in NanoPAC.
transaction.memostringA memo string for the transaction.
transaction.public_keystringThe public key associated with the transaction.
transaction.signaturestringThe signature for the transaction.

Blockchain Service

Blockchain service defines RPC methods for interacting with the blockchain.

GetBlock

GetBlock retrieves information about a block based on the provided request parameters.

GetBlockRequest Request

FieldTypeDescription
heightuint32The height of the block to retrieve.
verbosityBlockVerbosity(Enum)The verbosity level for block information.
Available values:
  • BLOCK_VERBOSITY_DATA = 0 (Request only block data.)
  • BLOCK_VERBOSITY_INFO = 1 (Request block information and transaction IDs.)
  • BLOCK_VERBOSITY_TRANSACTIONS = 2 (Request block information and detailed transaction data.)

GetBlockResponse Response

FieldTypeDescription
heightuint32The height of the block.
hashstringThe hash of the block.
datastringBlock data, available only if verbosity level is set to BLOCK_DATA.
block_timeuint32The timestamp of the block.
headerBlockHeaderInfoHeader information of the block.
header.versionint32The version of the block.
header.prev_block_hashstringThe hash of the previous block.
header.state_rootstringThe state root hash of the blockchain.
header.sortition_seedstringThe sortition seed of the block.
header.proposer_addressstringThe address of the proposer of the block.
prev_certCertificateInfoCertificate information of the previous block.
prev_cert.hashstringThe hash of the certificate.
prev_cert.roundint32The round of the certificate.
prev_cert.committersrepeated int32List of committers in the certificate.
prev_cert.absenteesrepeated int32List of absentees in the certificate.
prev_cert.signaturestringThe signature of the certificate.
txsrepeated TransactionInfoList of transactions in the block, available when verbosity level is set to BLOCK_TRANSACTIONS.
txs[].idstringThe unique ID of the transaction.
txs[].datastringThe raw transaction data in hexadecimal format.
txs[].versionint32The version of the transaction.
txs[].lock_timeuint32The lock time for the transaction.
txs[].valueint64The value of the transaction in NanoPAC.
txs[].feeint64The fee for the transaction in NanoPAC.
txs[].payload_typePayloadType(Enum)The type of transaction payload.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)
txs[].transferPayloadTransfer(OneOf)Transfer transaction payload.
txs[].transfer.senderstringThe sender's address.
txs[].transfer.receiverstringThe receiver's address.
txs[].transfer.amountint64The amount to be transferred in NanoPAC.
txs[].bondPayloadBond(OneOf)Bond transaction payload.
txs[].bond.senderstringThe sender's address.
txs[].bond.receiverstringThe receiver's address.
txs[].bond.stakeint64The stake amount in NanoPAC.
txs[].bond.public_keystringThe public key of the validator.
txs[].sortitionPayloadSortition(OneOf)Sortition transaction payload.
txs[].sortition.addressstringThe validator address associated with the sortition proof.
txs[].sortition.proofstringThe proof for the sortition.
txs[].unbondPayloadUnbond(OneOf)Unbond transaction payload.
txs[].unbond.validatorstringThe address of the validator to unbond from.
txs[].withdrawPayloadWithdraw(OneOf)Withdraw transaction payload.
txs[].withdraw.validator_addressstringThe address of the validator to withdraw from.
txs[].withdraw.account_addressstringThe address of the account to withdraw to.
txs[].withdraw.amountint64The withdrawal amount in NanoPAC.
txs[].memostringA memo string for the transaction.
txs[].public_keystringThe public key associated with the transaction.
txs[].signaturestringThe signature for the transaction.

GetBlockHash

GetBlockHash retrieves the hash of a block at the specified height.

GetBlockHashRequest Request

FieldTypeDescription
heightuint32The height of the block to retrieve the hash for.

GetBlockHashResponse Response

FieldTypeDescription
hashstringThe hash of the block.

GetBlockHeight

GetBlockHeight retrieves the height of a block with the specified hash.

GetBlockHeightRequest Request

FieldTypeDescription
hashstringThe hash of the block to retrieve the height for.

GetBlockHeightResponse Response

FieldTypeDescription
heightuint32The height of the block.

GetBlockchainInfo

GetBlockchainInfo retrieves general information about the blockchain.

GetBlockchainInfoRequest Request

Message has no fields.

GetBlockchainInfoResponse Response

FieldTypeDescription
last_block_heightuint32The height of the last block in the blockchain.
last_block_hashstringThe hash of the last block in the blockchain.
total_accountsint32The total number of accounts in the blockchain.
total_validatorsint32The total number of validators in the blockchain.
total_powerint64The total power of the blockchain.
committee_powerint64The power of the committee.
committee_validatorsrepeated ValidatorInfoList of committee validators.
committee_validators[].hashstringThe hash of the validator.
committee_validators[].datastringThe serialized data of the validator.
committee_validators[].public_keystringThe public key of the validator.
committee_validators[].numberint32The unique number assigned to the validator.
committee_validators[].stakeint64The stake of the validator in NanoPAC.
committee_validators[].last_bonding_heightuint32The height at which the validator last bonded.
committee_validators[].last_sortition_heightuint32The height at which the validator last participated in sortition.
committee_validators[].unbonding_heightuint32The height at which the validator will unbond.
committee_validators[].addressstringThe address of the validator.
committee_validators[].availability_scoredoubleThe availability score of the validator.
is_prunedboolIf the blocks are subject to pruning.
pruning_heightuint32Lowest-height block stored (only present if pruning is enabled)
last_block_timeint64Timestamp of the last block in Unix format

GetConsensusInfo

GetConsensusInfo retrieves information about the consensus instances.

GetConsensusInfoRequest Request

Message has no fields.

GetConsensusInfoResponse Response

FieldTypeDescription
proposalProposalInfoThe proposal of the consensus info.
proposal.heightuint32The height of the proposal.
proposal.roundint32The round of the proposal.
proposal.block_datastringThe block data of the proposal.
proposal.signaturestringThe signature of the proposal, signed by the proposer.
instancesrepeated ConsensusInfoList of consensus instances.
instances[].addressstringThe address of the consensus instance.
instances[].activeboolIndicates whether the consensus instance is active and part of the committee.
instances[].heightuint32The height of the consensus instance.
instances[].roundint32The round of the consensus instance.
instances[].votesrepeated VoteInfoList of votes in the consensus instance.
instances[].votes[].typeVoteType(Enum)The type of the vote.
Available values:
  • VOTE_TYPE_UNSPECIFIED = 0 (Unspecified vote type.)
  • VOTE_TYPE_PREPARE = 1 (Prepare vote type.)
  • VOTE_TYPE_PRECOMMIT = 2 (Precommit vote type.)
  • VOTE_TYPE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)
  • VOTE_TYPE_CP_MAIN_VOTE = 4 (Change-proposer:main-vote vote type.)
  • VOTE_TYPE_CP_DECIDED = 5 (Change-proposer:decided vote type.)
instances[].votes[].voterstringThe address of the voter.
instances[].votes[].block_hashstringThe hash of the block being voted on.
instances[].votes[].roundint32The consensus round of the vote.
instances[].votes[].cp_roundint32The change-proposer round of the vote.
instances[].votes[].cp_valueint32The change-proposer value of the vote.

GetAccount

GetAccount retrieves information about an account based on the provided address.

GetAccountRequest Request

FieldTypeDescription
addressstringThe address of the account to retrieve information for.

GetAccountResponse Response

FieldTypeDescription
accountAccountInfoDetailed information about the account.
account.hashstringThe hash of the account.
account.datastringThe serialized data of the account.
account.numberint32The unique number assigned to the account.
account.balanceint64The balance of the account in NanoPAC.
account.addressstringThe address of the account.

GetValidator

GetValidator retrieves information about a validator based on the provided address.

GetValidatorRequest Request

FieldTypeDescription
addressstringThe address of the validator to retrieve information for.

GetValidatorResponse Response

FieldTypeDescription
validatorValidatorInfoDetailed information about the validator.
validator.hashstringThe hash of the validator.
validator.datastringThe serialized data of the validator.
validator.public_keystringThe public key of the validator.
validator.numberint32The unique number assigned to the validator.
validator.stakeint64The stake of the validator in NanoPAC.
validator.last_bonding_heightuint32The height at which the validator last bonded.
validator.last_sortition_heightuint32The height at which the validator last participated in sortition.
validator.unbonding_heightuint32The height at which the validator will unbond.
validator.addressstringThe address of the validator.
validator.availability_scoredoubleThe availability score of the validator.

GetValidatorByNumber

GetValidatorByNumber retrieves information about a validator based on the provided number.

GetValidatorByNumberRequest Request

FieldTypeDescription
numberint32The unique number of the validator to retrieve information for.

GetValidatorResponse Response

FieldTypeDescription
validatorValidatorInfoDetailed information about the validator.
validator.hashstringThe hash of the validator.
validator.datastringThe serialized data of the validator.
validator.public_keystringThe public key of the validator.
validator.numberint32The unique number assigned to the validator.
validator.stakeint64The stake of the validator in NanoPAC.
validator.last_bonding_heightuint32The height at which the validator last bonded.
validator.last_sortition_heightuint32The height at which the validator last participated in sortition.
validator.unbonding_heightuint32The height at which the validator will unbond.
validator.addressstringThe address of the validator.
validator.availability_scoredoubleThe availability score of the validator.

GetValidatorAddresses

GetValidatorAddresses retrieves a list of all validator addresses.

GetValidatorAddressesRequest Request

Message has no fields.

GetValidatorAddressesResponse Response

FieldTypeDescription
addressesrepeated stringList of validator addresses.

GetPublicKey

GetPublicKey retrieves the public key of an account based on the provided address.

GetPublicKeyRequest Request

FieldTypeDescription
addressstringThe address for which to retrieve the public key.

GetPublicKeyResponse Response

FieldTypeDescription
public_keystringThe public key associated with the provided address.

GetTxPoolContent

GetTxPoolContent retrieves current transactions in the transaction pool.

GetTxPoolContentRequest Request

FieldTypeDescription
payload_typePayloadType(Enum)The type of transactions to retrieve from the transaction pool. 0 means all types.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)

GetTxPoolContentResponse Response

FieldTypeDescription
txsrepeated TransactionInfoList of transactions currently in the pool.
txs[].idstringThe unique ID of the transaction.
txs[].datastringThe raw transaction data in hexadecimal format.
txs[].versionint32The version of the transaction.
txs[].lock_timeuint32The lock time for the transaction.
txs[].valueint64The value of the transaction in NanoPAC.
txs[].feeint64The fee for the transaction in NanoPAC.
txs[].payload_typePayloadType(Enum)The type of transaction payload.
Available values:
  • PAYLOAD_TYPE_UNSPECIFIED = 0 (Unspecified payload type.)
  • PAYLOAD_TYPE_TRANSFER = 1 (Transfer payload type.)
  • PAYLOAD_TYPE_BOND = 2 (Bond payload type.)
  • PAYLOAD_TYPE_SORTITION = 3 (Sortition payload type.)
  • PAYLOAD_TYPE_UNBOND = 4 (Unbond payload type.)
  • PAYLOAD_TYPE_WITHDRAW = 5 (Withdraw payload type.)
txs[].transferPayloadTransfer(OneOf)Transfer transaction payload.
txs[].transfer.senderstringThe sender's address.
txs[].transfer.receiverstringThe receiver's address.
txs[].transfer.amountint64The amount to be transferred in NanoPAC.
txs[].bondPayloadBond(OneOf)Bond transaction payload.
txs[].bond.senderstringThe sender's address.
txs[].bond.receiverstringThe receiver's address.
txs[].bond.stakeint64The stake amount in NanoPAC.
txs[].bond.public_keystringThe public key of the validator.
txs[].sortitionPayloadSortition(OneOf)Sortition transaction payload.
txs[].sortition.addressstringThe validator address associated with the sortition proof.
txs[].sortition.proofstringThe proof for the sortition.
txs[].unbondPayloadUnbond(OneOf)Unbond transaction payload.
txs[].unbond.validatorstringThe address of the validator to unbond from.
txs[].withdrawPayloadWithdraw(OneOf)Withdraw transaction payload.
txs[].withdraw.validator_addressstringThe address of the validator to withdraw from.
txs[].withdraw.account_addressstringThe address of the account to withdraw to.
txs[].withdraw.amountint64The withdrawal amount in NanoPAC.
txs[].memostringA memo string for the transaction.
txs[].public_keystringThe public key associated with the transaction.
txs[].signaturestringThe signature for the transaction.

Network Service

Network service provides RPCs for retrieving information about the network.

GetNetworkInfo

GetNetworkInfo retrieves information about the overall network.

GetNetworkInfoRequest Request

FieldTypeDescription
only_connectedboolIf true, returns only peers that are currently connected.

GetNetworkInfoResponse Response

FieldTypeDescription
network_namestringName of the network.
connected_peers_countuint32Number of connected peers.
connected_peersrepeated PeerInfoList of connected peers.
connected_peers[].statusint32Current status of the peer (e.g., connected, disconnected).
connected_peers[].monikerstringMoniker or Human-Readable name of the peer.
connected_peers[].agentstringVersion and agent details of the peer.
connected_peers[].peer_idstringPeer ID of the peer in P2P network.
connected_peers[].consensus_keysrepeated stringList of consensus keys used by the peer.
connected_peers[].consensus_addressesrepeated stringList of consensus addresses used by the peer.
connected_peers[].servicesuint32Bitfield representing the services provided by the peer.
connected_peers[].last_block_hashstringHash of the last block the peer knows.
connected_peers[].heightuint32Blockchain height of the peer.
connected_peers[].last_sentint64Time the last bundle sent to the peer (in epoch format).
connected_peers[].last_receivedint64Time the last bundle received from the peer (in epoch format).
connected_peers[].addressstringNetwork address of the peer.
connected_peers[].directionstringConnection direction (e.g., inbound, outbound).
connected_peers[].protocolsrepeated stringList of protocols supported by the peer.
connected_peers[].total_sessionsint32Total download sessions with the peer.
connected_peers[].completed_sessionsint32Completed download sessions with the peer.
connected_peers[].metric_infoMetricInfoMetrics related to peer activity.
connected_peers[].metric_info.total_invalidCounterInfoTotal number of invalid bundles.
connected_peers[].metric_info.total_sentCounterInfoTotal number of bundles sent.
connected_peers[].metric_info.total_receivedCounterInfoTotal number of bundles received.
connected_peers[].metric_info.message_sentmap<int32, CounterInfo>Number of sent bundles categorized by message type.
connected_peers[].metric_info.message_receivedmap<int32, CounterInfo>Number of received bundles categorized by message type.
metric_infoMetricInfoMetrics related to node activity.
metric_info.total_invalidCounterInfoTotal number of invalid bundles.
metric_info.total_invalid.bytesuint64Total number of bytes.
metric_info.total_invalid.bundlesuint64Total number of bundles.
metric_info.total_sentCounterInfoTotal number of bundles sent.
metric_info.total_sent.bytesuint64Total number of bytes.
metric_info.total_sent.bundlesuint64Total number of bundles.
metric_info.total_receivedCounterInfoTotal number of bundles received.
metric_info.total_received.bytesuint64Total number of bytes.
metric_info.total_received.bundlesuint64Total number of bundles.
metric_info.message_sentmap<int32, CounterInfo>Number of sent bundles categorized by message type.
metric_info.message_receivedmap<int32, CounterInfo>Number of received bundles categorized by message type.

GetNodeInfo

GetNodeInfo retrieves information about a specific node in the network.

GetNodeInfoRequest Request

Message has no fields.

GetNodeInfoResponse Response

FieldTypeDescription
monikerstringMoniker or Human-readable name identifying this node in the network.
agentstringVersion and agent details of the node.
peer_idstringPeer ID of the node.
started_atuint64Time the node was started (in epoch format).
reachabilitystringReachability status of the node.
servicesint32Bitfield representing the services provided by the node.
services_namesstringNames of services provided by the node.
local_addrsrepeated stringList of addresses associated with the node.
protocolsrepeated stringList of protocols supported by the node.
clock_offsetdoubleOffset between the node's clock and the network's clock (in seconds).
connection_infoConnectionInfoInformation about the node's connections.
connection_info.connectionsuint64Total number of connections.
connection_info.inbound_connectionsuint64Number of inbound connections.
connection_info.outbound_connectionsuint64Number of outbound connections.
zmq_publishersrepeated ZMQPublisherInfoList of active ZeroMQ publishers.
zmq_publishers[].topicstringThe topic associated with the publisher.
zmq_publishers[].addressstringThe address of the publisher.
zmq_publishers[].hwmint32The high-water mark (HWM) for the publisher, indicating the maximum number of messages to queue before dropping older ones.

Utils Service

Utils service defines RPC methods for utility functions such as message signing, verification, and etc.

SignMessageWithPrivateKey

SignMessageWithPrivateKey signs a message with the provided private key.

SignMessageWithPrivateKeyRequest Request

FieldTypeDescription
private_keystringThe private key to sign the message.
messagestringThe message content to be signed.

SignMessageWithPrivateKeyResponse Response

FieldTypeDescription
signaturestringThe resulting signature in hexadecimal format.

VerifyMessage

VerifyMessage verifies a signature against the public key and message.

VerifyMessageRequest Request

FieldTypeDescription
messagestringThe original message content that was signed.
signaturestringThe signature to verify in hexadecimal format.
public_keystringThe public key of the signer.

VerifyMessageResponse Response

FieldTypeDescription
is_validboolBoolean indicating whether the signature is valid for the given message and public key.

PublicKeyAggregation

PublicKeyAggregation aggregates multiple BLS public keys into a single key.

PublicKeyAggregationRequest Request

FieldTypeDescription
public_keysrepeated stringList of BLS public keys to be aggregated.

PublicKeyAggregationResponse Response

FieldTypeDescription
public_keystringThe aggregated BLS public key.
addressstringThe blockchain address derived from the aggregated public key.

SignatureAggregation

SignatureAggregation aggregates multiple BLS signatures into a single signature.

SignatureAggregationRequest Request

FieldTypeDescription
signaturesrepeated stringList of BLS signatures to be aggregated.

SignatureAggregationResponse Response

FieldTypeDescription
signaturestringThe aggregated BLS signature in hexadecimal format.

Wallet Service

Wallet service provides RPC methods for wallet management operations.

CreateWallet

CreateWallet creates a new wallet with the specified parameters.

CreateWalletRequest Request

FieldTypeDescription
wallet_namestringThe name for the new wallet.
passwordstringPassword to secure the new wallet.

CreateWalletResponse Response

FieldTypeDescription
mnemonicstringThe mnemonic (seed phrase) for wallet recovery.

RestoreWallet

RestoreWallet restores an existing wallet with the given mnemonic.

RestoreWalletRequest Request

FieldTypeDescription
wallet_namestringThe name for the restored wallet.
mnemonicstringThe mnemonic (seed phrase) for wallet recovery.
passwordstringPassword to secure the restored wallet.

RestoreWalletResponse Response

FieldTypeDescription
wallet_namestringThe name of the restored wallet.

LoadWallet

LoadWallet loads an existing wallet with the given name.

LoadWalletRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to load.

LoadWalletResponse Response

FieldTypeDescription
wallet_namestringThe name of the loaded wallet.

UnloadWallet

UnloadWallet unloads a currently loaded wallet with the specified name.

UnloadWalletRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to unload.

UnloadWalletResponse Response

FieldTypeDescription
wallet_namestringThe name of the unloaded wallet.

GetTotalBalance

GetTotalBalance returns the total available balance of the wallet.

GetTotalBalanceRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to get the total balance.

GetTotalBalanceResponse Response

FieldTypeDescription
wallet_namestringThe name of the queried wallet.
total_balanceint64The total balance of the wallet in NanoPAC.

SignRawTransaction

SignRawTransaction signs a raw transaction for a specified wallet.

SignRawTransactionRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet used for signing.
raw_transactionstringThe raw transaction data to be signed.
passwordstringWallet password required for signing.

SignRawTransactionResponse Response

FieldTypeDescription
transaction_idstringThe ID of the signed transaction.
signed_raw_transactionstringThe signed raw transaction data.

GetValidatorAddress

GetValidatorAddress retrieves the validator address associated with a public key.

GetValidatorAddressRequest Request

FieldTypeDescription
public_keystringThe public key of the validator.

GetValidatorAddressResponse Response

FieldTypeDescription
addressstringThe validator address associated with the public key.

GetNewAddress

GetNewAddress generates a new address for the specified wallet.

GetNewAddressRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to generate a new address.
address_typeAddressType(Enum)The type of address to generate.
Available values:
  • ADDRESS_TYPE_TREASURY = 0 (Treasury address type. Should not be used to generate new addresses.)
  • ADDRESS_TYPE_VALIDATOR = 1 (Validator address type used for validator nodes.)
  • ADDRESS_TYPE_BLS_ACCOUNT = 2 (Account address type with BLS signature scheme.)
  • ADDRESS_TYPE_ED25519_ACCOUNT = 3 (Account address type with Ed25519 signature scheme. Note: Generating a new Ed25519 address requires the wallet password.)
labelstringA label for the new address.
passwordstringPassword for the new address. It's required when address_type is Ed25519 type.

GetNewAddressResponse Response

FieldTypeDescription
wallet_namestringThe name of the wallet where address was generated.
address_infoAddressInfoDetailed information about the new address.
address_info.addressstringThe address string.
address_info.public_keystringThe public key associated with the address.
address_info.labelstringA human-readable label associated with the address.
address_info.pathstringThe Hierarchical Deterministic (HD) path of the address within the wallet.

GetAddressHistory

GetAddressHistory retrieves the transaction history of an address.

GetAddressHistoryRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet containing the address.
addressstringThe address to retrieve history for.

GetAddressHistoryResponse Response

FieldTypeDescription
history_inforepeated HistoryInfoList of all historical transactions associated with the address.
history_info[].transaction_idstringThe transaction ID in hexadecimal format.
history_info[].timeuint32Unix timestamp of when the transaction was confirmed.
history_info[].payload_typestringThe type of transaction payload.
history_info[].descriptionstringHuman-readable description of the transaction.
history_info[].amountint64The transaction amount in NanoPAC.

SignMessage

SignMessage signs an arbitrary message using a wallet's private key.

SignMessageRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to sign with.
passwordstringWallet password required for signing.
addressstringThe address whose private key should be used for signing the message.
messagestringThe arbitrary message to be signed.

SignMessageResponse Response

FieldTypeDescription
signaturestringThe signature in hexadecimal format.

GetTotalStake

GetTotalStake returns the total stake amount in the wallet.

GetTotalStakeRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to get the total stake.

GetTotalStakeResponse Response

FieldTypeDescription
wallet_namestringThe name of the queried wallet.
total_stakeint64The total stake amount in NanoPAC.

GetAddressInfo

GetAddressInfo returns detailed information about a specific address.

GetAddressInfoRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet containing the address.
addressstringThe address to query.

GetAddressInfoResponse Response

FieldTypeDescription
wallet_namestringThe name of the wallet containing the address.
addressstringThe queried address.
labelstringThe address label.
public_keystringThe public key of the address.
pathstringThe Hierarchical Deterministic (HD) path of the address.

SetAddressLabel

SetAddressLabel sets or updates the label for a given address.

SetAddressLabelRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet containing the address.
passwordstringWallet password required for modification.
addressstringThe address to label.
labelstringThe new label for the address.

SetAddressLabelResponse Response

FieldTypeDescription

ListWallet

ListWallet returns list of all available wallets.

ListWalletRequest Request

Message has no fields.

ListWalletResponse Response

FieldTypeDescription
walletsrepeated stringArray of wallet names.

GetWalletInfo

GetWalletInfo returns detailed information about a specific wallet.

GetWalletInfoRequest Request

FieldTypeDescription
wallet_namestringThe name of the wallet to query.

GetWalletInfoResponse Response

FieldTypeDescription
wallet_namestringThe name of the wallet to query.
versionint64The wallet format version.
networkstringThe network the wallet is connected to (e.g., mainnet, testnet).
encryptedboolIndicates if the wallet is encrypted.
uuidstringA unique identifier of the wallet.
created_atint64Unix timestamp of wallet creation.

ListAddress

ListAddress returns all addresses in the specified wallet.

ListAddressRequest Request

FieldTypeDescription
wallet_namestringThe name of the queried wallet.

ListAddressResponse Response

FieldTypeDescription
wallet_namestringThe name of the queried wallet.
datarepeated AddressInfoist of all addresses in the wallet with their details.
data[].addressstringThe address string.
data[].public_keystringThe public key associated with the address.
data[].labelstringA human-readable label associated with the address.
data[].pathstringThe Hierarchical Deterministic (HD) path of the address within the wallet.

Scalar Value Types

.proto TypeGoC++RustJavaPythonC#
doublefloat64doublef64doublefloat
floatfloat32floatf32floatfloat
int32int32int32i32intint
int64int64int64i64longint/long
uint32uint32uint32u32intint/long
uint64uint64uint64u64longint/long
sint32int32int32i32intint
sint64int64int64i64longint/long
fixed32uint32uint32u64intint
fixed64uint64uint64u64longint/long
sfixed32int32int32i32intint
sfixed64int64int64i64longint/long
boolboolboolboolbooleanboolean
stringstringstringStringStringstr/unicode
bytes[]bytestringVecByteStringstr
Last updated on