Skip to main content

Class: WalletAPIServer

Hierarchy

  • RpcNode<typeof internalHandlers, AppHandlers>

    WalletAPIServer

Constructors

constructor

new WalletAPIServer(transport, config, logger?)

Parameters

NameTypeDefault value
transportTransportundefined
configServerConfigundefined
loggerLoggerdefaultLogger

Overrides

RpcNode< typeof internalHandlers, AppHandlers \>.constructor

Defined in

server/src/WalletAPIServer.ts:99

Properties

allAccounts$

Private allAccounts$: BehaviorSubject<Account[]>

Defined in

server/src/WalletAPIServer.ts:31


allCurrencies$

Private allCurrencies$: BehaviorSubject<({ color: string ; decimals: number ; family: "bitcoin" | "ethereum" | "algorand" | "crypto_org" | "ripple" | "cosmos" | "celo" | "tezos" | "polkadot" | "stellar" | "tron" ; id: string ; name: string ; ticker: string ; type: "CryptoCurrency" } | { color: string ; contract: string ; decimals: number ; id: string ; name: string ; parent: string ; standard: "ERC20" ; ticker: string ; type: "TokenCurrency" })[]>

Defined in

server/src/WalletAPIServer.ts:35


logger

Private logger: Logger

Defined in

server/src/WalletAPIServer.ts:27


permissions

Private permissions: Object

Type declaration

NameType
currencyIds$BehaviorSubject<string[]>
methodIds$BehaviorSubject<string[]>

Defined in

server/src/WalletAPIServer.ts:41


requestHandlers

Protected requestHandlers: TransformHandler<WalletHandlers>

Inherited from

RpcNode.requestHandlers

Defined in

core/lib/JSONRPC/RpcNode.d.ts:9


walletContext

Private walletContext: WalletContext

Defined in

server/src/WalletAPIServer.ts:29


walletHandlers

Private walletHandlers: Partial<WalletHandlers> = {}

Defined in

server/src/WalletAPIServer.ts:39

Methods

notify

notify<K>(method, params): void

Type parameters

NameType
Kextends "event.account.updated"

Parameters

NameType
methodK
paramsMethodParamsIfExists<AppHandlers, K>

Returns

void

Inherited from

RpcNode.notify

Defined in

core/lib/JSONRPC/RpcNode.d.ts:15


onRequest

Protected onRequest(request): Promise<unknown>

Parameters

NameType
requestRpcRequest<string, unknown>

Returns

Promise<unknown>

Overrides

RpcNode.onRequest

Defined in

server/src/WalletAPIServer.ts:73


request

request<K>(method, params): Promise<ReturnTypeOfMethodIfExists<AppHandlers, K>>

Type parameters

NameType
Kextends "event.account.updated"

Parameters

NameType
methodK
paramsMethodParamsIfExists<AppHandlers, K>

Returns

Promise<ReturnTypeOfMethodIfExists<AppHandlers, K>>

Inherited from

RpcNode.request

Defined in

core/lib/JSONRPC/RpcNode.d.ts:14


setAccounts

setAccounts(accounts): WalletAPIServer

Parameters

NameType
accountsAccount[]

Returns

WalletAPIServer

Defined in

server/src/WalletAPIServer.ts:60


setCurrencies

setCurrencies(currencies): WalletAPIServer

Parameters

NameType
currencies({ color: string ; decimals: number ; family: "bitcoin" | "ethereum" | "algorand" | "crypto_org" | "ripple" | "cosmos" | "celo" | "tezos" | "polkadot" | "stellar" | "tron" ; id: string ; name: string ; ticker: string ; type: "CryptoCurrency" } | { color: string ; contract: string ; decimals: number ; id: string ; name: string ; parent: string ; standard: "ERC20" ; ticker: string ; type: "TokenCurrency" })[]

Returns

WalletAPIServer

Defined in

server/src/WalletAPIServer.ts:55


setHandler

setHandler<K>(methodName, method): WalletAPIServer

Type parameters

NameType
Kextends keyof WalletHandlers

Parameters

NameType
methodNameK
methodWalletHandlers[K]

Returns

WalletAPIServer

Defined in

server/src/WalletAPIServer.ts:65


setPermissions

setPermissions(permission): WalletAPIServer

Parameters

NameType
permissionPermission

Returns

WalletAPIServer

Defined in

server/src/WalletAPIServer.ts:49