NEAR Sub-Account
In NEAR, users can register named accounts (e.g. bob.near) which are simpler to use and remember.
Named accounts can create sub-accounts of themselves, helping to better organize related-accounts. In this way, named accounts work as domains, particularly:
Only
registrar
can create short top-level accounts (e.g.near
,aurora
).Anyone can create long top-level accounts, e.g.
verylongaccountnamethatis32chars
.near
can createbob.near
, andbob.near
can createapp.bob.near
.near
cannot createapp.bob.near
, andtest.near
cannot createsub.example.near
.
Create a Near Sub-Account for NFT smart contract
API Doc
Swagger Doc | ReDoc
Curl call example
curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/account/create"
-H "Content-Type: application/json"
-d "{"account_id": "string","newAccountId": "string","amount": "string"}"
Path parameters:
chain
: [string] chain to work with. Eithertestnet
ormainnet
.
Body Details:
{
"account_id": "string",
"newAccountId": "string",
"amount": "string"
}
Body parameters:
account_id
: Top-level account.newAccountId
: New Sub-account.amount
: Number of Near tokens to transfer to the sub-account.
Example:
curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/testnet/account/create"
-H "Content-Type: application/json"
-d "{"account_id": "waltid.testnet","newAccountId": "nft.waltid.testnet","amount": "4"}"
Last updated
Was this helpful?