pactus-jsonrpc 1.9.1 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -4,7 +4,7 @@ import _ from "lodash";
4
4
  import { MethodCallValidator, MethodNotFoundError, parseOpenRPCDocument, } from "@open-rpc/schema-utils-js";
5
5
  export class PactusOpenRPC {
6
6
  rpc;
7
- static openrpcDocument = { "openrpc": "1.2.1", "info": { "title": "Pactus OpenRPC", "version": "1.2.1" }, "methods": [{ "name": "pactus.transaction.get_transaction", "description": "GetTransaction retrieves transaction details based on the provided request parameters.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "id", "description": "The unique ID of the transaction to retrieve.", "schema": { "type": "string" } }, { "name": "verbosity", "description": "The verbosity level for transaction details.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "block_height": { "type": "integer" }, "block_time": { "type": "integer" }, "transaction": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } }, { "name": "pactus.transaction.calculate_fee", "description": "CalculateFee calculates the transaction fee based on the specified amount and payload type.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "amount", "description": "The amount involved in the transaction, specified in NanoPAC.", "schema": { "type": "integer" } }, { "name": "payload_type", "description": "The type of transaction payload.", "schema": { "type": "integer" } }, { "name": "fixed_amount", "description": "Indicates if the amount should be fixed and include the fee.", "schema": { "type": "boolean" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "amount": { "type": "integer" }, "fee": { "type": "integer" } } } } }, { "name": "pactus.transaction.broadcast_transaction", "description": "BroadcastTransaction broadcasts a signed transaction to the network.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "signed_raw_transaction", "description": "The signed raw transaction data to be broadcasted.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_transfer_transaction", "description": "GetRawTransferTransaction retrieves raw details of a transfer transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "receiver", "description": "The receiver's account address.", "schema": { "type": "string" } }, { "name": "amount", "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_bond_transaction", "description": "GetRawBondTransaction retrieves raw details of a bond transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "receiver", "description": "The receiver's validator address.", "schema": { "type": "string" } }, { "name": "stake", "description": "The stake amount in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "public_key", "description": "The public key of the validator.", "schema": { "type": "string" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_unbond_transaction", "description": "GetRawUnbondTransaction retrieves raw details of an unbond transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "validator_address", "description": "The address of the validator to unbond from.", "schema": { "type": "string" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_withdraw_transaction", "description": "GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "validator_address", "description": "The address of the validator to withdraw from.", "schema": { "type": "string" } }, { "name": "account_address", "description": "The address of the account to withdraw to.", "schema": { "type": "string" } }, { "name": "amount", "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_batch_transfer_transaction", "description": "GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "recipients", "description": "The recipients list of receiver with amount, min 2 recipients.", "schema": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.decode_raw_transaction", "description": "DecodeRawTransaction accepts raw transaction and returns decoded transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "raw_transaction", "description": "The raw transaction data in hexadecimal format.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "transaction": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } }, { "name": "pactus.blockchain.get_block", "description": "GetBlock retrieves information about a block based on the provided request parameters.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "height", "description": "The height of the block to retrieve.", "schema": { "type": "integer" } }, { "name": "verbosity", "description": "The verbosity level for block information.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "height": { "type": "integer" }, "hash": { "type": "string" }, "data": { "type": "string" }, "block_time": { "type": "integer" }, "header": { "type": "object", "properties": { "version": { "type": "integer" }, "prev_block_hash": { "type": "string" }, "state_root": { "type": "string" }, "sortition_seed": { "type": "string" }, "proposer_address": { "type": "string" } } }, "prev_cert": { "type": "object", "properties": { "hash": { "type": "string" }, "round": { "type": "integer" }, "committers": { "type": "array", "items": { "type": "integer" } }, "absentees": { "type": "array", "items": { "type": "integer" } }, "signature": { "type": "string" } } }, "txs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } } }, { "name": "pactus.blockchain.get_block_hash", "description": "GetBlockHash retrieves the hash of a block at the specified height.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "height", "description": "The height of the block to retrieve the hash for.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "hash": { "type": "string" } } } } }, { "name": "pactus.blockchain.get_block_height", "description": "GetBlockHeight retrieves the height of a block with the specified hash.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "hash", "description": "The hash of the block to retrieve the height for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "height": { "type": "integer" } } } } }, { "name": "pactus.blockchain.get_blockchain_info", "description": "GetBlockchainInfo retrieves general information about the blockchain.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "last_block_height": { "type": "integer" }, "last_block_hash": { "type": "string" }, "total_accounts": { "type": "integer" }, "total_validators": { "type": "integer" }, "total_power": { "type": "integer" }, "committee_power": { "type": "integer" }, "committee_validators": { "type": "array", "items": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } }, "is_pruned": { "type": "boolean" }, "pruning_height": { "type": "integer" }, "last_block_time": { "type": "integer" }, "committee_protocol_versions": { "type": "array", "items": { "type": "object", "properties": {} } } } } } }, { "name": "pactus.blockchain.get_consensus_info", "description": "GetConsensusInfo retrieves information about the consensus instances.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "proposal": { "type": "object", "properties": { "height": { "type": "integer" }, "round": { "type": "integer" }, "block_data": { "type": "string" }, "signature": { "type": "string" } } }, "instances": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "active": { "type": "boolean" }, "height": { "type": "integer" }, "round": { "type": "integer" }, "votes": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "integer" }, "voter": { "type": "string" }, "block_hash": { "type": "string" }, "round": { "type": "integer" }, "cp_round": { "type": "integer" }, "cp_value": { "type": "integer" } } } } } } } } } } }, { "name": "pactus.blockchain.get_account", "description": "GetAccount retrieves information about an account based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address of the account to retrieve information for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "account": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "number": { "type": "integer" }, "balance": { "type": "integer" }, "address": { "type": "string" } } } } } } }, { "name": "pactus.blockchain.get_validator", "description": "GetValidator retrieves information about a validator based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address of the validator to retrieve information for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "validator": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } } } } }, { "name": "pactus.blockchain.get_validator_by_number", "description": "GetValidatorByNumber retrieves information about a validator based on the provided number.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "number", "description": "The unique number of the validator to retrieve information for.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "validator": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } } } } }, { "name": "pactus.blockchain.get_validator_addresses", "description": "GetValidatorAddresses retrieves a list of all validator addresses.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string" } } } } } }, { "name": "pactus.blockchain.get_public_key", "description": "GetPublicKey retrieves the public key of an account based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address for which to retrieve the public key.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "public_key": { "type": "string" } } } } }, { "name": "pactus.blockchain.get_tx_pool_content", "description": "GetTxPoolContent retrieves current transactions in the transaction pool.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "payload_type", "description": "The type of transactions to retrieve from the transaction pool. 0 means all types.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "txs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } } }, { "name": "pactus.network.get_network_info", "description": "GetNetworkInfo retrieves information about the overall network.", "tags": [{ "name": "network" }], "paramStructure": "by-name", "params": [{ "name": "only_connected", "description": "If true, returns only peers that are currently connected.", "schema": { "type": "boolean" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "network_name": { "type": "string" }, "connected_peers_count": { "type": "integer" }, "connected_peers": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "integer" }, "moniker": { "type": "string" }, "agent": { "type": "string" }, "peer_id": { "type": "string" }, "consensus_keys": { "type": "array", "items": { "type": "string" } }, "consensus_addresses": { "type": "array", "items": { "type": "string" } }, "services": { "type": "integer" }, "last_block_hash": { "type": "string" }, "height": { "type": "integer" }, "last_sent": { "type": "integer" }, "last_received": { "type": "integer" }, "address": { "type": "string" }, "direction": { "type": "integer" }, "protocols": { "type": "array", "items": { "type": "string" } }, "total_sessions": { "type": "integer" }, "completed_sessions": { "type": "integer" }, "metric_info": { "type": "object", "properties": { "total_invalid": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_sent": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_received": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "message_sent": { "type": "array", "items": { "type": "object", "properties": {} } }, "message_received": { "type": "array", "items": { "type": "object", "properties": {} } } } }, "outbound_hello_sent": { "type": "boolean" } } } }, "metric_info": { "type": "object", "properties": { "total_invalid": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_sent": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_received": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "message_sent": { "type": "array", "items": { "type": "object", "properties": {} } }, "message_received": { "type": "array", "items": { "type": "object", "properties": {} } } } } } } } }, { "name": "pactus.network.get_node_info", "description": "GetNodeInfo retrieves information about a specific node in the network.", "tags": [{ "name": "network" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "moniker": { "type": "string" }, "agent": { "type": "string" }, "peer_id": { "type": "string" }, "started_at": { "type": "integer" }, "reachability": { "type": "string" }, "services": { "type": "integer" }, "services_names": { "type": "string" }, "local_addrs": { "type": "array", "items": { "type": "string" } }, "protocols": { "type": "array", "items": { "type": "string" } }, "clock_offset": { "type": "number" }, "connection_info": { "type": "object", "properties": { "connections": { "type": "integer" }, "inbound_connections": { "type": "integer" }, "outbound_connections": { "type": "integer" } } }, "zmq_publishers": { "type": "array", "items": { "type": "object", "properties": { "topic": { "type": "string" }, "address": { "type": "string" }, "hwm": { "type": "integer" } } } }, "current_time": { "type": "integer" } } } } }, { "name": "pactus.utils.sign_message_with_private_key", "description": "SignMessageWithPrivateKey signs a message with the provided private key.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "private_key", "description": "The private key to sign the message.", "schema": { "type": "string" } }, { "name": "message", "description": "The message content to be signed.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.utils.verify_message", "description": "VerifyMessage verifies a signature against the public key and message.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "message", "description": "The original message content that was signed.", "schema": { "type": "string" } }, { "name": "signature", "description": "The signature to verify in hexadecimal format.", "schema": { "type": "string" } }, { "name": "public_key", "description": "The public key of the signer.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "is_valid": { "type": "boolean" } } } } }, { "name": "pactus.utils.public_key_aggregation", "description": "PublicKeyAggregation aggregates multiple BLS public keys into a single key.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "public_keys", "description": "List of BLS public keys to be aggregated.", "schema": { "type": "array", "items": { "type": "string" } } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "public_key": { "type": "string" }, "address": { "type": "string" } } } } }, { "name": "pactus.utils.signature_aggregation", "description": "SignatureAggregation aggregates multiple BLS signatures into a single signature.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "signatures", "description": "List of BLS signatures to be aggregated.", "schema": { "type": "array", "items": { "type": "string" } } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.wallet.create_wallet", "description": "CreateWallet creates a new wallet with the specified parameters.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name for the new wallet.", "schema": { "type": "string" } }, { "name": "password", "description": "Password to secure the new wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "mnemonic": { "type": "string" } } } } }, { "name": "pactus.wallet.restore_wallet", "description": "RestoreWallet restores an existing wallet with the given mnemonic.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name for the restored wallet.", "schema": { "type": "string" } }, { "name": "mnemonic", "description": "The mnemonic (seed phrase) for wallet recovery.", "schema": { "type": "string" } }, { "name": "password", "description": "Password to secure the restored wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.load_wallet", "description": "LoadWallet loads an existing wallet with the given name.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to load.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.unload_wallet", "description": "UnloadWallet unloads a currently loaded wallet with the specified name.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to unload.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.get_total_balance", "description": "GetTotalBalance returns the total available balance of the wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to get the total balance.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "total_balance": { "type": "integer" } } } } }, { "name": "pactus.wallet.sign_raw_transaction", "description": "SignRawTransaction signs a raw transaction for a specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet used for signing.", "schema": { "type": "string" } }, { "name": "raw_transaction", "description": "The raw transaction data to be signed.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for signing.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "transaction_id": { "type": "string" }, "signed_raw_transaction": { "type": "string" } } } } }, { "name": "pactus.wallet.get_validator_address", "description": "GetValidatorAddress retrieves the validator address associated with a public key.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "public_key", "description": "The public key of the validator.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "address": { "type": "string" } } } } }, { "name": "pactus.wallet.get_new_address", "description": "GetNewAddress generates a new address for the specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to generate a new address.", "schema": { "type": "string" } }, { "name": "address_type", "description": "The type of address to generate.", "schema": { "type": "integer" } }, { "name": "label", "description": "A label for the new address.", "schema": { "type": "string" } }, { "name": "password", "description": "Password for the new address. It's required when address_type is Ed25519 type.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "address_info": { "type": "object", "properties": { "address": { "type": "string" }, "public_key": { "type": "string" }, "label": { "type": "string" }, "path": { "type": "string" } } } } } } }, { "name": "pactus.wallet.get_address_history", "description": "GetAddressHistory retrieves the transaction history of an address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to retrieve history for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "history_info": { "type": "array", "items": { "type": "object", "properties": { "transaction_id": { "type": "string" }, "time": { "type": "integer" }, "payload_type": { "type": "string" }, "description": { "type": "string" }, "amount": { "type": "integer" } } } } } } } }, { "name": "pactus.wallet.sign_message", "description": "SignMessage signs an arbitrary message using a wallet's private key.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to sign with.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for signing.", "schema": { "type": "string" } }, { "name": "address", "description": "The address whose private key should be used for signing the message.", "schema": { "type": "string" } }, { "name": "message", "description": "The arbitrary message to be signed.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.wallet.get_total_stake", "description": "GetTotalStake returns the total stake amount in the wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to get the total stake.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "total_stake": { "type": "integer" } } } } }, { "name": "pactus.wallet.get_address_info", "description": "GetAddressInfo returns detailed information about a specific address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to query.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "address": { "type": "string" }, "label": { "type": "string" }, "public_key": { "type": "string" }, "path": { "type": "string" } } } } }, { "name": "pactus.wallet.set_address_label", "description": "SetAddressLabel sets or updates the label for a given address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for modification.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to label.", "schema": { "type": "string" } }, { "name": "label", "description": "The new label for the address.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": {} } } }, { "name": "pactus.wallet.list_wallet", "description": "ListWallet returns list of all available wallets.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallets": { "type": "array", "items": { "type": "string" } } } } } }, { "name": "pactus.wallet.get_wallet_info", "description": "GetWalletInfo returns detailed information about a specific wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to query.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "version": { "type": "integer" }, "network": { "type": "string" }, "encrypted": { "type": "boolean" }, "uuid": { "type": "string" }, "created_at": { "type": "integer" } } } } }, { "name": "pactus.wallet.list_address", "description": "ListAddress returns all addresses in the specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the queried wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "public_key": { "type": "string" }, "label": { "type": "string" }, "path": { "type": "string" } } } } } } } }] };
7
+ static openrpcDocument = { "openrpc": "1.2.1", "info": { "title": "Pactus OpenRPC", "version": "1.2.1" }, "methods": [{ "name": "pactus.transaction.get_transaction", "description": "GetTransaction retrieves transaction details based on the provided request parameters.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "id", "description": "The unique ID of the transaction to retrieve.", "schema": { "type": "string" } }, { "name": "verbosity", "description": "The verbosity level for transaction details.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "block_height": { "type": "integer" }, "block_time": { "type": "integer" }, "transaction": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } }, { "name": "pactus.transaction.calculate_fee", "description": "CalculateFee calculates the transaction fee based on the specified amount and payload type.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "amount", "description": "The amount involved in the transaction, specified in NanoPAC.", "schema": { "type": "integer" } }, { "name": "payload_type", "description": "The type of transaction payload.", "schema": { "type": "integer" } }, { "name": "fixed_amount", "description": "Indicates if the amount should be fixed and include the fee.", "schema": { "type": "boolean" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "amount": { "type": "integer" }, "fee": { "type": "integer" } } } } }, { "name": "pactus.transaction.broadcast_transaction", "description": "BroadcastTransaction broadcasts a signed transaction to the network.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "signed_raw_transaction", "description": "The signed raw transaction data to be broadcasted.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_transfer_transaction", "description": "GetRawTransferTransaction retrieves raw details of a transfer transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "receiver", "description": "The receiver's account address.", "schema": { "type": "string" } }, { "name": "amount", "description": "The amount to be transferred, specified in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_bond_transaction", "description": "GetRawBondTransaction retrieves raw details of a bond transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "receiver", "description": "The receiver's validator address.", "schema": { "type": "string" } }, { "name": "stake", "description": "The stake amount in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "public_key", "description": "The public key of the validator.", "schema": { "type": "string" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_unbond_transaction", "description": "GetRawUnbondTransaction retrieves raw details of an unbond transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "validator_address", "description": "The address of the validator to unbond from.", "schema": { "type": "string" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_withdraw_transaction", "description": "GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "validator_address", "description": "The address of the validator to withdraw from.", "schema": { "type": "string" } }, { "name": "account_address", "description": "The address of the account to withdraw to.", "schema": { "type": "string" } }, { "name": "amount", "description": "The withdrawal amount in NanoPAC. Must be greater than 0.", "schema": { "type": "integer" } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.get_raw_batch_transfer_transaction", "description": "GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "lock_time", "description": "The lock time for the transaction. If not set, defaults to the last block height.", "schema": { "type": "integer" } }, { "name": "sender", "description": "The sender's account address.", "schema": { "type": "string" } }, { "name": "recipients", "description": "The recipients list of receiver with amount, min 2 recipients.", "schema": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } }, { "name": "fee", "description": "The transaction fee in NanoPAC. If not set, it is set to the estimated fee.", "schema": { "type": "integer" } }, { "name": "memo", "description": "A memo string for the transaction.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "raw_transaction": { "type": "string" }, "id": { "type": "string" } } } } }, { "name": "pactus.transaction.decode_raw_transaction", "description": "DecodeRawTransaction accepts raw transaction and returns decoded transaction.", "tags": [{ "name": "transaction" }], "paramStructure": "by-name", "params": [{ "name": "raw_transaction", "description": "The raw transaction data in hexadecimal format.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "transaction": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } }, { "name": "pactus.blockchain.get_block", "description": "GetBlock retrieves information about a block based on the provided request parameters.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "height", "description": "The height of the block to retrieve.", "schema": { "type": "integer" } }, { "name": "verbosity", "description": "The verbosity level for block information.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "height": { "type": "integer" }, "hash": { "type": "string" }, "data": { "type": "string" }, "block_time": { "type": "integer" }, "header": { "type": "object", "properties": { "version": { "type": "integer" }, "prev_block_hash": { "type": "string" }, "state_root": { "type": "string" }, "sortition_seed": { "type": "string" }, "proposer_address": { "type": "string" } } }, "prev_cert": { "type": "object", "properties": { "hash": { "type": "string" }, "round": { "type": "integer" }, "committers": { "type": "array", "items": { "type": "integer" } }, "absentees": { "type": "array", "items": { "type": "integer" } }, "signature": { "type": "string" } } }, "txs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } } }, { "name": "pactus.blockchain.get_block_hash", "description": "GetBlockHash retrieves the hash of a block at the specified height.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "height", "description": "The height of the block to retrieve the hash for.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "hash": { "type": "string" } } } } }, { "name": "pactus.blockchain.get_block_height", "description": "GetBlockHeight retrieves the height of a block with the specified hash.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "hash", "description": "The hash of the block to retrieve the height for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "height": { "type": "integer" } } } } }, { "name": "pactus.blockchain.get_blockchain_info", "description": "GetBlockchainInfo retrieves general information about the blockchain.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "last_block_height": { "type": "integer" }, "last_block_hash": { "type": "string" }, "total_accounts": { "type": "integer" }, "total_validators": { "type": "integer" }, "total_power": { "type": "integer" }, "committee_power": { "type": "integer" }, "committee_validators": { "type": "array", "items": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } }, "is_pruned": { "type": "boolean" }, "pruning_height": { "type": "integer" }, "last_block_time": { "type": "integer" }, "committee_protocol_versions": { "type": "object" } } } } }, { "name": "pactus.blockchain.get_consensus_info", "description": "GetConsensusInfo retrieves information about the consensus instances.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "proposal": { "type": "object", "properties": { "height": { "type": "integer" }, "round": { "type": "integer" }, "block_data": { "type": "string" }, "signature": { "type": "string" } } }, "instances": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "active": { "type": "boolean" }, "height": { "type": "integer" }, "round": { "type": "integer" }, "votes": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "integer" }, "voter": { "type": "string" }, "block_hash": { "type": "string" }, "round": { "type": "integer" }, "cp_round": { "type": "integer" }, "cp_value": { "type": "integer" } } } } } } } } } } }, { "name": "pactus.blockchain.get_account", "description": "GetAccount retrieves information about an account based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address of the account to retrieve information for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "account": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "number": { "type": "integer" }, "balance": { "type": "integer" }, "address": { "type": "string" } } } } } } }, { "name": "pactus.blockchain.get_validator", "description": "GetValidator retrieves information about a validator based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address of the validator to retrieve information for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "validator": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } } } } }, { "name": "pactus.blockchain.get_validator_by_number", "description": "GetValidatorByNumber retrieves information about a validator based on the provided number.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "number", "description": "The unique number of the validator to retrieve information for.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "validator": { "type": "object", "properties": { "hash": { "type": "string" }, "data": { "type": "string" }, "public_key": { "type": "string" }, "number": { "type": "integer" }, "stake": { "type": "integer" }, "last_bonding_height": { "type": "integer" }, "last_sortition_height": { "type": "integer" }, "unbonding_height": { "type": "integer" }, "address": { "type": "string" }, "availability_score": { "type": "number" }, "protocol_version": { "type": "integer" } } } } } } }, { "name": "pactus.blockchain.get_validator_addresses", "description": "GetValidatorAddresses retrieves a list of all validator addresses.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "addresses": { "type": "array", "items": { "type": "string" } } } } } }, { "name": "pactus.blockchain.get_public_key", "description": "GetPublicKey retrieves the public key of an account based on the provided address.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "address", "description": "The address for which to retrieve the public key.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "public_key": { "type": "string" } } } } }, { "name": "pactus.blockchain.get_tx_pool_content", "description": "GetTxPoolContent retrieves current transactions in the transaction pool.", "tags": [{ "name": "blockchain" }], "paramStructure": "by-name", "params": [{ "name": "payload_type", "description": "The type of transactions to retrieve from the transaction pool. 0 means all types.", "schema": { "type": "integer" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "txs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "data": { "type": "string" }, "version": { "type": "integer" }, "lock_time": { "type": "integer" }, "value": { "type": "integer" }, "fee": { "type": "integer" }, "payload_type": { "type": "integer" }, "transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "amount": { "type": "integer" } } }, "bond": { "type": "object", "properties": { "sender": { "type": "string" }, "receiver": { "type": "string" }, "stake": { "type": "integer" }, "public_key": { "type": "string" } } }, "sortition": { "type": "object", "properties": { "address": { "type": "string" }, "proof": { "type": "string" } } }, "unbond": { "type": "object", "properties": { "validator": { "type": "string" } } }, "withdraw": { "type": "object", "properties": { "validator_address": { "type": "string" }, "account_address": { "type": "string" }, "amount": { "type": "integer" } } }, "batch_transfer": { "type": "object", "properties": { "sender": { "type": "string" }, "recipients": { "type": "array", "items": { "type": "object", "properties": { "receiver": { "type": "string" }, "amount": { "type": "integer" } } } } } }, "memo": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } } } } } } } }, { "name": "pactus.network.get_network_info", "description": "GetNetworkInfo retrieves information about the overall network.", "tags": [{ "name": "network" }], "paramStructure": "by-name", "params": [{ "name": "only_connected", "description": "If true, returns only peers that are currently connected.", "schema": { "type": "boolean" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "network_name": { "type": "string" }, "connected_peers_count": { "type": "integer" }, "connected_peers": { "type": "array", "items": { "type": "object", "properties": { "status": { "type": "integer" }, "moniker": { "type": "string" }, "agent": { "type": "string" }, "peer_id": { "type": "string" }, "consensus_keys": { "type": "array", "items": { "type": "string" } }, "consensus_addresses": { "type": "array", "items": { "type": "string" } }, "services": { "type": "integer" }, "last_block_hash": { "type": "string" }, "height": { "type": "integer" }, "last_sent": { "type": "integer" }, "last_received": { "type": "integer" }, "address": { "type": "string" }, "direction": { "type": "integer" }, "protocols": { "type": "array", "items": { "type": "string" } }, "total_sessions": { "type": "integer" }, "completed_sessions": { "type": "integer" }, "metric_info": { "type": "object", "properties": { "total_invalid": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_sent": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_received": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "message_sent": { "type": "object" }, "message_received": { "type": "object" } } }, "outbound_hello_sent": { "type": "boolean" } } } }, "metric_info": { "type": "object", "properties": { "total_invalid": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_sent": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "total_received": { "type": "object", "properties": { "bytes": { "type": "integer" }, "bundles": { "type": "integer" } } }, "message_sent": { "type": "object" }, "message_received": { "type": "object" } } } } } } }, { "name": "pactus.network.get_node_info", "description": "GetNodeInfo retrieves information about a specific node in the network.", "tags": [{ "name": "network" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "moniker": { "type": "string" }, "agent": { "type": "string" }, "peer_id": { "type": "string" }, "started_at": { "type": "integer" }, "reachability": { "type": "string" }, "services": { "type": "integer" }, "services_names": { "type": "string" }, "local_addrs": { "type": "array", "items": { "type": "string" } }, "protocols": { "type": "array", "items": { "type": "string" } }, "clock_offset": { "type": "number" }, "connection_info": { "type": "object", "properties": { "connections": { "type": "integer" }, "inbound_connections": { "type": "integer" }, "outbound_connections": { "type": "integer" } } }, "zmq_publishers": { "type": "array", "items": { "type": "object", "properties": { "topic": { "type": "string" }, "address": { "type": "string" }, "hwm": { "type": "integer" } } } }, "current_time": { "type": "integer" } } } } }, { "name": "pactus.utils.sign_message_with_private_key", "description": "SignMessageWithPrivateKey signs a message with the provided private key.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "private_key", "description": "The private key to sign the message.", "schema": { "type": "string" } }, { "name": "message", "description": "The message content to be signed.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.utils.verify_message", "description": "VerifyMessage verifies a signature against the public key and message.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "message", "description": "The original message content that was signed.", "schema": { "type": "string" } }, { "name": "signature", "description": "The signature to verify in hexadecimal format.", "schema": { "type": "string" } }, { "name": "public_key", "description": "The public key of the signer.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "is_valid": { "type": "boolean" } } } } }, { "name": "pactus.utils.public_key_aggregation", "description": "PublicKeyAggregation aggregates multiple BLS public keys into a single key.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "public_keys", "description": "List of BLS public keys to be aggregated.", "schema": { "type": "array", "items": { "type": "string" } } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "public_key": { "type": "string" }, "address": { "type": "string" } } } } }, { "name": "pactus.utils.signature_aggregation", "description": "SignatureAggregation aggregates multiple BLS signatures into a single signature.", "tags": [{ "name": "utils" }], "paramStructure": "by-name", "params": [{ "name": "signatures", "description": "List of BLS signatures to be aggregated.", "schema": { "type": "array", "items": { "type": "string" } } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.wallet.create_wallet", "description": "CreateWallet creates a new wallet with the specified parameters.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name for the new wallet.", "schema": { "type": "string" } }, { "name": "password", "description": "Password to secure the new wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "mnemonic": { "type": "string" } } } } }, { "name": "pactus.wallet.restore_wallet", "description": "RestoreWallet restores an existing wallet with the given mnemonic.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name for the restored wallet.", "schema": { "type": "string" } }, { "name": "mnemonic", "description": "The mnemonic (seed phrase) for wallet recovery.", "schema": { "type": "string" } }, { "name": "password", "description": "Password to secure the restored wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.load_wallet", "description": "LoadWallet loads an existing wallet with the given name.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to load.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.unload_wallet", "description": "UnloadWallet unloads a currently loaded wallet with the specified name.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to unload.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" } } } } }, { "name": "pactus.wallet.get_total_balance", "description": "GetTotalBalance returns the total available balance of the wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to get the total balance.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "total_balance": { "type": "integer" } } } } }, { "name": "pactus.wallet.sign_raw_transaction", "description": "SignRawTransaction signs a raw transaction for a specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet used for signing.", "schema": { "type": "string" } }, { "name": "raw_transaction", "description": "The raw transaction data to be signed.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for signing.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "transaction_id": { "type": "string" }, "signed_raw_transaction": { "type": "string" } } } } }, { "name": "pactus.wallet.get_validator_address", "description": "GetValidatorAddress retrieves the validator address associated with a public key.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "public_key", "description": "The public key of the validator.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "address": { "type": "string" } } } } }, { "name": "pactus.wallet.get_new_address", "description": "GetNewAddress generates a new address for the specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to generate a new address.", "schema": { "type": "string" } }, { "name": "address_type", "description": "The type of address to generate.", "schema": { "type": "integer" } }, { "name": "label", "description": "A label for the new address.", "schema": { "type": "string" } }, { "name": "password", "description": "Password for the new address. It's required when address_type is Ed25519 type.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "address_info": { "type": "object", "properties": { "address": { "type": "string" }, "public_key": { "type": "string" }, "label": { "type": "string" }, "path": { "type": "string" } } } } } } }, { "name": "pactus.wallet.get_address_history", "description": "GetAddressHistory retrieves the transaction history of an address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to retrieve history for.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "history_info": { "type": "array", "items": { "type": "object", "properties": { "transaction_id": { "type": "string" }, "time": { "type": "integer" }, "payload_type": { "type": "string" }, "description": { "type": "string" }, "amount": { "type": "integer" } } } } } } } }, { "name": "pactus.wallet.sign_message", "description": "SignMessage signs an arbitrary message using a wallet's private key.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to sign with.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for signing.", "schema": { "type": "string" } }, { "name": "address", "description": "The address whose private key should be used for signing the message.", "schema": { "type": "string" } }, { "name": "message", "description": "The arbitrary message to be signed.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "signature": { "type": "string" } } } } }, { "name": "pactus.wallet.get_total_stake", "description": "GetTotalStake returns the total stake amount in the wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to get the total stake.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "total_stake": { "type": "integer" } } } } }, { "name": "pactus.wallet.get_address_info", "description": "GetAddressInfo returns detailed information about a specific address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to query.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "address": { "type": "string" }, "label": { "type": "string" }, "public_key": { "type": "string" }, "path": { "type": "string" } } } } }, { "name": "pactus.wallet.set_address_label", "description": "SetAddressLabel sets or updates the label for a given address.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet containing the address.", "schema": { "type": "string" } }, { "name": "password", "description": "Wallet password required for modification.", "schema": { "type": "string" } }, { "name": "address", "description": "The address to label.", "schema": { "type": "string" } }, { "name": "label", "description": "The new label for the address.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": {} } } }, { "name": "pactus.wallet.list_wallet", "description": "ListWallet returns list of all available wallets.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallets": { "type": "array", "items": { "type": "string" } } } } } }, { "name": "pactus.wallet.get_wallet_info", "description": "GetWalletInfo returns detailed information about a specific wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the wallet to query.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "version": { "type": "integer" }, "network": { "type": "string" }, "encrypted": { "type": "boolean" }, "uuid": { "type": "string" }, "created_at": { "type": "integer" } } } } }, { "name": "pactus.wallet.list_address", "description": "ListAddress returns all addresses in the specified wallet.", "tags": [{ "name": "wallet" }], "paramStructure": "by-name", "params": [{ "name": "wallet_name", "description": "The name of the queried wallet.", "schema": { "type": "string" } }], "result": { "name": "fields", "schema": { "type": "object", "properties": { "wallet_name": { "type": "string" }, "data": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "public_key": { "type": "string" }, "label": { "type": "string" }, "path": { "type": "string" } } } } } } } }] };
8
8
  dereffedDocument;
9
9
  transport;
10
10
  validator;
@@ -134,294 +134,294 @@ export class PactusOpenRPC {
134
134
  return this.rpc.request({ method: methodName, params: rpcParams }, this.timeout);
135
135
  }
136
136
  /**
137
- *
137
+ * GetTransaction retrieves transaction details based on the provided request parameters.
138
138
  */
139
139
  // tslint:disable-next-line:max-line-length
140
140
  pactusTransactionGetTransaction = (...params) => {
141
141
  return this.request("pactus.transaction.get_transaction", params);
142
142
  };
143
143
  /**
144
- *
144
+ * CalculateFee calculates the transaction fee based on the specified amount and payload type.
145
145
  */
146
146
  // tslint:disable-next-line:max-line-length
147
147
  pactusTransactionCalculateFee = (...params) => {
148
148
  return this.request("pactus.transaction.calculate_fee", params);
149
149
  };
150
150
  /**
151
- *
151
+ * BroadcastTransaction broadcasts a signed transaction to the network.
152
152
  */
153
153
  // tslint:disable-next-line:max-line-length
154
154
  pactusTransactionBroadcastTransaction = (...params) => {
155
155
  return this.request("pactus.transaction.broadcast_transaction", params);
156
156
  };
157
157
  /**
158
- *
158
+ * GetRawTransferTransaction retrieves raw details of a transfer transaction.
159
159
  */
160
160
  // tslint:disable-next-line:max-line-length
161
161
  pactusTransactionGetRawTransferTransaction = (...params) => {
162
162
  return this.request("pactus.transaction.get_raw_transfer_transaction", params);
163
163
  };
164
164
  /**
165
- *
165
+ * GetRawBondTransaction retrieves raw details of a bond transaction.
166
166
  */
167
167
  // tslint:disable-next-line:max-line-length
168
168
  pactusTransactionGetRawBondTransaction = (...params) => {
169
169
  return this.request("pactus.transaction.get_raw_bond_transaction", params);
170
170
  };
171
171
  /**
172
- *
172
+ * GetRawUnbondTransaction retrieves raw details of an unbond transaction.
173
173
  */
174
174
  // tslint:disable-next-line:max-line-length
175
175
  pactusTransactionGetRawUnbondTransaction = (...params) => {
176
176
  return this.request("pactus.transaction.get_raw_unbond_transaction", params);
177
177
  };
178
178
  /**
179
- *
179
+ * GetRawWithdrawTransaction retrieves raw details of a withdraw transaction.
180
180
  */
181
181
  // tslint:disable-next-line:max-line-length
182
182
  pactusTransactionGetRawWithdrawTransaction = (...params) => {
183
183
  return this.request("pactus.transaction.get_raw_withdraw_transaction", params);
184
184
  };
185
185
  /**
186
- *
186
+ * GetRawBatchTransferTransaction retrieves raw details of batch transfer transaction.
187
187
  */
188
188
  // tslint:disable-next-line:max-line-length
189
189
  pactusTransactionGetRawBatchTransferTransaction = (...params) => {
190
190
  return this.request("pactus.transaction.get_raw_batch_transfer_transaction", params);
191
191
  };
192
192
  /**
193
- *
193
+ * DecodeRawTransaction accepts raw transaction and returns decoded transaction.
194
194
  */
195
195
  // tslint:disable-next-line:max-line-length
196
196
  pactusTransactionDecodeRawTransaction = (...params) => {
197
197
  return this.request("pactus.transaction.decode_raw_transaction", params);
198
198
  };
199
199
  /**
200
- *
200
+ * GetBlock retrieves information about a block based on the provided request parameters.
201
201
  */
202
202
  // tslint:disable-next-line:max-line-length
203
203
  pactusBlockchainGetBlock = (...params) => {
204
204
  return this.request("pactus.blockchain.get_block", params);
205
205
  };
206
206
  /**
207
- *
207
+ * GetBlockHash retrieves the hash of a block at the specified height.
208
208
  */
209
209
  // tslint:disable-next-line:max-line-length
210
210
  pactusBlockchainGetBlockHash = (...params) => {
211
211
  return this.request("pactus.blockchain.get_block_hash", params);
212
212
  };
213
213
  /**
214
- *
214
+ * GetBlockHeight retrieves the height of a block with the specified hash.
215
215
  */
216
216
  // tslint:disable-next-line:max-line-length
217
217
  pactusBlockchainGetBlockHeight = (...params) => {
218
218
  return this.request("pactus.blockchain.get_block_height", params);
219
219
  };
220
220
  /**
221
- *
221
+ * GetBlockchainInfo retrieves general information about the blockchain.
222
222
  */
223
223
  // tslint:disable-next-line:max-line-length
224
224
  pactusBlockchainGetBlockchainInfo = (...params) => {
225
225
  return this.request("pactus.blockchain.get_blockchain_info", params);
226
226
  };
227
227
  /**
228
- *
228
+ * GetConsensusInfo retrieves information about the consensus instances.
229
229
  */
230
230
  // tslint:disable-next-line:max-line-length
231
231
  pactusBlockchainGetConsensusInfo = (...params) => {
232
232
  return this.request("pactus.blockchain.get_consensus_info", params);
233
233
  };
234
234
  /**
235
- *
235
+ * GetAccount retrieves information about an account based on the provided address.
236
236
  */
237
237
  // tslint:disable-next-line:max-line-length
238
238
  pactusBlockchainGetAccount = (...params) => {
239
239
  return this.request("pactus.blockchain.get_account", params);
240
240
  };
241
241
  /**
242
- *
242
+ * GetValidator retrieves information about a validator based on the provided address.
243
243
  */
244
244
  // tslint:disable-next-line:max-line-length
245
245
  pactusBlockchainGetValidator = (...params) => {
246
246
  return this.request("pactus.blockchain.get_validator", params);
247
247
  };
248
248
  /**
249
- *
249
+ * GetValidatorByNumber retrieves information about a validator based on the provided number.
250
250
  */
251
251
  // tslint:disable-next-line:max-line-length
252
252
  pactusBlockchainGetValidatorByNumber = (...params) => {
253
253
  return this.request("pactus.blockchain.get_validator_by_number", params);
254
254
  };
255
255
  /**
256
- *
256
+ * GetValidatorAddresses retrieves a list of all validator addresses.
257
257
  */
258
258
  // tslint:disable-next-line:max-line-length
259
259
  pactusBlockchainGetValidatorAddresses = (...params) => {
260
260
  return this.request("pactus.blockchain.get_validator_addresses", params);
261
261
  };
262
262
  /**
263
- *
263
+ * GetPublicKey retrieves the public key of an account based on the provided address.
264
264
  */
265
265
  // tslint:disable-next-line:max-line-length
266
266
  pactusBlockchainGetPublicKey = (...params) => {
267
267
  return this.request("pactus.blockchain.get_public_key", params);
268
268
  };
269
269
  /**
270
- *
270
+ * GetTxPoolContent retrieves current transactions in the transaction pool.
271
271
  */
272
272
  // tslint:disable-next-line:max-line-length
273
273
  pactusBlockchainGetTxPoolContent = (...params) => {
274
274
  return this.request("pactus.blockchain.get_tx_pool_content", params);
275
275
  };
276
276
  /**
277
- *
277
+ * GetNetworkInfo retrieves information about the overall network.
278
278
  */
279
279
  // tslint:disable-next-line:max-line-length
280
280
  pactusNetworkGetNetworkInfo = (...params) => {
281
281
  return this.request("pactus.network.get_network_info", params);
282
282
  };
283
283
  /**
284
- *
284
+ * GetNodeInfo retrieves information about a specific node in the network.
285
285
  */
286
286
  // tslint:disable-next-line:max-line-length
287
287
  pactusNetworkGetNodeInfo = (...params) => {
288
288
  return this.request("pactus.network.get_node_info", params);
289
289
  };
290
290
  /**
291
- *
291
+ * SignMessageWithPrivateKey signs a message with the provided private key.
292
292
  */
293
293
  // tslint:disable-next-line:max-line-length
294
294
  pactusUtilsSignMessageWithPrivateKey = (...params) => {
295
295
  return this.request("pactus.utils.sign_message_with_private_key", params);
296
296
  };
297
297
  /**
298
- *
298
+ * VerifyMessage verifies a signature against the public key and message.
299
299
  */
300
300
  // tslint:disable-next-line:max-line-length
301
301
  pactusUtilsVerifyMessage = (...params) => {
302
302
  return this.request("pactus.utils.verify_message", params);
303
303
  };
304
304
  /**
305
- *
305
+ * PublicKeyAggregation aggregates multiple BLS public keys into a single key.
306
306
  */
307
307
  // tslint:disable-next-line:max-line-length
308
308
  pactusUtilsPublicKeyAggregation = (...params) => {
309
309
  return this.request("pactus.utils.public_key_aggregation", params);
310
310
  };
311
311
  /**
312
- *
312
+ * SignatureAggregation aggregates multiple BLS signatures into a single signature.
313
313
  */
314
314
  // tslint:disable-next-line:max-line-length
315
315
  pactusUtilsSignatureAggregation = (...params) => {
316
316
  return this.request("pactus.utils.signature_aggregation", params);
317
317
  };
318
318
  /**
319
- *
319
+ * CreateWallet creates a new wallet with the specified parameters.
320
320
  */
321
321
  // tslint:disable-next-line:max-line-length
322
322
  pactusWalletCreateWallet = (...params) => {
323
323
  return this.request("pactus.wallet.create_wallet", params);
324
324
  };
325
325
  /**
326
- *
326
+ * RestoreWallet restores an existing wallet with the given mnemonic.
327
327
  */
328
328
  // tslint:disable-next-line:max-line-length
329
329
  pactusWalletRestoreWallet = (...params) => {
330
330
  return this.request("pactus.wallet.restore_wallet", params);
331
331
  };
332
332
  /**
333
- *
333
+ * LoadWallet loads an existing wallet with the given name.
334
334
  */
335
335
  // tslint:disable-next-line:max-line-length
336
336
  pactusWalletLoadWallet = (...params) => {
337
337
  return this.request("pactus.wallet.load_wallet", params);
338
338
  };
339
339
  /**
340
- *
340
+ * UnloadWallet unloads a currently loaded wallet with the specified name.
341
341
  */
342
342
  // tslint:disable-next-line:max-line-length
343
343
  pactusWalletUnloadWallet = (...params) => {
344
344
  return this.request("pactus.wallet.unload_wallet", params);
345
345
  };
346
346
  /**
347
- *
347
+ * GetTotalBalance returns the total available balance of the wallet.
348
348
  */
349
349
  // tslint:disable-next-line:max-line-length
350
350
  pactusWalletGetTotalBalance = (...params) => {
351
351
  return this.request("pactus.wallet.get_total_balance", params);
352
352
  };
353
353
  /**
354
- *
354
+ * SignRawTransaction signs a raw transaction for a specified wallet.
355
355
  */
356
356
  // tslint:disable-next-line:max-line-length
357
357
  pactusWalletSignRawTransaction = (...params) => {
358
358
  return this.request("pactus.wallet.sign_raw_transaction", params);
359
359
  };
360
360
  /**
361
- *
361
+ * GetValidatorAddress retrieves the validator address associated with a public key.
362
362
  */
363
363
  // tslint:disable-next-line:max-line-length
364
364
  pactusWalletGetValidatorAddress = (...params) => {
365
365
  return this.request("pactus.wallet.get_validator_address", params);
366
366
  };
367
367
  /**
368
- *
368
+ * GetNewAddress generates a new address for the specified wallet.
369
369
  */
370
370
  // tslint:disable-next-line:max-line-length
371
371
  pactusWalletGetNewAddress = (...params) => {
372
372
  return this.request("pactus.wallet.get_new_address", params);
373
373
  };
374
374
  /**
375
- *
375
+ * GetAddressHistory retrieves the transaction history of an address.
376
376
  */
377
377
  // tslint:disable-next-line:max-line-length
378
378
  pactusWalletGetAddressHistory = (...params) => {
379
379
  return this.request("pactus.wallet.get_address_history", params);
380
380
  };
381
381
  /**
382
- *
382
+ * SignMessage signs an arbitrary message using a wallet's private key.
383
383
  */
384
384
  // tslint:disable-next-line:max-line-length
385
385
  pactusWalletSignMessage = (...params) => {
386
386
  return this.request("pactus.wallet.sign_message", params);
387
387
  };
388
388
  /**
389
- *
389
+ * GetTotalStake returns the total stake amount in the wallet.
390
390
  */
391
391
  // tslint:disable-next-line:max-line-length
392
392
  pactusWalletGetTotalStake = (...params) => {
393
393
  return this.request("pactus.wallet.get_total_stake", params);
394
394
  };
395
395
  /**
396
- *
396
+ * GetAddressInfo returns detailed information about a specific address.
397
397
  */
398
398
  // tslint:disable-next-line:max-line-length
399
399
  pactusWalletGetAddressInfo = (...params) => {
400
400
  return this.request("pactus.wallet.get_address_info", params);
401
401
  };
402
402
  /**
403
- *
403
+ * SetAddressLabel sets or updates the label for a given address.
404
404
  */
405
405
  // tslint:disable-next-line:max-line-length
406
406
  pactusWalletSetAddressLabel = (...params) => {
407
407
  return this.request("pactus.wallet.set_address_label", params);
408
408
  };
409
409
  /**
410
- *
410
+ * ListWallet returns list of all available wallets.
411
411
  */
412
412
  // tslint:disable-next-line:max-line-length
413
413
  pactusWalletListWallet = (...params) => {
414
414
  return this.request("pactus.wallet.list_wallet", params);
415
415
  };
416
416
  /**
417
- *
417
+ * GetWalletInfo returns detailed information about a specific wallet.
418
418
  */
419
419
  // tslint:disable-next-line:max-line-length
420
420
  pactusWalletGetWalletInfo = (...params) => {
421
421
  return this.request("pactus.wallet.get_wallet_info", params);
422
422
  };
423
423
  /**
424
- *
424
+ * ListAddress returns all addresses in the specified wallet.
425
425
  */
426
426
  // tslint:disable-next-line:max-line-length
427
427
  pactusWalletListAddress = (...params) => {