Member
Represents a Token member.
Constructor Summary
Public Constructor | ||
public |
constructor(options: object) |
Member Summary
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
Adds an alias to this member. |
|
public |
addAliases(aliases: Array<Alias>): Promise<void> Adds aliases to this member. |
|
public |
Gets all of the member's aliases. |
|
public |
approveKey(key: Key): Promise<void> Approves a new key for this member. |
|
public |
approveKeys(keys: Array<Key>): Promise<void> Approves new keys for this member. |
|
public |
Confirms if an account has sufficient funds for a purchase. |
|
public |
createAndLinkTestBankAccount(balance: number, currency: string): Promise<Account> Creates a test bank account in a fake bank and link it |
|
public |
createTestBankAccount(balance: number, currency: string): Promise<OauthBankAuthorization> Creates a test bank account in a fake bank |
|
public |
deleteMember(): Promise<void> Deletes the member. |
|
public |
firstAlias(): PromiseAlias> Gets the member's first alias. |
|
public |
getBalance(accountId: string, keyLevel: KeyLevel): Promise<Balance> Looks up the balance of an account. |
|
public |
Looks up the balances of an array of accounts. |
|
public |
getBankInfo(bankId: string): Promise<BankInfo> Gets the info of a bank, including a link for pairing accounts at this bank. |
|
public |
getStandingOrder(accountId: string, standingOrderId: string, keyLevel: KeyLevel): Promise<StandingOrder> Looks up an existing standing order for a given account. |
|
public |
getStandingOrders(accountId: string, offset: string, limit: number, keyLevel: KeyLevel): Promise<object> Looks up standing orders for a given account. |
|
public |
getTestBankNotification(subscriberId: string, notificationId: string): Promise<Notification> Gets test bank notification. |
|
public |
getTestBankNotifications(subscriberId: string): Promise<Array<Notification>> Gets test bank notifications. |
|
public |
getTransaction(accountId: string, transactionId: string, keyLevel: KeyLevel): Promise<Transaction> Looks up a transaction. |
|
public |
getTransactions(accountId: *, offset: *, limit: *, keyLevel: *): * Looks up all of the member's transactions for an account. |
|
public |
Gets the member's public keys. |
|
public |
Gets the member's last hash. |
|
public |
Gets the member ID. |
|
public |
removeAlias(alias: Alias): Promise<void> Removes an alias from the member. |
|
public |
removeAliases(aliases: Array<Alias>): Promise<void> Removes aliases from the member. |
|
public |
Removes a key from this member. |
|
public |
removeKeys(keyIds: Array<string>): Promise<void> Removes keys from this member. |
|
public |
resolveTransferDestinations(accountId: string): Promise<TransferDestination> Resolves transfer destinations for the given account ID. |
|
public |
signTokenPayload(tokenPayload: Object, keyLevel: KeyLevel): Promise<Signature> Signs a token payload with specified level of keys. |
|
public |
useDefaultRecoveryRule(): Promise<RecoveryRule> Set the 'normal consumer' rule as member's recovery rule. (As of Nov 2017, this rule was: To recover, verify an alias.) |
Private Methods | ||
private |
_getMember(): Object |
|
private |
_normalizeAlias(alias: Alias, partnerId: string): Promise<Alias> |
Public Constructors
Private Members
private _client: AuthHttpClient source
private _unauthenticatedClient: HttpClient source
Public Methods
public addAlias(alias: Alias): Promise<void> source
Adds an alias to this member.
Params:
Name | Type | Attribute | Description |
alias | Alias | alias to add |
public addAliases(aliases: Array<Alias>): Promise<void> source
Adds aliases to this member.
Params:
Name | Type | Attribute | Description |
aliases | Array<Alias> | aliases to add |
public approveKey(key: Key): Promise<void> source
Approves a new key for this member.
Params:
Name | Type | Attribute | Description |
key | Key | key to add |
public approveKeys(keys: Array<Key>): Promise<void> source
Approves new keys for this member.
Params:
Name | Type | Attribute | Description |
keys | Array<Key> | keys to add |
public confirmFunds(accountId: string, amount: number | string, currency: string): Promise<boolean> source
Confirms if an account has sufficient funds for a purchase.
public createAndLinkTestBankAccount(balance: number, currency: string): Promise<Account> source
Creates a test bank account in a fake bank and link it
public createTestBankAccount(balance: number, currency: string): Promise<OauthBankAuthorization> source
Creates a test bank account in a fake bank
public getBalance(accountId: string, keyLevel: KeyLevel): Promise<Balance> source
Looks up the balance of an account.
public getBalances(accountIds: Array<string>, keyLevel: KeyLevel): Promise<Array<Balance>> source
Looks up the balances of an array of accounts.
public getBankInfo(bankId: string): Promise<BankInfo> source
Gets the info of a bank, including a link for pairing accounts at this bank.
Params:
Name | Type | Attribute | Description |
bankId | string | ID of the bank |
public getStandingOrder(accountId: string, standingOrderId: string, keyLevel: KeyLevel): Promise<StandingOrder> source
Looks up an existing standing order for a given account.
public getStandingOrders(accountId: string, offset: string, limit: number, keyLevel: KeyLevel): Promise<object> source
Looks up standing orders for a given account.
public getTestBankNotification(subscriberId: string, notificationId: string): Promise<Notification> source
Gets test bank notification.
public getTestBankNotifications(subscriberId: string): Promise<Array<Notification>> source
Gets test bank notifications.
Params:
Name | Type | Attribute | Description |
subscriberId | string | ID of subscriber |
public getTransaction(accountId: string, transactionId: string, keyLevel: KeyLevel): Promise<Transaction> source
Looks up a transaction.
public getTransactions(accountId: *, offset: *, limit: *, keyLevel: *): * source
Looks up all of the member's transactions for an account.
Params:
Name | Type | Attribute | Description |
accountId | * | ID of the account |
|
offset | * | where to start looking |
|
limit | * | how many to retrieve |
|
keyLevel | * | key level |
Return:
* | Transactions |
public removeAlias(alias: Alias): Promise<void> source
Removes an alias from the member.
Params:
Name | Type | Attribute | Description |
alias | Alias | alias to remove |
public removeAliases(aliases: Array<Alias>): Promise<void> source
Removes aliases from the member.
Params:
Name | Type | Attribute | Description |
aliases | Array<Alias> | aliases to remove |
public removeKey(keyId: string): Promise<void> source
Removes a key from this member.
Params:
Name | Type | Attribute | Description |
keyId | string | keyId to remove. Note, keyId is the hash of the pk |
public resolveTransferDestinations(accountId: string): Promise<TransferDestination> source
Resolves transfer destinations for the given account ID.
Params:
Name | Type | Attribute | Description |
accountId | string | ID of account to resolve destinations for |
public signTokenPayload(tokenPayload: Object, keyLevel: KeyLevel): Promise<Signature> source
Signs a token payload with specified level of keys.
public useDefaultRecoveryRule(): Promise<RecoveryRule> source
Set the 'normal consumer' rule as member's recovery rule. (As of Nov 2017, this rule was: To recover, verify an alias.)