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.
Transaction Service
Transaction service defines various RPC methods for interacting with transactions.
pactus.transaction.get_transaction
GetTransaction retrieves transaction details based on the provided request parameters.
Parameters
Field | Type | Description |
id | string | The unique ID of the transaction to retrieve. |
verbosity | numeric | (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.)
|
Result
Field | Type | Description |
block_height | numeric | The height of the block containing the transaction. |
block_time | numeric | The UNIX timestamp of the block containing the transaction. |
transaction | object (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 | numeric | The version of the transaction. |
transaction.lock_time | numeric | The lock time for the transaction. |
transaction.value | numeric | The value of the transaction in NanoPAC. |
transaction.fee | numeric | The fee for the transaction in NanoPAC. |
transaction.payload_type | numeric | (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.transfer | object (PayloadTransfer) | (OneOf)Transfer transaction payload. |
transaction.transfer.sender | string | The sender's address. |
transaction.transfer.receiver | string | The receiver's address. |
transaction.transfer.amount | numeric | The amount to be transferred in NanoPAC. |
transaction.bond | object (PayloadBond) | (OneOf)Bond transaction payload. |
transaction.bond.sender | string | The sender's address. |
transaction.bond.receiver | string | The receiver's address. |
transaction.bond.stake | numeric | The stake amount in NanoPAC. |
transaction.bond.public_key | string | The public key of the validator. |
transaction.sortition | object (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 | object (PayloadUnbond) | (OneOf)Unbond transaction payload. |
transaction.unbond.validator | string | The address of the validator to unbond from. |
transaction.withdraw | object (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 | numeric | The withdrawal amount in NanoPAC. |
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. |
pactus.transaction.calculate_fee
CalculateFee calculates the transaction fee based on the specified amount and payload type.
Parameters
Field | Type | Description |
amount | numeric | The amount involved in the transaction, specified in NanoPAC. |
payload_type | numeric | (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_amount | boolean | Indicates if the amount should be fixed and include the fee. |
Result
Field | Type | Description |
amount | numeric | The calculated amount in NanoPAC. |
fee | numeric | The calculated transaction fee in NanoPAC. |
pactus.transaction.broadcast_transaction
BroadcastTransaction broadcasts a signed transaction to the network.
Parameters
Field | Type | Description |
signed_raw_transaction | string | The signed raw transaction data to be broadcasted. |
Result
Field | Type | Description |
id | string | The unique ID of the broadcasted transaction. |
pactus.transaction.get_raw_transfer_transaction
GetRawTransferTransaction retrieves raw details of a transfer transaction.
Parameters
Field | Type | Description |
lock_time | numeric | 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 | numeric | The amount to be transferred, specified in NanoPAC. Must be greater than 0. |
fee | numeric | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
memo | string | A memo string for the transaction. |
Result
Field | Type | Description |
raw_transaction | string | The raw transaction data in hexadecimal format. |
id | string | The unique ID of the transaction. |
pactus.transaction.get_raw_bond_transaction
GetRawBondTransaction retrieves raw details of a bond transaction.
Parameters
Field | Type | Description |
lock_time | numeric | 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 | numeric | The stake amount in NanoPAC. Must be greater than 0. |
public_key | string | The public key of the validator. |
fee | numeric | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
memo | string | A memo string for the transaction. |
Result
Field | Type | Description |
raw_transaction | string | The raw transaction data in hexadecimal format. |
id | string | The unique ID of the transaction. |
pactus.transaction.get_raw_unbond_transaction
GetRawUnbondTransaction retrieves raw details of an unbond transaction.
Parameters
Field | Type | Description |
lock_time | numeric | 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. |
Result
Field | Type | Description |
raw_transaction | string | The raw transaction data in hexadecimal format. |
id | string | The unique ID of the transaction. |
pactus.transaction.get_raw_withdraw_transaction
GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
Parameters
Field | Type | Description |
lock_time | numeric | 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 | numeric | The withdrawal amount in NanoPAC. Must be greater than 0. |
fee | numeric | The transaction fee in NanoPAC. If not set, it is set to the estimated fee. |
memo | string | A memo string for the transaction. |
Result
Field | Type | Description |
raw_transaction | string | The raw transaction data in hexadecimal format. |
id | string | The unique ID of the transaction. |
pactus.transaction.decode_raw_transaction
DecodeRawTransaction accepts raw transaction and returns decoded transaction.
Parameters
Field | Type | Description |
raw_transaction | string | The raw transaction data in hexadecimal format. |
Result
Field | Type | Description |
transaction | object (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 | numeric | The version of the transaction. |
transaction.lock_time | numeric | The lock time for the transaction. |
transaction.value | numeric | The value of the transaction in NanoPAC. |
transaction.fee | numeric | The fee for the transaction in NanoPAC. |
transaction.payload_type | numeric | (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.transfer | object (PayloadTransfer) | (OneOf)Transfer transaction payload. |
transaction.transfer.sender | string | The sender's address. |
transaction.transfer.receiver | string | The receiver's address. |
transaction.transfer.amount | numeric | The amount to be transferred in NanoPAC. |
transaction.bond | object (PayloadBond) | (OneOf)Bond transaction payload. |
transaction.bond.sender | string | The sender's address. |
transaction.bond.receiver | string | The receiver's address. |
transaction.bond.stake | numeric | The stake amount in NanoPAC. |
transaction.bond.public_key | string | The public key of the validator. |
transaction.sortition | object (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 | object (PayloadUnbond) | (OneOf)Unbond transaction payload. |
transaction.unbond.validator | string | The address of the validator to unbond from. |
transaction.withdraw | object (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 | numeric | The withdrawal amount in NanoPAC. |
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. |
Blockchain Service
Blockchain service defines RPC methods for interacting with the blockchain.
pactus.blockchain.get_block
GetBlock retrieves information about a block based on the provided request parameters.
Parameters
Field | Type | Description |
height | numeric | The height of the block to retrieve. |
verbosity | numeric | (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.)
|
Result
Field | Type | Description |
height | numeric | 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_DATA. |
block_time | numeric | The timestamp of the block. |
header | object (BlockHeaderInfo) | Header information of the block. |
header.version | numeric | 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 | object (CertificateInfo) | Certificate information of the previous block. |
prev_cert.hash | string | The hash of the certificate. |
prev_cert.round | numeric | The round of the certificate. |
prev_cert.committers | repeated numeric | List of committers in the certificate. |
prev_cert.absentees | repeated numeric | List of absentees in the certificate. |
prev_cert.signature | string | The signature of the certificate. |
txs | repeated object (TransactionInfo) | List of transactions in the block, available when verbosity level is set to
BLOCK_TRANSACTIONS. |
txs[].id | string | The unique ID of the transaction. |
txs[].data | string | The raw transaction data in hexadecimal format. |
txs[].version | numeric | The version of the transaction. |
txs[].lock_time | numeric | The lock time for the transaction. |
txs[].value | numeric | The value of the transaction in NanoPAC. |
txs[].fee | numeric | The fee for the transaction in NanoPAC. |
txs[].payload_type | numeric | (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[].transfer | object (PayloadTransfer) | (OneOf)Transfer transaction payload. |
txs[].transfer.sender | string | The sender's address. |
txs[].transfer.receiver | string | The receiver's address. |
txs[].transfer.amount | numeric | The amount to be transferred in NanoPAC. |
txs[].bond | object (PayloadBond) | (OneOf)Bond transaction payload. |
txs[].bond.sender | string | The sender's address. |
txs[].bond.receiver | string | The receiver's address. |
txs[].bond.stake | numeric | The stake amount in NanoPAC. |
txs[].bond.public_key | string | The public key of the validator. |
txs[].sortition | object (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 | object (PayloadUnbond) | (OneOf)Unbond transaction payload. |
txs[].unbond.validator | string | The address of the validator to unbond from. |
txs[].withdraw | object (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 | numeric | The withdrawal amount in NanoPAC. |
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. |
pactus.blockchain.get_block_hash
GetBlockHash retrieves the hash of a block at the specified height.
Parameters
Field | Type | Description |
height | numeric | The height of the block to retrieve the hash for. |
Result
Field | Type | Description |
hash | string | The hash of the block. |
pactus.blockchain.get_block_height
GetBlockHeight retrieves the height of a block with the specified hash.
Parameters
Field | Type | Description |
hash | string | The hash of the block to retrieve the height for. |
Result
Field | Type | Description |
height | numeric | The height of the block. |
pactus.blockchain.get_blockchain_info
GetBlockchainInfo retrieves general information about the blockchain.
Parameters
Parameters has no fields.
Result
Field | Type | Description |
last_block_height | numeric | The height of the last block in the blockchain. |
last_block_hash | string | The hash of the last block in the blockchain. |
total_accounts | numeric | The total number of accounts in the blockchain. |
total_validators | numeric | The total number of validators in the blockchain. |
total_power | numeric | The total power of the blockchain. |
committee_power | numeric | The power of the committee. |
committee_validators | repeated object (ValidatorInfo) | List of committee validators. |
committee_validators[].hash | string | The hash of the validator. |
committee_validators[].data | string | The serialized data of the validator. |
committee_validators[].public_key | string | The public key of the validator. |
committee_validators[].number | numeric | The unique number assigned to the validator. |
committee_validators[].stake | numeric | The stake of the validator in NanoPAC. |
committee_validators[].last_bonding_height | numeric | The height at which the validator last bonded. |
committee_validators[].last_sortition_height | numeric | The height at which the validator last participated in sortition. |
committee_validators[].unbonding_height | numeric | The height at which the validator will unbond. |
committee_validators[].address | string | The address of the validator. |
committee_validators[].availability_score | numeric | The availability score of the validator. |
is_pruned | boolean | If the blocks are subject to pruning. |
pruning_height | numeric | Lowest-height block stored (only present if pruning is enabled) |
last_block_time | numeric | Timestamp of the last block in Unix format |
pactus.blockchain.get_consensus_info
GetConsensusInfo retrieves information about the consensus instances.
Parameters
Parameters has no fields.
Result
Field | Type | Description |
proposal | object (ProposalInfo) | The proposal of the consensus info. |
proposal.height | numeric | The height of the proposal. |
proposal.round | numeric | 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 object (ConsensusInfo) | List of consensus instances. |
instances[].address | string | The address of the consensus instance. |
instances[].active | boolean | Indicates whether the consensus instance is active and part of the committee. |
instances[].height | numeric | The height of the consensus instance. |
instances[].round | numeric | The round of the consensus instance. |
instances[].votes | repeated object (VoteInfo) | List of votes in the consensus instance. |
instances[].votes[].type | numeric | (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[].voter | string | The address of the voter. |
instances[].votes[].block_hash | string | The hash of the block being voted on. |
instances[].votes[].round | numeric | The consensus round of the vote. |
instances[].votes[].cp_round | numeric | The change-proposer round of the vote. |
instances[].votes[].cp_value | numeric | The change-proposer value of the vote. |
pactus.blockchain.get_account
GetAccount retrieves information about an account based on the provided address.
Parameters
Field | Type | Description |
address | string | The address of the account to retrieve information for. |
Result
Field | Type | Description |
account | object (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 | numeric | The unique number assigned to the account. |
account.balance | numeric | The balance of the account in NanoPAC. |
account.address | string | The address of the account. |
pactus.blockchain.get_validator
GetValidator retrieves information about a validator based on the provided address.
Parameters
Field | Type | Description |
address | string | The address of the validator to retrieve information for. |
Result
Field | Type | Description |
validator | object (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 | numeric | The unique number assigned to the validator. |
validator.stake | numeric | The stake of the validator in NanoPAC. |
validator.last_bonding_height | numeric | The height at which the validator last bonded. |
validator.last_sortition_height | numeric | The height at which the validator last participated in sortition. |
validator.unbonding_height | numeric | The height at which the validator will unbond. |
validator.address | string | The address of the validator. |
validator.availability_score | numeric | The availability score of the validator. |
pactus.blockchain.get_validator_by_number
GetValidatorByNumber retrieves information about a validator based on the provided number.
Parameters
Field | Type | Description |
number | numeric | The unique number of the validator to retrieve information for. |
Result
Field | Type | Description |
validator | object (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 | numeric | The unique number assigned to the validator. |
validator.stake | numeric | The stake of the validator in NanoPAC. |
validator.last_bonding_height | numeric | The height at which the validator last bonded. |
validator.last_sortition_height | numeric | The height at which the validator last participated in sortition. |
validator.unbonding_height | numeric | The height at which the validator will unbond. |
validator.address | string | The address of the validator. |
validator.availability_score | numeric | The availability score of the validator. |
pactus.blockchain.get_validator_addresses
GetValidatorAddresses retrieves a list of all validator addresses.
Parameters
Parameters has no fields.
Result
Field | Type | Description |
addresses | repeated string | List of validator addresses. |
pactus.blockchain.get_public_key
GetPublicKey retrieves the public key of an account based on the provided address.
Parameters
Field | Type | Description |
address | string | The address for which to retrieve the public key. |
Result
Field | Type | Description |
public_key | string | The public key associated with the provided address. |
pactus.blockchain.get_tx_pool_content
GetTxPoolContent retrieves current transactions in the transaction pool.
Parameters
Field | Type | Description |
payload_type | numeric | (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.)
|
Result
Field | Type | Description |
txs | repeated object (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 | numeric | The version of the transaction. |
txs[].lock_time | numeric | The lock time for the transaction. |
txs[].value | numeric | The value of the transaction in NanoPAC. |
txs[].fee | numeric | The fee for the transaction in NanoPAC. |
txs[].payload_type | numeric | (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[].transfer | object (PayloadTransfer) | (OneOf)Transfer transaction payload. |
txs[].transfer.sender | string | The sender's address. |
txs[].transfer.receiver | string | The receiver's address. |
txs[].transfer.amount | numeric | The amount to be transferred in NanoPAC. |
txs[].bond | object (PayloadBond) | (OneOf)Bond transaction payload. |
txs[].bond.sender | string | The sender's address. |
txs[].bond.receiver | string | The receiver's address. |
txs[].bond.stake | numeric | The stake amount in NanoPAC. |
txs[].bond.public_key | string | The public key of the validator. |
txs[].sortition | object (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 | object (PayloadUnbond) | (OneOf)Unbond transaction payload. |
txs[].unbond.validator | string | The address of the validator to unbond from. |
txs[].withdraw | object (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 | numeric | The withdrawal amount in NanoPAC. |
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. |
Network Service
Network service provides RPCs for retrieving information about the network.
pactus.network.get_network_info
GetNetworkInfo retrieves information about the overall network.
Parameters
Field | Type | Description |
only_connected | boolean | If true, returns only peers that are currently connected. |
Result
Field | Type | Description |
network_name | string | Name of the network. |
connected_peers_count | numeric | Number of connected peers. |
connected_peers | repeated object (PeerInfo) | List of connected peers. |
connected_peers[].status | numeric | Current status of the peer (e.g., connected, disconnected). |
connected_peers[].moniker | string | Moniker or Human-Readable name of the peer. |
connected_peers[].agent | string | Version and agent details of the peer. |
connected_peers[].peer_id | string | Peer ID of the peer in P2P network. |
connected_peers[].consensus_keys | repeated string | List of consensus keys used by the peer. |
connected_peers[].consensus_addresses | repeated string | List of consensus addresses used by the peer. |
connected_peers[].services | numeric | Bitfield representing the services provided by the peer. |
connected_peers[].last_block_hash | string | Hash of the last block the peer knows. |
connected_peers[].height | numeric | Blockchain height of the peer. |
connected_peers[].last_sent | numeric | Time the last bundle sent to the peer (in epoch format). |
connected_peers[].last_received | numeric | Time the last bundle received from the peer (in epoch format). |
connected_peers[].address | string | Network address of the peer. |
connected_peers[].direction | string | Connection direction (e.g., inbound, outbound). |
connected_peers[].protocols | repeated string | List of protocols supported by the peer. |
connected_peers[].total_sessions | numeric | Total download sessions with the peer. |
connected_peers[].completed_sessions | numeric | Completed download sessions with the peer. |
connected_peers[].metric_info | object (MetricInfo) | Metrics related to peer activity. |
connected_peers[].metric_info.total_invalid | object (CounterInfo) | Total number of invalid bundles. |
connected_peers[].metric_info.total_sent | object (CounterInfo) | Total number of bundles sent. |
connected_peers[].metric_info.total_received | object (CounterInfo) | Total number of bundles received. |
connected_peers[].metric_info.message_sent | map<int32, CounterInfo> | Number of sent bundles categorized by message type. |
connected_peers[].metric_info.message_received | map<int32, CounterInfo> | Number of received bundles categorized by message type. |
metric_info | object (MetricInfo) | Metrics related to node activity. |
metric_info.total_invalid | object (CounterInfo) | Total number of invalid bundles. |
metric_info.total_invalid.bytes | numeric | Total number of bytes. |
metric_info.total_invalid.bundles | numeric | Total number of bundles. |
metric_info.total_sent | object (CounterInfo) | Total number of bundles sent. |
metric_info.total_sent.bytes | numeric | Total number of bytes. |
metric_info.total_sent.bundles | numeric | Total number of bundles. |
metric_info.total_received | object (CounterInfo) | Total number of bundles received. |
metric_info.total_received.bytes | numeric | Total number of bytes. |
metric_info.total_received.bundles | numeric | 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. |
pactus.network.get_node_info
GetNodeInfo retrieves information about a specific node in the network.
Parameters
Parameters has no fields.
Result
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 | numeric | Time the node was started (in epoch format). |
reachability | string | Reachability status of the node. |
services | numeric | 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 | numeric | Offset between the node's clock and the network's clock (in seconds). |
connection_info | object (ConnectionInfo) | Information about the node's connections. |
connection_info.connections | numeric | Total number of connections. |
connection_info.inbound_connections | numeric | Number of inbound connections. |
connection_info.outbound_connections | numeric | Number of outbound connections. |
zmq_publishers | repeated object (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 | numeric | The 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.
pactus.utils.sign_message_with_private_key
SignMessageWithPrivateKey signs a message with the provided private key.
Parameters
Field | Type | Description |
private_key | string | The private key to sign the message. |
message | string | The message content to be signed. |
Result
Field | Type | Description |
signature | string | The resulting signature in hexadecimal format. |
pactus.utils.verify_message
VerifyMessage verifies a signature against the public key and message.
Parameters
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. |
Result
Field | Type | Description |
is_valid | boolean | Boolean indicating whether the signature is valid for the given message and public key. |
pactus.utils.public_key_aggregation
PublicKeyAggregation aggregates multiple BLS public keys into a single key.
Parameters
Field | Type | Description |
public_keys | repeated string | List of BLS public keys to be aggregated. |
Result
Field | Type | Description |
public_key | string | The aggregated BLS public key. |
address | string | The blockchain address derived from the aggregated public key. |
pactus.utils.signature_aggregation
SignatureAggregation aggregates multiple BLS signatures into a single signature.
Parameters
Field | Type | Description |
signatures | repeated string | List of BLS signatures to be aggregated. |
Result
Field | Type | Description |
signature | string | The aggregated BLS signature in hexadecimal format. |
Wallet Service
Wallet service provides RPC methods for wallet management operations.
pactus.wallet.create_wallet
CreateWallet creates a new wallet with the specified parameters.
Parameters
Field | Type | Description |
wallet_name | string | The name for the new wallet. |
password | string | Password to secure the new wallet. |
Result
Field | Type | Description |
mnemonic | string | The mnemonic (seed phrase) for wallet recovery. |
pactus.wallet.restore_wallet
RestoreWallet restores an existing wallet with the given mnemonic.
Parameters
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. |
Result
Field | Type | Description |
wallet_name | string | The name of the restored wallet. |
pactus.wallet.load_wallet
LoadWallet loads an existing wallet with the given name.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to load. |
Result
Field | Type | Description |
wallet_name | string | The name of the loaded wallet. |
pactus.wallet.unload_wallet
UnloadWallet unloads a currently loaded wallet with the specified name.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to unload. |
Result
Field | Type | Description |
wallet_name | string | The name of the unloaded wallet. |
pactus.wallet.get_total_balance
GetTotalBalance returns the total available balance of the wallet.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to get the total balance. |
Result
Field | Type | Description |
wallet_name | string | The name of the queried wallet. |
total_balance | numeric | The total balance of the wallet in NanoPAC. |
pactus.wallet.sign_raw_transaction
SignRawTransaction signs a raw transaction for a specified wallet.
Parameters
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. |
Result
Field | Type | Description |
transaction_id | string | The ID of the signed transaction. |
signed_raw_transaction | string | The signed raw transaction data. |
pactus.wallet.get_validator_address
GetValidatorAddress retrieves the validator address associated with a public key.
Parameters
Field | Type | Description |
public_key | string | The public key of the validator. |
Result
Field | Type | Description |
address | string | The validator address associated with the public key. |
pactus.wallet.get_new_address
GetNewAddress generates a new address for the specified wallet.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to generate a new address. |
address_type | numeric | (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.)
|
label | string | A label for the new address. |
password | string | Password for the new address. It's required when address_type is Ed25519 type. |
Result
Field | Type | Description |
wallet_name | string | The name of the wallet where address was generated. |
address_info | object (AddressInfo) | Detailed information about the new address. |
address_info.address | string | The address string. |
address_info.public_key | string | The public key associated with the address. |
address_info.label | string | A human-readable label associated with the address. |
address_info.path | string | The Hierarchical Deterministic (HD) path of the address within the wallet. |
pactus.wallet.get_address_history
GetAddressHistory retrieves the transaction history of an address.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet containing the address. |
address | string | The address to retrieve history for. |
Result
Field | Type | Description |
history_info | repeated object (HistoryInfo) | List of all historical transactions associated with the address. |
history_info[].transaction_id | string | The transaction ID in hexadecimal format. |
history_info[].time | numeric | Unix timestamp of when the transaction was confirmed. |
history_info[].payload_type | string | The type of transaction payload. |
history_info[].description | string | Human-readable description of the transaction. |
history_info[].amount | numeric | The transaction amount in NanoPAC. |
pactus.wallet.sign_message
SignMessage signs an arbitrary message using a wallet's private key.
Parameters
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. |
Result
Field | Type | Description |
signature | string | The signature in hexadecimal format. |
pactus.wallet.get_total_stake
GetTotalStake returns the total stake amount in the wallet.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to get the total stake. |
Result
Field | Type | Description |
wallet_name | string | The name of the queried wallet. |
total_stake | numeric | The total stake amount in NanoPAC. |
pactus.wallet.get_address_info
GetAddressInfo returns detailed information about a specific address.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet containing the address. |
address | string | The address to query. |
Result
Field | Type | Description |
wallet_name | string | The name of the wallet containing the address. |
address | string | The queried address. |
label | string | The address label. |
public_key | string | The public key of the address. |
path | string | The Hierarchical Deterministic (HD) path of the address. |
pactus.wallet.set_address_label
SetAddressLabel sets or updates the label for a given address.
Parameters
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. |
Result
pactus.wallet.list_wallet
ListWallet returns list of all available wallets.
Parameters
Parameters has no fields.
Result
Field | Type | Description |
wallets | repeated string | Array of wallet names. |
pactus.wallet.get_wallet_info
GetWalletInfo returns detailed information about a specific wallet.
Parameters
Field | Type | Description |
wallet_name | string | The name of the wallet to query. |
Result
Field | Type | Description |
wallet_name | string | The name of the wallet to query. |
version | numeric | The wallet format version. |
network | string | The network the wallet is connected to (e.g., mainnet, testnet). |
encrypted | boolean | Indicates if the wallet is encrypted. |
uuid | string | A unique identifier of the wallet. |
created_at | numeric | Unix timestamp of wallet creation. |
pactus.wallet.list_address
ListAddress returns all addresses in the specified wallet.
Parameters
Field | Type | Description |
wallet_name | string | The name of the queried wallet. |
Result
Field | Type | Description |
wallet_name | string | The name of the queried wallet. |
data | repeated object (AddressInfo) | ist of all addresses in the wallet with their details. |
data[].address | string | The address string. |
data[].public_key | string | The public key associated with the address. |
data[].label | string | A human-readable label associated with the address. |
data[].path | string | The Hierarchical Deterministic (HD) path of the address within the wallet. |