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

packages/server/src/WalletAPIServer.ts:99

Properties

allAccounts$

Private allAccounts$: BehaviorSubject<Account[]>

Defined in

packages/server/src/WalletAPIServer.ts:31


allCurrencies$

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

Defined in

packages/server/src/WalletAPIServer.ts:35


logger

Private logger: Logger

Defined in

packages/server/src/WalletAPIServer.ts:27


permissions

Private permissions: Object

Type declaration

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

Defined in

packages/server/src/WalletAPIServer.ts:41


requestHandlers

Protected requestHandlers: TransformHandler<WalletHandlers>

Inherited from

RpcNode.requestHandlers

Defined in

packages/core/src/JSONRPC/RpcNode.ts:28


walletContext

Private walletContext: WalletContext

Defined in

packages/server/src/WalletAPIServer.ts:29


walletHandlers

Private walletHandlers: Partial<WalletHandlers> = {}

Defined in

packages/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

packages/core/src/JSONRPC/RpcNode.ts:102


onRequest

Protected onRequest(request): Promise<unknown>

Parameters

NameType
requestRpcRequest<string, unknown>

Returns

Promise<unknown>

Overrides

RpcNode.onRequest

Defined in

packages/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

packages/core/src/JSONRPC/RpcNode.ts:89


setAccounts

setAccounts(accounts): WalletAPIServer

Parameters

NameType
accountsAccount[]

Returns

WalletAPIServer

Defined in

packages/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" | "hedera" | "filecoin" | "tezos" | "polkadot" | "stellar" | "tron" | "near" | "neo" | "elrond" | "cardano" | "solana" = schemaFamilies; id: string ; name: string ; ticker: string ; type: "CryptoCurrency" } | { color: string ; contract: string ; decimals: number ; id: string ; name: string ; parent: string ; standard: "ERC20" = schemaTokenStandard; ticker: string ; type: "TokenCurrency" })[]

Returns

WalletAPIServer

Defined in

packages/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

packages/server/src/WalletAPIServer.ts:65


setPermissions

setPermissions(permission): WalletAPIServer

Parameters

NameType
permissionPermission

Returns

WalletAPIServer

Defined in

packages/server/src/WalletAPIServer.ts:49