All the amounts and values in gRPC endpoints 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.
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:- TRANSACTION_DATA = 0 (Request transaction data only.)
- TRANSACTION_INFO = 1 (Request detailed transaction information.)
|
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. |
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:- UNKNOWN = 0 (Unknown payload type.)
- TRANSFER_PAYLOAD = 1 (Transfer payload type.)
- BOND_PAYLOAD = 2 (Bond payload type.)
- SORTITION_PAYLOAD = 3 (Sortition payload type.)
- UNBOND_PAYLOAD = 4 (Unbond payload type.)
- WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
|
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.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.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.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. |
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:- UNKNOWN = 0 (Unknown payload type.)
- TRANSFER_PAYLOAD = 1 (Transfer payload type.)
- BOND_PAYLOAD = 2 (Bond payload type.)
- SORTITION_PAYLOAD = 3 (Sortition payload type.)
- UNBOND_PAYLOAD = 4 (Unbond payload type.)
- WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
|
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. |
GetRawTransaction
GetRawTransaction retrieves raw details of transfer, bond, unbond or withdraw transaction.
GetRawTransactionRequest Request
Field | Type | Description |
lock_time | uint32 | The lock time for the transaction. If not set, defaults to the last block height. |
memo | string | A memo string for the transaction. |
fee | int64 | The fee for the transaction in NanoPAC. |
transfer | PayloadTransfer | (OneOf) |
bond | PayloadBond | (OneOf) |
unbond | PayloadUnbond | (OneOf) |
withdraw | PayloadWithdraw | (OneOf) |
GetRawTransactionResponse Response
Field | Type | Description |
raw_transaction | string | The raw transaction data. |
id | string | The unique ID of the transaction. |
GetRawTransferTransaction
Deprecated: GetRawTransferTransaction retrieves raw details of a transfer transaction.
Use GetRawTransaction instead.
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. |
id | string | The unique ID of the transaction. |
GetRawBondTransaction
Deprecated: GetRawBondTransaction retrieves raw details of a bond transaction.
Use GetRawTransaction instead.
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. |
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. |
id | string | The unique ID of the transaction. |
GetRawUnbondTransaction
Deprecated: GetRawUnbondTransaction retrieves raw details of an unbond transaction.
Use GetRawTransaction instead.
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. |
GetRawTransactionResponse Response
Field | Type | Description |
raw_transaction | string | The raw transaction data. |
id | string | The unique ID of the transaction. |
GetRawWithdrawTransaction
Deprecated: GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
Use GetRawTransaction instead.
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. |
id | string | The unique ID of the transaction. |
Blockchain Service
Blockchain service defines RPC methods for interacting with the blockchain.
GetBlock
GetBlock retrieves information about a block based on the provided request
parameters.
GetBlockRequest Request
Field | Type | Description |
height | uint32 | The height of the block to retrieve. |
verbosity | BlockVerbosity | (Enum)The verbosity level for block information. Available values:- BLOCK_DATA = 0 (Request only block data.)
- BLOCK_INFO = 1 (Request block information and transaction IDs.)
- BLOCK_TRANSACTIONS = 2 (Request block information and detailed transaction data.)
|
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_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_TRANSACTIONS. |
txs[].id | string | The unique ID of the transaction. |
txs[].data | string | The raw transaction data. |
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:- UNKNOWN = 0 (Unknown payload type.)
- TRANSFER_PAYLOAD = 1 (Transfer payload type.)
- BOND_PAYLOAD = 2 (Bond payload type.)
- SORTITION_PAYLOAD = 3 (Sortition payload type.)
- UNBOND_PAYLOAD = 4 (Unbond payload type.)
- WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
|
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[].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[].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[].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. |
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
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. |
total_accounts | int32 | The total number of accounts in the blockchain. |
total_validators | int32 | The total number of validators in the blockchain. |
total_power | int64 | The total power of the blockchain. |
committee_power | int64 | The power of the committee. |
committee_validators | repeated 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 | int32 | The unique number assigned to the validator. |
committee_validators[].stake | int64 | The stake of the validator in NanoPAC. |
committee_validators[].last_bonding_height | uint32 | The height at which the validator last bonded. |
committee_validators[].last_sortition_height | uint32 | The height at which the validator last participated in sortition. |
committee_validators[].unbonding_height | uint32 | The height at which the validator will unbond. |
committee_validators[].address | string | The address of the validator. |
committee_validators[].availability_score | double | The availability score of the validator. |
is_pruned | bool | If the blocks are subject to pruning. |
pruning_height | uint32 | Lowest-height block stored (only present if pruning is enabled) |
last_block_time | int64 | Timestamp of the last block in Unix format |
GetConsensusInfo
GetConsensusInfo retrieves information about the consensus instances.
GetConsensusInfoRequest Request
Message has no fields.
GetConsensusInfoResponse Response
Field | Type | Description |
proposal | Proposal | 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_data | string | The signature data of the proposal. |
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:- VOTE_UNKNOWN = 0 (Unknown vote type.)
- VOTE_PREPARE = 1 (Prepare vote type.)
- VOTE_PRECOMMIT = 2 (Precommit vote type.)
- VOTE_CHANGE_PROPOSER = 3 (Change proposer 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 | 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. |
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. |
GetValidatorAddresses
GetValidatorAddresses retrieves a list of all validator addresses.
GetValidatorAddressesRequest 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:- UNKNOWN = 0 (Unknown payload type.)
- TRANSFER_PAYLOAD = 1 (Transfer payload type.)
- BOND_PAYLOAD = 2 (Bond payload type.)
- SORTITION_PAYLOAD = 3 (Sortition payload type.)
- UNBOND_PAYLOAD = 4 (Unbond payload type.)
- WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
|
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. |
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:- UNKNOWN = 0 (Unknown payload type.)
- TRANSFER_PAYLOAD = 1 (Transfer payload type.)
- BOND_PAYLOAD = 2 (Bond payload type.)
- SORTITION_PAYLOAD = 3 (Sortition payload type.)
- UNBOND_PAYLOAD = 4 (Unbond payload type.)
- WITHDRAW_PAYLOAD = 5 (Withdraw payload type.)
|
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[].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[].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[].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.
GetNetworkInfo
GetNetworkInfo retrieves information about the overall network.
GetNetworkInfoRequest Request
Field | Type | Description |
only_connected | bool | If true, only returns peers with connected status. |
GetNetworkInfoResponse Response
Field | Type | Description |
network_name | string | Name of the network. |
total_sent_bytes | int64 | Total bytes sent across the network. |
total_received_bytes | int64 | Total bytes received across the network. |
connected_peers_count | uint32 | Number of connected peers. |
connected_peers | repeated PeerInfo | List of connected peers. |
connected_peers[].status | int32 | Status of the peer. |
connected_peers[].moniker | string | Moniker of the peer. |
connected_peers[].agent | string | Agent information of the peer. |
connected_peers[].peer_id | string | Peer ID of the peer. |
connected_peers[].consensus_keys | repeated string | Consensus keys used by the peer. |
connected_peers[].consensus_addresses | repeated string | Consensus addresses of the peer. |
connected_peers[].services | uint32 | Services provided by the peer. |
connected_peers[].last_block_hash | string | Hash of the last block the peer knows. |
connected_peers[].height | uint32 | Blockchain height of the peer. |
connected_peers[].received_bundles | int32 | Number of received bundles. |
connected_peers[].invalid_bundles | int32 | Number of invalid bundles received. |
connected_peers[].last_sent | int64 | Timestamp of the last sent bundle. |
connected_peers[].last_received | int64 | Timestamp of the last received bundle. |
connected_peers[].sent_bytes | map<int32, int64> | Bytes sent per message type. |
connected_peers[].received_bytes | map<int32, int64> | Bytes received per message type. |
connected_peers[].address | string | Network address of the peer. |
connected_peers[].direction | string | Direction of connection with the peer. |
connected_peers[].protocols | repeated string | List of protocols supported by the peer. |
connected_peers[].total_sessions | int32 | Total download sessions with the peer. |
connected_peers[].completed_sessions | int32 | Completed download sessions with the peer. |
sent_bytes | map<int32, int64> | Bytes sent per peer ID. |
received_bytes | map<int32, int64> | Bytes received per peer ID. |
GetNodeInfo
GetNodeInfo retrieves information about a specific node in the network.
GetNodeInfoRequest Request
Message has no fields.
GetNodeInfoResponse Response
Field | Type | Description |
moniker | string | Moniker of the node. |
agent | string | Agent information of the node. |
peer_id | string | Peer ID of the node. |
started_at | uint64 | Timestamp when the node started. |
reachability | string | Reachability status of the node. |
services | int32 | A bitfield indicating 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 | Clock offset of the node. |
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. |
Utils Service
Utils service defines RPC methods for utility functions such as message
signing and verification.
SignMessageWithPrivateKey
SignMessageWithPrivateKey sign message with provided private key.
SignMessageWithPrivateKeyRequest Request
Field | Type | Description |
private_key | string | The private key to sign the message. |
message | string | The message to sign. |
SignMessageWithPrivateKeyResponse Response
Field | Type | Description |
signature | string | The signature of the message. |
VerifyMessage
VerifyMessage verify signature with public key and message
VerifyMessageRequest Request
Field | Type | Description |
message | string | The signed message. |
signature | string | The signature of the message. |
public_key | string | The public key of the signer. |
VerifyMessageResponse Response
Field | Type | Description |
is_valid | bool | Indicates if the signature is valid (true) or not (false). |
Wallet Service
Define the Wallet service with various RPC methods for wallet management.
CreateWallet
CreateWallet creates a new wallet with the specified parameters.
CreateWalletRequest Request
Field | Type | Description |
wallet_name | string | The name of the new wallet. |
password | string | The password for securing the wallet. |
CreateWalletResponse Response
Field | Type | Description |
mnemonic | string | The mnemonic for wallet recovery. |
RestoreWallet
RestoreWallet restores an existing wallet with the given mnemonic.
RestoreWalletRequest Request
Field | Type | Description |
wallet_name | string | The name of the wallet to restore. |
mnemonic | string | The mnemonic for wallet recovery. |
password | string | The password for securing the 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.
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.
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. |
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 wallet. |
total_balance | int64 | The total balance of the wallet in NanoPAC. |
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 | The password for unlocking the wallet 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. |
GetValidatorAddress
GetValidatorAddress retrieves the validator address associated with a
public key.
GetValidatorAddressRequest Request
Field | Type | Description |
public_key | string | The public key for which the validator address is requested. |
GetValidatorAddressResponse Response
Field | Type | Description |
address | string | The validator address associated with the public key. |
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:- ADDRESS_TYPE_TREASURY = 0 (Treasury address type.
Should not be used to generate new addresses.)
- ADDRESS_TYPE_VALIDATOR = 1 (Validator address type.)
- 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 ADDRESS_TYPE_ED25519_ACCOUNT. |
GetNewAddressResponse Response
Field | Type | Description |
wallet_name | string | The name of the wallet from which the address is generated. |
address_info | AddressInfo | Information about the newly generated 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 label associated with the address. |
address_info.path | string | The Hierarchical Deterministic path of the address within the wallet. |
GetAddressHistory
GetAddressHistory retrieves the transaction history of an address.
GetAddressHistoryRequest Request
Field | Type | Description |
wallet_name | string | The name of the wallet. |
address | string | The address to retrieve the transaction history for. |
GetAddressHistoryResponse Response
Field | Type | Description |
history_info | repeated HistoryInfo | Array of history information for the address. |
history_info[].transaction_id | string | The transaction ID hash. |
history_info[].time | uint32 | The timestamp of the transaction. |
history_info[].payload_type | string | The payload type of the transaction. |
history_info[].description | string | A description of the transaction. |
history_info[].amount | int64 | The amount involved in the transaction. |
SignMessage
SignMessage signs an arbitrary message.
SignMessageRequest Request
Field | Type | Description |
wallet_name | string | The name of the wallet. |
password | string | The password for unlocking the wallet for signing. |
address | string | The account address associated with the private key. |
message | string | The arbitrary message to be signed. |
SignMessageResponse Response
Field | Type | Description |
signature | string | Signature of the message. |
Scalar Value Types
.proto Type | Go | C++ | Rust | Java | Python | C# |
double | float64 | double | f64 | double | float | double |
float | float32 | float | f32 | float | float | float |
int32 | int32 | int32 | i32 | int | int | int |
int64 | int64 | int64 | i64 | long | int/long | long |
uint32 | uint32 | uint32 | u32 | int | int/long | uint |
uint64 | uint64 | uint64 | u64 | long | int/long | ulong |
sint32 | int32 | int32 | i32 | int | int | int |
sint64 | int64 | int64 | i64 | long | int/long | long |
fixed32 | uint32 | uint32 | u64 | int | int | uint |
fixed64 | uint64 | uint64 | u64 | long | int/long | ulong |
sfixed32 | int32 | int32 | i32 | int | int | int |
sfixed64 | int64 | int64 | i64 | long | int/long | long |
bool | bool | bool | bool | boolean | boolean | bool |
string | string | string | String | String | str/unicode | string |
bytes | []byte | string | Vec | ByteString | str | ByteString |