AIXChain Blockchain Document
  • INTRODUCTION
    • Getting started with smart contract development
    • Build a Decentralized Library
  • AIXC AND ARC TOKEN
    • ARC
      • ARX Transfer
      • Query ARX balance
    • ARC-10
      • Issue ARC-10 token
      • Participate ARC-10
      • ARC-10 Transfer
      • Query ARC-10 balance
      • ARC-10 Transfer in Smart Contracts
    • ARC-20
      • Protocol Interface
      • Contract Example
      • Issuing ARC-20 tokens tutorial
    • ARC-721
      • Protocol Interface
      • Contract Example
  • ACCOUNT MODEL
  • BUILD NODE
    • How to setup a Super node to produce Blocks
      • Recommended configuration & Environment
      • Example cloud services
      • Deployment guide
    • Super Representative
      • How to become a SR
      • Super Representatives Election
      • How to change witness name
  • HTTP API
    • Introduction
    • API Signature and Broadcast Flow
    • API List
      • Full Node API Overview
      • Address Utilities
        • GenerateAddress
        • CreateAddress
        • ValidateAddress
      • Accounts
        • CreateAccount
        • GetAccount
        • UpdateAccount
        • AccountPermissionUpdate
        • GetAccountBalance
      • Account Resources
        • GetAccountResource
        • GetAccountNet
        • FreezeBalance
        • UnfreezeBalance
        • GetDelegatedResource
        • GetDelegatedResourceAccountIndex
      • Query the Network
        • GetBlockByNum
        • GetBlockById
        • GetBlockByLatestNum
        • GetBlockByLimitNext
        • GetNowBlock
        • GetTransactionById
        • GetTransactionInfoById
        • GetTransactionInfoByBlockNum
        • ListNodes
        • GetNodeInfo
        • GetChainParameters
        • GetBlockBalance
      • ARC10 Token
        • GetAssetIssueByAccount
        • GetAssetIssueById
        • GetAssetIssueList
        • GetPaginatedAssetIssueList
        • TransferAsset
        • CreateAssetIssue
        • UnfreezeAsset
        • UpdateAsset
      • Transactions
        • GetContract
        • GetTransactionSign
        • BroadcastTransaction
        • BroadcastHex
        • EasyTransfer
        • EasyTransferByPrivate
        • CreateTransaction
      • Voting & SRs
        • ListWitnesses
        • CreateWitness
        • UpdateWitness
        • GetBrokerage
        • UpdateBrokerage
        • VoteWitnessAccount
        • GetReward
        • WithdrawBalance
        • GetNextMaintenanceTime
      • Smart Contracts
        • TriggerSmartContract
        • DeployContract
        • UpdateSetting
        • UpdateEnergyLimit
        • ClearAbi
        • GetContract
        • TriggerConstantContract
      • Proposals
      • Solidity Node API
    • RPC List
  • AIXCHAIN CLI
  • Aixchain SDK
    • Quickstart
    • Address and Signature
    • Sending Transaction
    • Smart Contract
  • Faucet Aixchain
  • Wallets
Powered by GitBook
On this page
  1. HTTP API
  2. API List
  3. Account Resources

FreezeBalance

POST: http://172.104.51.182:16667/wallet/freezebalance

PreviousGetAccountNetNextUnfreezeBalance

Last updated 29 days ago

Stake an amount of Aixc to obtain bandwidth OR Energy and AIXC Power (voting rights) . Optionally, user can stake Aixc to grant Energy or Bandwidth to others. Balance amount in the denomination of sun.

BODY PARAMS

{

owner_address string

frozen_balance int64

frozen_duration int32

resource string

receiver_address string

permission_id int32

visible boolean

}

Example:

curl --request POST --url --header 'Accept: application/json' --header 'Content-Type: application/json' --data @- <<EOF

{ "owner_address": "ARSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7", "frozen_duration": 3, "frozen_balance":2000000, "resource": "ENERGY", "visible": true } EOF

Input:

{

"owner_address": "ARSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7", "frozen_duration": 3, "frozen_balance":2000000, "resource": "ENERGY", "visible": true

}

Response:

{

"visible": true, "txID": "b1f4bbec47e1b743bd6527c9cc0bb63db050e8da86b30a5d8c7ba5368da49d5a", "raw_data": { "contract": [ { "parameter": { "value": { "resource": "ENERGY", "frozen_duration": 3, "frozen_balance": 2000000, "owner_address": "ARSrWnjsK5ePhAVQGHr2JSFdKSjE3vKwE7" }, "type_url": "type.googleapis.com/protocol.FreezeBalanceContract" }, "type": "FreezeBalanceContract" } ], "ref_block_bytes": "83ce", "ref_block_hash": "de07f3deb051961a", "expiration": 1639400256000, "timestamp": 1639400196186 }, "raw_data_hex": "0a0283ce2208de07f3deb051961a4080e4fa9edb2f5a59080b12550a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e467265657a6542616c616e6365436f6e7472616374121f0a1541a9c46373aeb4749e3ce45aca242b027a46f486f91080897a1803500170da90f79edb2f"

}

=> Continue call gettransactionsign API then call broadcasttransaction API

We will the final result: The transaction created success on WEL network.

{

"result": true,

"txid": "b1f4bbec47e1b743bd6527c9cc0bb63db050e8da86b30a5d8c7ba5368da49d5a"

}

http://172.104.51.182:16667/wallet/freezebalance