API Signature and Broadcast Flow

Introduction

The Pollux network provides users with a comprehensive set of API calls for interacting with the blockchain. These calls are extensively documented in the API reference page, covering functionalities of Full Node, Solidity Node, and poxWeb. While some API calls operate autonomously to retrieve specific information, others entail adjustments to the user's POX wallet, requiring transaction signing and broadcasting. This guide takes users through an example of POX Balance staking, offering insights into the process flow of API signature and broadcast.

Stake Balance Example

1. Create a Transaction

/wallet/freezebalancev2 is used to stake a certain amount of POX of the user's address to obtain bandwidth or energy, as well as voting rights. Calling this API will create a staking POX transaction. This API has 3 parameters, namely:

  • owner_address is the account address.

  • frozen_balance is the amount of POX staked in denominations of Sun, in integer format.

  • resource is the type of resource staking for. This can be either ENERGY or BANDWIDTH, in string format.

Last updated