AuthHttpClient
Client for making authenticated requests to the Token gateway.
Constructor Summary
Public Constructor | ||
public |
constructor(undefined: *) |
Member Summary
Private Members | ||
private |
_authHeader: * |
|
private |
_context: * |
|
private |
|
|
private |
|
|
private |
_instance: * |
|
private |
_interceptor: * |
|
private |
_memberId: * |
Method Summary
Public Methods | ||
public |
Adds an alias to the member. |
|
public |
async addAliases(prevHash: string, aliases: Array): Object Adds aliases to the member. |
|
public |
async addRecoveryRule(prevHash: string, rule: Object): Object Set member's recovery rule. |
|
public |
async approveKey(prevHash: string, key: Object): Object Adds a key to the member. |
|
public |
async approveKeys(prevHash: string, keys: Array): Object Adds keys to the member. |
|
public |
async confirmFunds(accountId: string, amount: string, currency: string): boolean Confirms if an account has sufficient funds for a purchase. |
|
public |
async createTestBankAccount(balance: Number, currency: string): Object Creates a test bank account. |
|
public |
async deleteMember(): Object Deletes the member. |
|
public |
async getAccount(accountId: string): Object Gets an account. |
|
public |
async getAccounts(): Object Gets all accounts linked to the member. |
|
public |
async getAliases(): Object Gets logged-in member's aliases, verified or not. |
|
public |
async getBalance(accountId: string, keyLevel: string): Object Gets the balance of an account. |
|
public |
async getBalances(accountIds: Array, keyLevel: string): Object Gets the balances of an array of accounts. |
|
public |
async getBankInfo(bankId: string): Object Gets info about a bank. |
|
public |
async getDefaultRecoveryAgent(): Object Get default recovery agent. |
|
public |
Creates the necessary signer objects, based on the level requested. |
|
public |
async getStandingOrder(accountId: string, standingOrderId: string, keyLevel: string): * Gets information about a particular standing order. |
|
public |
async getStandingOrders(accountId: string, offset: string, limit: int, keyLevel: string): * Gets information about several standing orders. |
|
public |
async getTestBankNotification(subscriberId: string, notificationId: string): Object Gets test bank notification. |
|
public |
async getTestBankNotifications(subscriberId: string): Object Gets test bank notifications. |
|
public |
async getTransaction(accountId: string, transactionId: string, keyLevel: string): Object Gets a transaction for an account, by its ID. |
|
public |
Gets all transactions for an account. |
|
public |
async linkAccountsOauth(authorization: string): Object Links accounts to the member. |
|
public |
async removeAlias(prevHash: string, alias: Object): Object Removes an alias from the member. |
|
public |
async removeAliases(prevHash: string, aliases: Array): Object Removes aliases from the member. |
|
public |
Removes a key from the member. |
|
public |
async removeKeys(prevHash: string, keyIds: Array): Object Removes keys from the member. |
|
public |
async resolveTransferDestinations(accountId: string): Object Resolves transfer destinations for the given account ID. |
|
public |
async tokenOperationSignature(tokenPayload: Object, suffix: string, keyLevel: KeyLevel): Object Signs a token payload with given key level and action. |
|
public |
useKeyLevel(keyLevel: string) Use the given key level to sign the request. |
Private Methods | ||
private |
async _memberUpdate(update: *, prevHash: *, metadata: *): * |
|
private |
|
Public Constructors
public constructor(undefined: *) source
Params:
Name | Type | Attribute | Description |
undefined | * |
Private Members
private _authHeader: * source
private _context: * source
private _cryptoEngine: * source
private _developerKey: * source
private _instance: * source
private _interceptor: * source
private _memberId: * source
Public Methods
public async addAliases(prevHash: string, aliases: Array): Object source
Adds aliases to the member.
public async addRecoveryRule(prevHash: string, rule: Object): Object source
Set member's recovery rule.
public async confirmFunds(accountId: string, amount: string, currency: string): boolean source
Confirms if an account has sufficient funds for a purchase.
public async createTestBankAccount(balance: Number, currency: string): Object source
Creates a test bank account.
public async getAccount(accountId: string): Object source
Gets an account.
Params:
Name | Type | Attribute | Description |
accountId | string | account to get |
public async getBalance(accountId: string, keyLevel: string): Object source
Gets the balance of an account.
public async getBalances(accountIds: Array, keyLevel: string): Object source
Gets the balances of an array of accounts.
public async getBankInfo(bankId: string): Object source
Gets info about a bank.
Params:
Name | Type | Attribute | Description |
bankId | string | ID of the bank to lookup |
public async getSigner(level: string): Promise source
Creates the necessary signer objects, based on the level requested. If the level is not available, attempts to fetch a lower level.
Params:
Name | Type | Attribute | Description |
level | string | requested level of key |
public async getStandingOrder(accountId: string, standingOrderId: string, keyLevel: string): * source
Gets information about a particular standing order.
Return:
* |
public async getStandingOrders(accountId: string, offset: string, limit: int, keyLevel: string): * source
Gets information about several standing orders.
Return:
* |
public async getTestBankNotification(subscriberId: string, notificationId: string): Object source
Gets test bank notification.
public async getTestBankNotifications(subscriberId: string): Object source
Gets test bank notifications.
Params:
Name | Type | Attribute | Description |
subscriberId | string | id of subscriber |
public async getTransaction(accountId: string, transactionId: string, keyLevel: string): Object source
Gets a transaction for an account, by its ID.
public async getTransactions(accountId: string, offset: string, limit: Number, keyLevel: string): Object source
Gets all transactions for an account.
public async linkAccountsOauth(authorization: string): Object source
Links accounts to the member.
Params:
Name | Type | Attribute | Description |
authorization | string | oauthBankAuthorization continaing bank_id and access_token |
public async removeAlias(prevHash: string, alias: Object): Object source
Removes an alias from the member.
public async removeAliases(prevHash: string, aliases: Array): Object source
Removes aliases from the member.
public async removeKey(prevHash: string, keyId: string): Object source
Removes a key from the member.
public async removeKeys(prevHash: string, keyIds: Array): Object source
Removes keys from the member.
public async resolveTransferDestinations(accountId: string): Object source
Resolves transfer destinations for the given account ID.
Params:
Name | Type | Attribute | Description |
accountId | string | ID of account to resolve destinations for |
public async tokenOperationSignature(tokenPayload: Object, suffix: string, keyLevel: KeyLevel): Object source
Signs a token payload with given key level and action.
public useKeyLevel(keyLevel: string) source
Use the given key level to sign the request.
Params:
Name | Type | Attribute | Description |
keyLevel | string | key level |
Private Methods
private async _memberUpdate(update: *, prevHash: *, metadata: *): * source
Params:
Name | Type | Attribute | Description |
update | * | ||
prevHash | * | ||
metadata | * |
Return:
* |