Minimum
Create a new account
Changed onThis method creates a new account.
- The Diem MiniWallet Test Suite isolates test data by creating a new account for each test case.
- Client should store the response account ID for all the operations to the account.
- The balances property value shows the initial currency deposits to the account. Client can use the get account balances endpoint to check the account balances available after creating the account.
- When the account is required to provide Know Your Customer (KYC) data during an off-chain transaction, the server should use the kyc_data property value as the KycDataObject and send it to the counterparty service.
post/accounts
Request
- The document declares no server URL.
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"kyc_data": {
"type": "individual",
"payload_version": 1,
"given_name": "Tom",
"surname": "Jack"
},
"balances": {
"XUS": 1000000000
}
}Response
Account is created; currency balances are deposited to the account if provided.
Changes
- breaking
added the new required request property
/ - breaking
added the new required request property
/ - breaking
the
request property type changed fromstringtoobject - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the new optional request property
/
- breaking
- warning
removed the optional property
from the response with the status
- warning