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:
- pactus-grpc package for Javascript
- pactus-grpc package for Python
- pactus-grpc package for Rust
gRPC Services
- Transaction Service
- Blockchain Service
- Network Service
- Utils Service
- Wallet Service
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
| Field | Type | Description |
| id | string | The unique ID of the transaction to retrieve. |
| verbosity | TransactionVerbosity | (Enum)The verbosity level for transaction details. Available values:
|
GetTransactionResponse Response
| Field | Type | Description |
| block_height | uint32 | The height of the block containing the transaction. |
| block_time | uint32 | The UNIX timestamp of the block containing the transaction. |
| transaction | TransactionInfo | Detailed information about the transaction. |
| transaction.id | string | The unique ID of the transaction. |
| transaction.data | string | The raw transaction data in hexadecimal format. |
| transaction.version | int32 | The version of the transaction. |
| transaction.lock_time | uint32 | The lock time for the transaction. |
| transaction.value | int64 | The value of the transaction in NanoPAC. |
| transaction.fee | int64 | The fee for the transaction in NanoPAC. |
| transaction.payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| transaction.transfer | PayloadTransfer | (OneOf)Transfer transaction payload. |
| transaction.transfer.sender | string | The sender's address. |
| transaction.transfer.receiver | string | The receiver's address. |
| transaction.transfer.amount | int64 | The amount to be transferred in NanoPAC. |
| transaction.bond | PayloadBond | (OneOf)Bond transaction payload. |
| transaction.bond.sender | string | The sender's address. |
| transaction.bond.receiver | string | The receiver's address. |
| transaction.bond.stake | int64 | The stake amount in NanoPAC. |
| transaction.bond.public_key | string | The public key of the validator. |
| transaction.bond.is_delegated | bool | Indicates whether the bond transaction is a delegation. |
| transaction.bond.delegate_owner | string | The address of the delegate owner. Optional, but required when registering a new validator with delegation.; |
| transaction.bond.delegate_share | int64 | The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC. |
| transaction.bond.delegate_expiry | uint32 | The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.; |
| transaction.sortition | PayloadSortition | (OneOf)Sortition transaction payload. |
| transaction.sortition.address | string | The validator address associated with the sortition proof. |
| transaction.sortition.proof | string | The proof for the sortition. |
| transaction.unbond | PayloadUnbond | (OneOf)Unbond transaction payload. |
| transaction.unbond.validator | string | The address of the validator to unbond from. |
| transaction.unbond.delegate_owner | string | The address of the delegate owner. Optional, but required when the validator is a delegated validator.; |
| transaction.withdraw | PayloadWithdraw | (OneOf)Withdraw transaction payload. |
| transaction.withdraw.validator_address | string | The address of the validator to withdraw from. |
| transaction.withdraw.account_address | string | The address of the account to withdraw to. |
| transaction.withdraw.amount | int64 | The withdrawal amount in NanoPAC. |
| transaction.batch_transfer | PayloadBatchTransfer | (OneOf)Batch Transfer transaction payload. |
| transaction.batch_transfer.sender | string | The sender's address. |
| transaction.batch_transfer.recipients | repeated Recipient | The list of recipients with their amounts. |
| transaction.memo | string | A memo string for the transaction. |
| transaction.public_key | string | The public key associated with the transaction. |
| transaction.signature | string | The signature for the transaction. |
| transaction.block_height | uint32 | The block height containing the transaction. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
| transaction.confirmed | bool | Indicates whether the transaction is confirmed. |
| transaction.confirmations | int32 | The number of blocks that have been added to the chain after this transaction was included in a block. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
CalculateFee
CalculateFee calculates the transaction fee based on the specified amount and payload type.
CalculateFeeRequest Request
| Field | Type | Description |
| amount | int64 | The amount involved in the transaction, specified in NanoPAC. |
| payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| fixed_amount | bool | Indicates if the amount should be fixed and include the fee. |
CalculateFeeResponse Response
| Field | Type | Description |
| amount | int64 | The calculated amount in NanoPAC. |
| fee | int64 | The calculated transaction fee in NanoPAC. |
BroadcastTransaction
BroadcastTransaction broadcasts a signed transaction to the network.
BroadcastTransactionRequest Request
| Field | Type | Description |
| signed_raw_transaction | string | The signed raw transaction data to be broadcasted. |
BroadcastTransactionResponse Response
| Field | Type | Description |
| id | string | The unique ID of the broadcasted transaction. |
GetRawTransferTransaction
GetRawTransferTransaction retrieves raw details of a transfer transaction.
GetRawTransferTransactionRequest Request
| Field | Type | Description |
| lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
| sender | string | The sender's account address. |
| receiver | string | The receiver's account address. |
| amount | int64 | The amount to be transferred, specified in NanoPAC. Must be greater than 0. |
| fee | int64 | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
| memo | string | A memo string for the transaction. |
GetRawTransactionResponse Response
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
| id | string | The unique ID of the transaction. |
GetRawBondTransaction
GetRawBondTransaction retrieves raw details of a bond transaction.
GetRawBondTransactionRequest Request
| Field | Type | Description |
| lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
| sender | string | The sender's account address. |
| receiver | string | The receiver's validator address. |
| stake | int64 | The stake amount in NanoPAC. Must be greater than 0. |
| public_key | string | The public key of the validator. Optional, but required when registering a new validator.; |
| fee | int64 | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
| memo | string | A memo string for the transaction. |
| delegate_owner | string | The address of the delegate owner. Optional, but required when registering a new validator with delegation.; |
| delegate_share | int64 | The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC. |
| delegate_expiry | uint32 | The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.; |
GetRawTransactionResponse Response
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
| id | string | The unique ID of the transaction. |
GetRawUnbondTransaction
GetRawUnbondTransaction retrieves raw details of an unbond transaction.
GetRawUnbondTransactionRequest Request
| Field | Type | Description |
| lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
| validator_address | string | The address of the validator to unbond from. |
| memo | string | A memo string for the transaction. |
| delegate_owner | string | The address of the delegate owner. Optional, but required when the validator is a delegated validator.; |
GetRawTransactionResponse Response
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
| id | string | The unique ID of the transaction. |
GetRawWithdrawTransaction
GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
GetRawWithdrawTransactionRequest Request
| Field | Type | Description |
| lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
| validator_address | string | The address of the validator to withdraw from. |
| account_address | string | The address of the account to withdraw to. |
| amount | int64 | The withdrawal amount in NanoPAC. Must be greater than 0. |
| fee | int64 | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
| memo | string | A memo string for the transaction. |
GetRawTransactionResponse Response
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
| id | string | The unique ID of the transaction. |
GetRawBatchTransferTransaction
GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.
GetRawBatchTransferTransactionRequest Request
| Field | Type | Description |
| lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
| sender | string | The sender's account address. |
| recipients | repeated Recipient | The list of recipients with their amounts. Minimum 2 recipients required. |
| fee | int64 | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
| memo | string | A memo string for the transaction. |
GetRawTransactionResponse Response
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
| id | string | The unique ID of the transaction. |
DecodeRawTransaction
DecodeRawTransaction accepts raw transaction and returns decoded transaction.
DecodeRawTransactionRequest Request
| Field | Type | Description |
| raw_transaction | string | The raw transaction data in hexadecimal format. |
DecodeRawTransactionResponse Response
| Field | Type | Description |
| transaction | TransactionInfo | The decoded transaction information. |
| transaction.id | string | The unique ID of the transaction. |
| transaction.data | string | The raw transaction data in hexadecimal format. |
| transaction.version | int32 | The version of the transaction. |
| transaction.lock_time | uint32 | The lock time for the transaction. |
| transaction.value | int64 | The value of the transaction in NanoPAC. |
| transaction.fee | int64 | The fee for the transaction in NanoPAC. |
| transaction.payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| transaction.transfer | PayloadTransfer | (OneOf)Transfer transaction payload. |
| transaction.transfer.sender | string | The sender's address. |
| transaction.transfer.receiver | string | The receiver's address. |
| transaction.transfer.amount | int64 | The amount to be transferred in NanoPAC. |
| transaction.bond | PayloadBond | (OneOf)Bond transaction payload. |
| transaction.bond.sender | string | The sender's address. |
| transaction.bond.receiver | string | The receiver's address. |
| transaction.bond.stake | int64 | The stake amount in NanoPAC. |
| transaction.bond.public_key | string | The public key of the validator. |
| transaction.bond.is_delegated | bool | Indicates whether the bond transaction is a delegation. |
| transaction.bond.delegate_owner | string | The address of the delegate owner. Optional, but required when registering a new validator with delegation.; |
| transaction.bond.delegate_share | int64 | The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC. |
| transaction.bond.delegate_expiry | uint32 | The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.; |
| transaction.sortition | PayloadSortition | (OneOf)Sortition transaction payload. |
| transaction.sortition.address | string | The validator address associated with the sortition proof. |
| transaction.sortition.proof | string | The proof for the sortition. |
| transaction.unbond | PayloadUnbond | (OneOf)Unbond transaction payload. |
| transaction.unbond.validator | string | The address of the validator to unbond from. |
| transaction.unbond.delegate_owner | string | The address of the delegate owner. Optional, but required when the validator is a delegated validator.; |
| transaction.withdraw | PayloadWithdraw | (OneOf)Withdraw transaction payload. |
| transaction.withdraw.validator_address | string | The address of the validator to withdraw from. |
| transaction.withdraw.account_address | string | The address of the account to withdraw to. |
| transaction.withdraw.amount | int64 | The withdrawal amount in NanoPAC. |
| transaction.batch_transfer | PayloadBatchTransfer | (OneOf)Batch Transfer transaction payload. |
| transaction.batch_transfer.sender | string | The sender's address. |
| transaction.batch_transfer.recipients | repeated Recipient | The list of recipients with their amounts. |
| transaction.memo | string | A memo string for the transaction. |
| transaction.public_key | string | The public key associated with the transaction. |
| transaction.signature | string | The signature for the transaction. |
| transaction.block_height | uint32 | The block height containing the transaction. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
| transaction.confirmed | bool | Indicates whether the transaction is confirmed. |
| transaction.confirmations | int32 | The number of blocks that have been added to the chain after this transaction was included in a block. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
CheckTransaction
CheckTransaction checks if the transaction is valid and can be included in the blockchain.
CheckTransactionRequest Request
| Field | Type | Description |
| raw_transaction | string | The raw transaction data to be checked. |
CheckTransactionResponse Response
| Field | Type | Description |
| is_valid | bool | Indicates whether the transaction is valid. |
| error_message | string | An error message if the transaction is invalid. Empty if the transaction is valid. |
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
| Field | Type | Description |
| height | uint32 | The height of the block to retrieve. |
| verbosity | BlockVerbosity | (Enum)The verbosity level for block information. Available values:
|
GetBlockResponse Response
| Field | Type | Description |
| height | uint32 | The height of the block. |
| hash | string | The hash of the block. |
| data | string | Block data, available only if verbosity level is set to BLOCK_VERBOSITY_DATA. |
| block_time | uint32 | The timestamp of the block. |
| header | BlockHeaderInfo | Header information of the block. |
| header.version | int32 | The version of the block. |
| header.prev_block_hash | string | The hash of the previous block. |
| header.state_root | string | The state root hash of the blockchain. |
| header.sortition_seed | string | The sortition seed of the block. |
| header.proposer_address | string | The address of the proposer of the block. |
| prev_cert | CertificateInfo | Certificate information of the previous block. |
| prev_cert.hash | string | The hash of the certificate. |
| prev_cert.round | int32 | The round of the certificate. |
| prev_cert.committers | repeated int32 | List of committers in the certificate. |
| prev_cert.absentees | repeated int32 | List of absentees in the certificate. |
| prev_cert.signature | string | The signature of the certificate. |
| txs | repeated TransactionInfo | List of transactions in the block, available when verbosity level is set to BLOCK_VERBOSITY_TRANSACTIONS. |
| txs[].id | string | The unique ID of the transaction. |
| txs[].data | string | The raw transaction data in hexadecimal format. |
| txs[].version | int32 | The version of the transaction. |
| txs[].lock_time | uint32 | The lock time for the transaction. |
| txs[].value | int64 | The value of the transaction in NanoPAC. |
| txs[].fee | int64 | The fee for the transaction in NanoPAC. |
| txs[].payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| txs[].transfer | PayloadTransfer | (OneOf)Transfer transaction payload. |
| txs[].transfer.sender | string | The sender's address. |
| txs[].transfer.receiver | string | The receiver's address. |
| txs[].transfer.amount | int64 | The amount to be transferred in NanoPAC. |
| txs[].bond | PayloadBond | (OneOf)Bond transaction payload. |
| txs[].bond.sender | string | The sender's address. |
| txs[].bond.receiver | string | The receiver's address. |
| txs[].bond.stake | int64 | The stake amount in NanoPAC. |
| txs[].bond.public_key | string | The public key of the validator. |
| txs[].bond.is_delegated | bool | Indicates whether the bond transaction is a delegation. |
| txs[].bond.delegate_owner | string | The address of the delegate owner. Optional, but required when registering a new validator with delegation.; |
| txs[].bond.delegate_share | int64 | The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC. |
| txs[].bond.delegate_expiry | uint32 | The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.; |
| txs[].sortition | PayloadSortition | (OneOf)Sortition transaction payload. |
| txs[].sortition.address | string | The validator address associated with the sortition proof. |
| txs[].sortition.proof | string | The proof for the sortition. |
| txs[].unbond | PayloadUnbond | (OneOf)Unbond transaction payload. |
| txs[].unbond.validator | string | The address of the validator to unbond from. |
| txs[].unbond.delegate_owner | string | The address of the delegate owner. Optional, but required when the validator is a delegated validator.; |
| txs[].withdraw | PayloadWithdraw | (OneOf)Withdraw transaction payload. |
| txs[].withdraw.validator_address | string | The address of the validator to withdraw from. |
| txs[].withdraw.account_address | string | The address of the account to withdraw to. |
| txs[].withdraw.amount | int64 | The withdrawal amount in NanoPAC. |
| txs[].batch_transfer | PayloadBatchTransfer | (OneOf)Batch Transfer transaction payload. |
| txs[].batch_transfer.sender | string | The sender's address. |
| txs[].batch_transfer.recipients | repeated Recipient | The list of recipients with their amounts. |
| txs[].memo | string | A memo string for the transaction. |
| txs[].public_key | string | The public key associated with the transaction. |
| txs[].signature | string | The signature for the transaction. |
| txs[].block_height | uint32 | The block height containing the transaction. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
| txs[].confirmed | bool | Indicates whether the transaction is confirmed. |
| txs[].confirmations | int32 | The number of blocks that have been added to the chain after this transaction was included in a block. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
GetBlockHash
GetBlockHash retrieves the hash of a block at the specified height.
GetBlockHashRequest Request
| Field | Type | Description |
| height | uint32 | The height of the block to retrieve the hash for. |
GetBlockHashResponse Response
| Field | Type | Description |
| hash | string | The hash of the block. |
GetBlockHeight
GetBlockHeight retrieves the height of a block with the specified hash.
GetBlockHeightRequest Request
| Field | Type | Description |
| hash | string | The hash of the block to retrieve the height for. |
GetBlockHeightResponse Response
| Field | Type | Description |
| height | uint32 | The height of the block. |
GetBlockchainInfo
GetBlockchainInfo retrieves general information about the blockchain.
GetBlockchainInfoRequest Request
Request Message has no fields.GetBlockchainInfoResponse Response
| Field | Type | Description |
| last_block_height | uint32 | The height of the last block in the blockchain. |
| last_block_hash | string | The hash of the last block in the blockchain. |
| last_block_time | int64 | The timestamp of the last block in Unix format. |
| total_accounts | int32 | The total number of accounts in the blockchain. |
| total_validators | int32 | The total number of validators in the blockchain. |
| active_validators | int32 | The number of active (not unbonded) validators in the blockchain. |
| total_power | int64 | The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC. |
| committee_power | int64 | The power of the committee. |
| is_pruned | bool | If the blocks are subject to pruning. |
| pruning_height | uint32 | Lowest-height block stored (only present if pruning is enabled) |
| in_committee | bool | Indicates whether this node participates in consensus: true if at least one of its running validators is a member of the current committee. |
| committee_size | int32 | The number of validators in the current committee. |
| average_score | double | Average availability score of validators with stake, in percentage (0-100). |
GetCommitteeInfo
GetCommitteeInfo retrieves information about the current committee.
GetCommitteeInfoRequest Request
Request Message has no fields.GetCommitteeInfoResponse Response
| Field | Type | Description |
| committee_size | int32 | The number of validators in the committee. |
| committee_power | int64 | The power of the committee. |
| total_power | int64 | The total power of the blockchain that is the sum of all validators' stakes, in NanoPAC. |
| validators | repeated ValidatorInfo | List of committee validators. |
| validators[].hash | string | The hash of the validator. |
| validators[].data | string | The serialized data of the validator. |
| validators[].public_key | string | The public key of the validator. |
| validators[].number | int32 | The unique number assigned to the validator. |
| validators[].stake | int64 | The stake of the validator in NanoPAC. |
| validators[].last_bonding_height | uint32 | The height at which the validator last bonded. |
| validators[].last_sortition_height | uint32 | The height at which the validator last participated in sortition. |
| validators[].unbonding_height | uint32 | The height at which the validator will unbond. |
| validators[].address | string | The address of the validator. |
| validators[].availability_score | double | The availability score of the validator. |
| validators[].protocol_version | int32 | The protocol version of the validator. |
| validators[].is_delegated | bool | Whether the validator is delegated. |
| validators[].delegate_owner | string | The address of the stake owner of the validator. |
| validators[].delegate_share | int64 | The share of the stake owner of the validator. |
| validators[].delegate_expiry | uint32 | The expiry of the stake owner of the validator. |
| protocol_versions | map<int32, double> | Map of protocol versions and their percentages in the committee. |
GetConsensusInfo
GetConsensusInfo retrieves information about the consensus instances.
GetConsensusInfoRequest Request
Request Message has no fields.GetConsensusInfoResponse Response
| Field | Type | Description |
| proposal | ProposalInfo | The proposal of the consensus info. |
| proposal.height | uint32 | The height of the proposal. |
| proposal.round | int32 | The round of the proposal. |
| proposal.block_data | string | The block data of the proposal. |
| proposal.signature | string | The signature of the proposal, signed by the proposer. |
| instances | repeated ConsensusInfo | List of consensus instances. |
| instances[].address | string | The address of the consensus instance. |
| instances[].active | bool | Indicates whether the consensus instance is active and part of the committee. |
| instances[].height | uint32 | The height of the consensus instance. |
| instances[].round | int32 | The round of the consensus instance. |
| instances[].votes | repeated VoteInfo | List of votes in the consensus instance. |
| instances[].votes[].type | VoteType | (Enum)The type of the vote. Available values:
|
| instances[].votes[].voter | string | The address of the voter. |
| instances[].votes[].block_hash | string | The hash of the block being voted on. |
| instances[].votes[].round | int32 | The consensus round of the vote. |
| instances[].votes[].cp_round | int32 | The change-proposer round of the vote. |
| instances[].votes[].cp_value | int32 | The change-proposer value of the vote. |
GetAccount
GetAccount retrieves information about an account based on the provided address.
GetAccountRequest Request
| Field | Type | Description |
| address | string | The address of the account to retrieve information for. |
GetAccountResponse Response
| Field | Type | Description |
| account | AccountInfo | Detailed information about the account. |
| account.hash | string | The hash of the account. |
| account.data | string | The serialized data of the account. |
| account.number | int32 | The unique number assigned to the account. |
| account.balance | int64 | The balance of the account in NanoPAC. |
| account.address | string | The address of the account. |
GetValidator
GetValidator retrieves information about a validator based on the provided address.
GetValidatorRequest Request
| Field | Type | Description |
| address | string | The address of the validator to retrieve information for. |
GetValidatorResponse Response
| Field | Type | Description |
| validator | ValidatorInfo | Detailed information about the validator. |
| validator.hash | string | The hash of the validator. |
| validator.data | string | The serialized data of the validator. |
| validator.public_key | string | The public key of the validator. |
| validator.number | int32 | The unique number assigned to the validator. |
| validator.stake | int64 | The stake of the validator in NanoPAC. |
| validator.last_bonding_height | uint32 | The height at which the validator last bonded. |
| validator.last_sortition_height | uint32 | The height at which the validator last participated in sortition. |
| validator.unbonding_height | uint32 | The height at which the validator will unbond. |
| validator.address | string | The address of the validator. |
| validator.availability_score | double | The availability score of the validator. |
| validator.protocol_version | int32 | The protocol version of the validator. |
| validator.is_delegated | bool | Whether the validator is delegated. |
| validator.delegate_owner | string | The address of the stake owner of the validator. |
| validator.delegate_share | int64 | The share of the stake owner of the validator. |
| validator.delegate_expiry | uint32 | The expiry of the stake owner of the validator. |
GetValidatorByNumber
GetValidatorByNumber retrieves information about a validator based on the provided number.
GetValidatorByNumberRequest Request
| Field | Type | Description |
| number | int32 | The unique number of the validator to retrieve information for. |
GetValidatorResponse Response
| Field | Type | Description |
| validator | ValidatorInfo | Detailed information about the validator. |
| validator.hash | string | The hash of the validator. |
| validator.data | string | The serialized data of the validator. |
| validator.public_key | string | The public key of the validator. |
| validator.number | int32 | The unique number assigned to the validator. |
| validator.stake | int64 | The stake of the validator in NanoPAC. |
| validator.last_bonding_height | uint32 | The height at which the validator last bonded. |
| validator.last_sortition_height | uint32 | The height at which the validator last participated in sortition. |
| validator.unbonding_height | uint32 | The height at which the validator will unbond. |
| validator.address | string | The address of the validator. |
| validator.availability_score | double | The availability score of the validator. |
| validator.protocol_version | int32 | The protocol version of the validator. |
| validator.is_delegated | bool | Whether the validator is delegated. |
| validator.delegate_owner | string | The address of the stake owner of the validator. |
| validator.delegate_share | int64 | The share of the stake owner of the validator. |
| validator.delegate_expiry | uint32 | The expiry of the stake owner of the validator. |
GetValidatorAddresses
GetValidatorAddresses retrieves a list of all validator addresses.
GetValidatorAddressesRequest Request
Request Message has no fields.GetValidatorAddressesResponse Response
| Field | Type | Description |
| addresses | repeated string | List of validator addresses. |
GetPublicKey
GetPublicKey retrieves the public key of an account based on the provided address.
GetPublicKeyRequest Request
| Field | Type | Description |
| address | string | The address for which to retrieve the public key. |
GetPublicKeyResponse Response
| Field | Type | Description |
| public_key | string | The public key associated with the provided address. |
GetTxPoolContent
GetTxPoolContent retrieves current transactions in the transaction pool.
GetTxPoolContentRequest Request
| Field | Type | Description |
| payload_type | PayloadType | (Enum)The type of transactions to retrieve from the transaction pool. 0 means all types. Available values:
|
GetTxPoolContentResponse Response
| Field | Type | Description |
| txs | repeated TransactionInfo | List of transactions currently in the pool. |
| txs[].id | string | The unique ID of the transaction. |
| txs[].data | string | The raw transaction data in hexadecimal format. |
| txs[].version | int32 | The version of the transaction. |
| txs[].lock_time | uint32 | The lock time for the transaction. |
| txs[].value | int64 | The value of the transaction in NanoPAC. |
| txs[].fee | int64 | The fee for the transaction in NanoPAC. |
| txs[].payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| txs[].transfer | PayloadTransfer | (OneOf)Transfer transaction payload. |
| txs[].transfer.sender | string | The sender's address. |
| txs[].transfer.receiver | string | The receiver's address. |
| txs[].transfer.amount | int64 | The amount to be transferred in NanoPAC. |
| txs[].bond | PayloadBond | (OneOf)Bond transaction payload. |
| txs[].bond.sender | string | The sender's address. |
| txs[].bond.receiver | string | The receiver's address. |
| txs[].bond.stake | int64 | The stake amount in NanoPAC. |
| txs[].bond.public_key | string | The public key of the validator. |
| txs[].bond.is_delegated | bool | Indicates whether the bond transaction is a delegation. |
| txs[].bond.delegate_owner | string | The address of the delegate owner. Optional, but required when registering a new validator with delegation.; |
| txs[].bond.delegate_share | int64 | The share percentage for the delegate owner. Optional, but required when registering a new validator with delegation.; Must be between 0 and 0.7 PAC in nano PAC. |
| txs[].bond.delegate_expiry | uint32 | The expiry height for the delegate relationship. Optional, but required when registering a new validator with delegation.; |
| txs[].sortition | PayloadSortition | (OneOf)Sortition transaction payload. |
| txs[].sortition.address | string | The validator address associated with the sortition proof. |
| txs[].sortition.proof | string | The proof for the sortition. |
| txs[].unbond | PayloadUnbond | (OneOf)Unbond transaction payload. |
| txs[].unbond.validator | string | The address of the validator to unbond from. |
| txs[].unbond.delegate_owner | string | The address of the delegate owner. Optional, but required when the validator is a delegated validator.; |
| txs[].withdraw | PayloadWithdraw | (OneOf)Withdraw transaction payload. |
| txs[].withdraw.validator_address | string | The address of the validator to withdraw from. |
| txs[].withdraw.account_address | string | The address of the account to withdraw to. |
| txs[].withdraw.amount | int64 | The withdrawal amount in NanoPAC. |
| txs[].batch_transfer | PayloadBatchTransfer | (OneOf)Batch Transfer transaction payload. |
| txs[].batch_transfer.sender | string | The sender's address. |
| txs[].batch_transfer.recipients | repeated Recipient | The list of recipients with their amounts. |
| txs[].memo | string | A memo string for the transaction. |
| txs[].public_key | string | The public key associated with the transaction. |
| txs[].signature | string | The signature for the transaction. |
| txs[].block_height | uint32 | The block height containing the transaction. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
| txs[].confirmed | bool | Indicates whether the transaction is confirmed. |
| txs[].confirmations | int32 | The number of blocks that have been added to the chain after this transaction was included in a block. A value of zero means the transaction is unconfirmed and may still in the transaction pool. |
Network Service
Network service provides RPCs for retrieving information about the network.
GetNetworkInfo
GetNetworkInfo retrieves information about the overall network.
GetNetworkInfoRequest Request
Request Message has no fields.GetNetworkInfoResponse Response
| Field | Type | Description |
| network_name | string | Name of the P2P network. |
| connected_peers_count | uint32 | Number of connected peers. |
| metric_info | MetricInfo | Metrics related to node activity. |
| metric_info.total_invalid | CounterInfo | Total number of invalid bundles. |
| metric_info.total_invalid.bytes | uint64 | Total number of bytes. |
| metric_info.total_invalid.bundles | uint64 | Total number of bundles. |
| metric_info.total_sent | CounterInfo | Total number of bundles sent. |
| metric_info.total_sent.bytes | uint64 | Total number of bytes. |
| metric_info.total_sent.bundles | uint64 | Total number of bundles. |
| metric_info.total_received | CounterInfo | Total number of bundles received. |
| metric_info.total_received.bytes | uint64 | Total number of bytes. |
| metric_info.total_received.bundles | uint64 | Total number of bundles. |
| metric_info.message_sent | map<int32, CounterInfo> | Number of sent bundles categorized by message type. |
| metric_info.message_received | map<int32, CounterInfo> | Number of received bundles categorized by message type. |
ListPeers
ListPeers lists all connected peers to this node.
ListPeersRequest Request
| Field | Type | Description |
| include_disconnected | bool | If true, includes disconnected peers (default: connected peers only). |
ListPeersResponse Response
| Field | Type | Description |
| peers | repeated PeerInfo | List of peers. |
| peers[].status | int32 | Current status of the peer (e.g., connected, disconnected). |
| peers[].moniker | string | Moniker or Human-Readable name of the peer. |
| peers[].agent | string | Version and agent details of the peer. |
| peers[].peer_id | string | Peer ID of the peer in P2P network. |
| peers[].consensus_keys | repeated string | List of consensus keys used by the peer. |
| peers[].consensus_addresses | repeated string | List of consensus addresses used by the peer. |
| peers[].services | uint32 | Bitfield representing the services provided by the peer. |
| peers[].last_block_hash | string | Hash of the last block the peer knows. |
| peers[].height | uint32 | Blockchain height of the peer. |
| peers[].last_sent | int64 | Unix timestamp of the last bundle sent to the peer (UTC). |
| peers[].last_received | int64 | Unix timestamp of the last bundle received from the peer (UTC). |
| peers[].address | string | Network address of the peer. |
| peers[].direction | Direction | (Enum)Connection direction (e.g., inbound, outbound). Available values:
|
| peers[].protocols | repeated string | List of protocols supported by the peer. |
| peers[].total_sessions | int32 | Total download sessions with the peer. |
| peers[].completed_sessions | int32 | Completed download sessions with the peer. |
| peers[].metric_info | MetricInfo | Metrics related to peer activity. |
| peers[].metric_info.total_invalid | CounterInfo | Total number of invalid bundles. |
| peers[].metric_info.total_sent | CounterInfo | Total number of bundles sent. |
| peers[].metric_info.total_received | CounterInfo | Total number of bundles received. |
| peers[].metric_info.message_sent | map<int32, CounterInfo> | Number of sent bundles categorized by message type. |
| peers[].metric_info.message_received | map<int32, CounterInfo> | Number of received bundles categorized by message type. |
| peers[].outbound_hello_sent | bool | Whether the hello message was sent from the outbound connection. |
GetNodeInfo
GetNodeInfo retrieves information about a specific node in the network.
GetNodeInfoRequest Request
Request Message has no fields.GetNodeInfoResponse Response
| Field | Type | Description |
| moniker | string | Moniker or Human-readable name identifying this node in the network. |
| agent | string | Version and agent details of the node. |
| peer_id | string | Peer ID of the node. |
| started_at | uint64 | Unix timestamp when the node was started (UTC). |
| reachability | string | Reachability status of the node. |
| services | int32 | Bitfield representing the services provided by the node. |
| services_names | string | Names of services provided by the node. |
| local_addrs | repeated string | List of addresses associated with the node. |
| protocols | repeated string | List of protocols supported by the node. |
| clock_offset | double | Offset between the node's clock and the network's clock (in seconds). |
| connection_info | ConnectionInfo | Information about the node's connections. |
| connection_info.connections | uint64 | Total number of connections. |
| connection_info.inbound_connections | uint64 | Number of inbound connections. |
| connection_info.outbound_connections | uint64 | Number of outbound connections. |
| zmq_publishers | repeated ZMQPublisherInfo | List of active ZeroMQ publishers. |
| zmq_publishers[].topic | string | The topic associated with the publisher. |
| zmq_publishers[].address | string | The address of the publisher. |
| zmq_publishers[].hwm | int32 | The high-water mark (HWM) for the publisher, indicating the maximum number of messages to queue before dropping older ones. |
| current_time | uint64 | Current Unix timestamp of the node (UTC). |
| network_name | string | Name of the P2P network. |
Ping
Ping provides a simple connectivity test and latency measurement.
PingRequest Request
Request Message has no fields.PingResponse Response
Response Message has no fields.Utils Service
Utils service defines RPC methods for utility functions such as message signing, verification, and other cryptographic operations.
SignMessageWithPrivateKey
SignMessageWithPrivateKey signs a message with the provided private key.
SignMessageWithPrivateKeyRequest Request
| Field | Type | Description |
| private_key | string | The private key to sign the message. |
| message | string | The message content to be signed. |
SignMessageWithPrivateKeyResponse Response
| Field | Type | Description |
| signature | string | The resulting signature in hexadecimal format. |
VerifyMessage
VerifyMessage verifies a signature against the public key and message.
VerifyMessageRequest Request
| Field | Type | Description |
| message | string | The original message content that was signed. |
| signature | string | The signature to verify in hexadecimal format. |
| public_key | string | The public key of the signer. |
VerifyMessageResponse Response
| Field | Type | Description |
| is_valid | bool | Boolean 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
| Field | Type | Description |
| public_keys | repeated string | List of BLS public keys to be aggregated. |
PublicKeyAggregationResponse Response
| Field | Type | Description |
| public_key | string | The aggregated BLS public key. |
| address | string | The blockchain address derived from the aggregated public key. |
SignatureAggregation
SignatureAggregation aggregates multiple BLS signatures into a single signature.
SignatureAggregationRequest Request
| Field | Type | Description |
| signatures | repeated string | List of BLS signatures to be aggregated. |
SignatureAggregationResponse Response
| Field | Type | Description |
| signature | string | The 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
| Field | Type | Description |
| wallet_name | string | The name for the new wallet. |
| password | string | Password to secure the new wallet. |
CreateWalletResponse Response
| Field | Type | Description |
| wallet_name | string | The name for the new wallet. |
| mnemonic | string | The mnemonic (seed phrase) for wallet recovery. |
RestoreWallet
RestoreWallet restores an existing wallet with the given mnemonic.
RestoreWalletRequest Request
| Field | Type | Description |
| wallet_name | string | The name for the restored wallet. |
| mnemonic | string | The mnemonic (seed phrase) for wallet recovery. |
| password | string | Password to secure the restored wallet. |
RestoreWalletResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the restored wallet. |
LoadWallet
LoadWallet loads an existing wallet with the given name. deprecated: It will be removed in a future version.
LoadWalletRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to load. |
LoadWalletResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the loaded wallet. |
UnloadWallet
UnloadWallet unloads a currently loaded wallet with the specified name. deprecated: It will be removed in a future version.
UnloadWalletRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to unload. |
UnloadWalletResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the unloaded wallet. |
ListWallets
ListWallets returns a list of all available wallets.
ListWalletsRequest Request
Request Message has no fields.ListWalletsResponse Response
| Field | Type | Description |
| wallets | repeated string | Array of wallet names. |
GetWalletInfo
GetWalletInfo returns detailed information about a specific wallet.
GetWalletInfoRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to query. |
GetWalletInfoResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet. |
| version | int32 | The wallet format version. |
| network | string | The network the wallet is connected to (e.g., mainnet, testnet). |
| encrypted | bool | Indicates if the wallet is encrypted. |
| uuid | string | A unique identifier of the wallet. |
| created_at | int64 | Unix timestamp of wallet creation. |
| default_fee | int64 | The default fee of the wallet. |
| driver | string | The storage driver used by the wallet (e.g., SQLite, Legacy JSON ). |
| path | string | Path to the wallet file or storage location. |
UpdatePassword
UpdatePassword updates the password of an existing wallet.
UpdatePasswordRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet whose password will be updated. |
| old_password | string | The current wallet password. |
| new_password | string | The new wallet password. |
UpdatePasswordResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet whose password was updated. |
GetTotalBalance
GetTotalBalance returns the total available balance of the wallet.
GetTotalBalanceRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to get the total balance. |
GetTotalBalanceResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the queried wallet. |
| total_balance | int64 | The total balance of the wallet in NanoPAC. |
GetTotalStake
GetTotalStake returns the total stake amount in the wallet.
GetTotalStakeRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to get the total stake. |
GetTotalStakeResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the queried wallet. |
| total_stake | int64 | The total stake amount in NanoPAC. |
GetValidatorAddress
GetValidatorAddress retrieves the validator address associated with a public key. Deprecated: Will move into utils.
GetValidatorAddressRequest Request
| Field | Type | Description |
| public_key | string | The public key of the validator. |
GetValidatorAddressResponse Response
| Field | Type | Description |
| address | string | The validator address associated with the public key. |
GetAddressInfo
GetAddressInfo returns detailed information about a specific address.
GetAddressInfoRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet containing the address. |
| address | string | The address to query. |
GetAddressInfoResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet containing the address. |
| addr | AddressInfo | Detailed information about the address. |
| addr.address | string | The address string. |
| addr.public_key | string | The public key associated with the address. |
| addr.label | string | A human-readable label associated with the address. |
| addr.path | string | The Hierarchical Deterministic (HD) path of the address within the wallet. |
| addr.address_type | AddressType | (Enum)The type of the address. Available values:
|
| addr.balance | int64 | The account balance in NanoPAC. For validator addresses, this field is zero. |
| addr.stake | int64 | The validator stake in NanoPAC. For non-validator addresses, this field is zero. |
SetAddressLabel
SetAddressLabel sets or updates the label for a given address.
SetAddressLabelRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet containing the address. |
| password | string | Wallet password required for modification. |
| address | string | The address to label. |
| label | string | The new label for the address. |
SetAddressLabelResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet where the address label was updated. |
| address | string | The address where the label was updated. |
| label | string | The new label for the address. |
GetNewAddress
GetNewAddress generates a new address for the specified wallet.
GetNewAddressRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to generate a new address. |
| address_type | AddressType | (Enum)The type of address to generate. Available values:
|
| label | string | A label for the new address. |
| password | string | Password for the new address. It's required when address_type is Ed25519 type. |
GetNewAddressResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet where address was generated. |
| addr | AddressInfo | Detailed information about the new address. |
| addr.address | string | The address string. |
| addr.public_key | string | The public key associated with the address. |
| addr.label | string | A human-readable label associated with the address. |
| addr.path | string | The Hierarchical Deterministic (HD) path of the address within the wallet. |
| addr.address_type | AddressType | (Enum)The type of the address. Available values:
|
| addr.balance | int64 | The account balance in NanoPAC. For validator addresses, this field is zero. |
| addr.stake | int64 | The validator stake in NanoPAC. For non-validator addresses, this field is zero. |
ListAddresses
ListAddresses returns all addresses in the specified wallet.
ListAddressesRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the queried wallet. |
| address_types | repeated AddressType | (Enum)Filter addresses by their types. If empty, all address types are included. Available values:
|
| include_balance | bool | Includes the balance of each address. |
| include_stake | bool | Includes the stake of each address. |
ListAddressesResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the queried wallet. |
| addrs | repeated AddressInfo | List of all addresses in the wallet with their details. |
| addrs[].address | string | The address string. |
| addrs[].public_key | string | The public key associated with the address. |
| addrs[].label | string | A human-readable label associated with the address. |
| addrs[].path | string | The Hierarchical Deterministic (HD) path of the address within the wallet. |
| addrs[].address_type | AddressType | (Enum)The type of the address. Available values:
|
| addrs[].balance | int64 | The account balance in NanoPAC. For validator addresses, this field is zero. |
| addrs[].stake | int64 | The validator stake in NanoPAC. For non-validator addresses, this field is zero. |
SignMessage
SignMessage signs an arbitrary message using a wallet's private key.
SignMessageRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to sign with. |
| password | string | Wallet password required for signing. |
| address | string | The address whose private key should be used for signing the message. |
| message | string | The arbitrary message to be signed. |
SignMessageResponse Response
| Field | Type | Description |
| signature | string | The signature in hexadecimal format. |
SignRawTransaction
SignRawTransaction signs a raw transaction for a specified wallet.
SignRawTransactionRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet used for signing. |
| raw_transaction | string | The raw transaction data to be signed. |
| password | string | Wallet password required for signing. |
SignRawTransactionResponse Response
| Field | Type | Description |
| transaction_id | string | The ID of the signed transaction. |
| signed_raw_transaction | string | The signed raw transaction data. |
ListTransactions
ListTransactions returns a list of transactions for a wallet, optionally filtered by a specific address, with pagination support.
ListTransactionsRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to query transactions for. |
| address | string | Optional: The address to filter transactions. If empty or set to '*', transactions for all addresses in the wallet are included. |
| direction | TxDirection | (Enum)Filter transactions by direction relative to the wallet.
Defaults to any direction if not set. Available values:
|
| count | int32 | Optional: The maximum number of transactions to return. Defaults to 10 if not set. |
| skip | int32 | Optional: The number of transactions to skip (for pagination). Defaults to 0 if not set. |
ListTransactionsResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet queried. |
| txs | repeated WalletTransactionInfo | List of transactions for the wallet, filtered by the specified address if provided. |
| txs[].no | int64 | A sequence number for the transaction in the wallet. |
| txs[].tx_id | string | The unique ID of the transaction. |
| txs[].sender | string | The sender's address. |
| txs[].receiver | string | The receiver's address. |
| txs[].direction | TxDirection | (Enum)The direction of the transaction relative to the wallet. Available values:
|
| txs[].amount | int64 | The amount involved in the transaction in NanoPAC. |
| txs[].fee | int64 | The transaction fee in NanoPAC. |
| txs[].memo | string | A memo string for the transaction. |
| txs[].status | TransactionStatus | (Enum)The current status of the transaction. Available values:
|
| txs[].block_height | uint32 | The block height containing the transaction. |
| txs[].payload_type | PayloadType | (Enum)The type of transaction payload. Available values:
|
| txs[].data | bytes | The raw transaction data. |
| txs[].comment | string | A comment associated with the transaction in the wallet. |
| txs[].created_at | int64 | Unix timestamp of when the transaction was created. |
| txs[].updated_at | int64 | Unix timestamp of when the transaction was last updated. |
SetDefaultFee
SetDefaultFee sets the default fee for the wallet.
SetDefaultFeeRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to set the default fee. |
| amount | int64 | The default fee amount in NanoPAC. |
SetDefaultFeeResponse Response
| Field | Type | Description |
| wallet_name | string | The name of the wallet where the default fee was updated. |
GetMnemonic
GetMnemonic returns the mnemonic (seed phrase) for the wallet.
GetMnemonicRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet to get the mnemonic. |
| password | string | Wallet password. |
GetMnemonicResponse Response
| Field | Type | Description |
| mnemonic | string | The mnemonic (seed phrase). |
GetPrivateKey
GetPrivateKey returns the private key for a given address.
GetPrivateKeyRequest Request
| Field | Type | Description |
| wallet_name | string | The name of the wallet containing the address. |
| password | string | Wallet password. |
| address | string | The address to get the private key. |
GetPrivateKeyResponse Response
| Field | Type | Description |
| private_key | string | The private key in hexadecimal format. |
| .proto Type | Go | C++ | Rust | Java | Python |
| double | float64 | double | f64 | double | float |
| float | float32 | float | f32 | float | float |
| int32 | int32 | int32 | i32 | int | int |
| int64 | int64 | int64 | i64 | long | int/long |
| uint32 | uint32 | uint32 | u32 | int | int/long |
| uint64 | uint64 | uint64 | u64 | long | int/long |
| sint32 | int32 | int32 | i32 | int | int |
| sint64 | int64 | int64 | i64 | long | int/long |
| fixed32 | uint32 | uint32 | u64 | int | int |
| fixed64 | uint64 | uint64 | u64 | long | int/long |
| sfixed32 | int32 | int32 | i32 | int | int |
| sfixed64 | int64 | int64 | i64 | long | int/long |
| bool | bool | bool | bool | boolean | boolean |
| string | string | string | String | String | str/unicode |
| bytes | []byte | string | Vec<u8> | ByteString | str |