API for interacting with accounts.
Methods
-
<inner> create(params)
-
Create a new account.
Parameters:
Name Type Description params
module:AccountsApi~createRequest Parameters for account creation.
Returns:
Newly created account response.
- Type
- Promise.<Account>
-
<inner> createReceiver(params)
-
Create account receiver.
Parameters:
Name Type Description params
module:AccountsApi~createReceiverRequest Parameters for receiver creation.
Returns:
Target receiver.
- Type
- Promise.<Receiver>
-
<inner> delete(params)
-
Delete account.
Parameters:
Name Type Description params
Object Deletion information.
Properties
Name Type Description account_id
String Account id.
account_alias
String Account alias.
-
<inner> list(params)
-
List accounts whose id is the given one.
Parameters:
Name Type Description params
Object Filter and pagination information.
Properties
Name Type Description id
String Account id.
alias
String Account alias.
Returns:
Target accounts promise.
- Type
- Promise.<Array.<Account>>
-
<inner> listAddresses(params)
-
List all addresses for one account.
Parameters:
Name Type Description params
Object Filter and pagination information.
Properties
Name Type Description account_alias
String alias of account.
account_id
String id of account.
from
Number the start position of first address
count
Number the number of returned.
Returns:
target addresses response.
- Type
- Promise.<module:AccountApi~AddressInfo>
-
<inner> listAll()
-
List all accounts in the target Bytom node.
Returns:
All accounts promise.
- Type
- Promise.<Array.<Account>>
-
<inner> updateAlias(params)
-
Update account alias.
Parameters:
Name Type Description params
object Parameters for account update.
Properties
Name Type Description account_id
String id of account.
account_alias
String alias of account.
new_alias
String new alias of account.
-
<inner> validateAddresses(address)
-
Validate an address for one account.
Parameters:
Name Type Description address
string Filter and pagination information.
Returns:
weather the address is local and is valid.
- Type
- Promise.<Object>
Type Definitions
-
AddressInfo
-
Type:
- Object
Properties:
Name Type Description account_alias
String account_id
String adddress
String change
Boolean Indicate whether this address is for change UTXO.
-
alias
-
User specified, unique identifier.
Type:
- String
-
createReceiverRequest
-
Type:
- Object
Properties:
Name Type Argument Description account_alias
String <optional>
The unique alias of the account. accountAlias or accountId must be provided.
account_id
String <optional>
The unique ID of the account. accountAlias or accountId must be provided.
-
createRequest
-
Type:
- Object
Properties:
Name Type Argument Description alias
String <optional>
User specified, unique identifier.
root_xpubs
Array.<String> The list of keys used to create control programs under the account.
quorum
Number The number of keys required to sign transactions for the account.
-
id
-
Unique account identifier in one Bytom node.
Type:
- String
-
quorum
-
The number of keys required to sign transactions for the account.
Type:
- Number
-
xpubs
-
The list of keys used to create control programs under the account.
Type:
- Array.<String>