Home Reference Source
import {TokenClient} from '@token-io/core/src/main/TokenClient.js'
public class | source

TokenClient

Token SDK entry point.

Constructor Summary

Public Constructor
public

constructor(options: object)

Member Summary

Public Members
public
public
public
public
public
public
Private Members
private

Method Summary

Public Methods
public

createMemberCore(alias: Alias, CryptoEngine: Class<KeyStoreCryptoEngine>, Member: Class<Member>, memberType: string, tokenRequestId: string): Promise<Object>

Creates a Token member with an alias.

public

Gets a list of countries with Token-enabled banks.

public

Gets a list of available countries for linking.

public

getMemberCore(CryptoEngine: Class<KeyStoreCryptoEngine>, Member: Class<Member>, memberId: string): Object

Returns 'logged-in' member that uses keys already in the CryptoEngine.

public

resolveAlias(alias: Alias): PromiseTokenMember>

Resolve an alias to a member.

Public Constructors

public constructor(options: object) source

Params:

NameTypeAttributeDescription
options object
  • optional
  • default: {}

Public Members

public Crypto: Crypto source

public KeyLevel: Object source

public ManualCryptoEngine: Class<MemoryCryptoEngine> source

public MemoryCryptoEngine: Class<MemoryCryptoEngine> source

public Util: Util source

public options: Object source

Private Members

private _unauthenticatedClient: HttpClient source

Public Methods

public createMemberCore(alias: Alias, CryptoEngine: Class<KeyStoreCryptoEngine>, Member: Class<Member>, memberType: string, tokenRequestId: string): Promise<Object> source

Creates a Token member with an alias.

Params:

NameTypeAttributeDescription
alias Alias
  • nullable: true

the member's alias

CryptoEngine Class<KeyStoreCryptoEngine>

engine to use for key creation and storage

Member Class<Member>

Member class for creation

memberType string

type of member to create. "PERSONAL" if undefined

tokenRequestId string

(optional) token request ID if the member is being claimed

Return:

Promise<Object>

Promise of created Member

public getBanks(options: object): Promise<object> source

Gets a list of countries with Token-enabled banks.

Params:

NameTypeAttributeDescription
options object

optional parameters for getBanks

Return:

Promise<object>

list of banks

public getCountries(options: object): Promise<object> source

Gets a list of available countries for linking.

Params:

NameTypeAttributeDescription
options object

optional parameters for getBanksCountries

Return:

Promise<object>

list of countries with linkable banks

public getMemberCore(CryptoEngine: Class<KeyStoreCryptoEngine>, Member: Class<Member>, memberId: string): Object source

Returns 'logged-in' member that uses keys already in the CryptoEngine. If memberId is not provided, the last member to 'log in' will be used.

Params:

NameTypeAttributeDescription
CryptoEngine Class<KeyStoreCryptoEngine>

engine to use for key creation and storage

Member Class<Member>

Member class for creation

memberId string

optional ID of the member we want to log in

Return:

Object

instantiated member

public resolveAlias(alias: Alias): PromiseTokenMember> source

Resolve an alias to a member.

Params:

NameTypeAttributeDescription
alias Alias

alias to lookup

Return:

PromiseTokenMember>

TokenMember