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. Accounts

CreateAccount

POST: http://172.104.51.182:16667/wallet/createaccount

PreviousAccountsNextGetAccount

Last updated 29 days ago

Create an account. Uses an already activated account to create a new account

Return: Transaction object

  • The expiration time of the http api creation transaction is 1 minute, so to complete the on-chain, you need to complete gettransactionsign and broadcasttransaction within 1 minute after the creation.

BODY PARAMS

{

owner_address string

account_address string

visible boolean (optional)

permission_id int32 (optional)

}

Note:

  • owner_address is an activated account,converted to a hex String.If the owner_address has enough bandwidth obtained by freezing Aixc, then creating an account will only consume bandwidth , otherwise, 0.1 Aixc will be burned to pay for bandwidth, and at the same time, 1 Aixc will be required to be created.

  • account_address is the address of the new account, converted to a hex string, this address needs to be calculated in advance

  • visible is optional, whether the address is in base58 format

  • permission_id is optional,for multi-signature use

Example:

curl --request POST --url --header 'Accept: application/json' --header 'Content-Type: application/json' --data ' { "owner_address": "414203485a535a4072C9FBFaADDfe2A010AD0BcdB0", "account_address": "414203485a535a4072C9FBFaAEEfe2A010AD0BcdC0" }

Input:

{

"owner_address": "414203485a535a4072C9FBFaADDfe2A010AD0BcdB0",

"account_address": "414203485a535a4072C9FBFaAEEfe2A010AD0BcdC0"

}

Response:

{

"visible": false, "txID": "a5d95d0ba8370f1b585f4cc427d3827b97036d73cc980b97390c603d0403b0c9", "raw_data": { "contract": [ { "parameter": { "value": { "owner_address": "414203485a535a4072c9fbfaaddfe2a010ad0bcdb0", "account_address": "414203485a535a4072c9fbfaaeefe2a010ad0bcdc0" }, "type_url": "type.googleapis.com/protocol.AccountCreateContract" }, "type": "AccountCreateContract" } ], "ref_block_bytes": "d576", "ref_block_hash": "7aa71a8b97000d36", "expiration": 1639056939000, "timestamp": 1639056881436 }, "raw_data_hex": "0a02d57622087aa71a8b97000d3640f8afa0fbd92f5a6612640a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e74437265617465436f6e7472616374122e0a15414203485a535a4072c9fbfaaddfe2a010ad0bcdb01215414203485a535a4072c9fbfaaeefe2a010ad0bcdc0709cee9cfbd92f"

}

=> Continue you call gettransactionsign API then call broadcasttransaction API

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

{

"result":true,"txid":"a5d95d0ba8370f1b585f4cc427d3827b97036d73cc980b97390c603d0403b0c9"

}

http://172.104.51.182:16667/wallet/createaccount