Class: WalletAPIServer
Hierarchy
RpcNode
<typeofinternalHandlers
,AppHandlers
>↳
WalletAPIServer
Constructors
constructor
• new WalletAPIServer(transport
, config
, logger?
)
Parameters
Name | Type | Default value |
---|---|---|
transport | Transport | undefined |
config | ServerConfig | undefined |
logger | Logger | defaultLogger |
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
Name | Type |
---|---|
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
Name | Type |
---|---|
K | extends "event.account.updated" |
Parameters
Name | Type |
---|---|
method | K |
params | MethodParamsIfExists <AppHandlers , K > |
Returns
void
Inherited from
RpcNode.notify
Defined in
packages/core/src/JSONRPC/RpcNode.ts:102
onRequest
▸ Protected
onRequest(request
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
request | RpcRequest <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
Name | Type |
---|---|
K | extends "event.account.updated" |
Parameters
Name | Type |
---|---|
method | K |
params | MethodParamsIfExists <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
Name | Type |
---|---|
accounts | Account [] |
Returns
Defined in
packages/server/src/WalletAPIServer.ts:60
setCurrencies
▸ setCurrencies(currencies
): WalletAPIServer
Parameters
Name | Type |
---|---|
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
Defined in
packages/server/src/WalletAPIServer.ts:55
setHandler
▸ setHandler<K
>(methodName
, method
): WalletAPIServer
Type parameters
Name | Type |
---|---|
K | extends keyof WalletHandlers |
Parameters
Name | Type |
---|---|
methodName | K |
method | WalletHandlers [K ] |
Returns
Defined in
packages/server/src/WalletAPIServer.ts:65
setPermissions
▸ setPermissions(permission
): WalletAPIServer
Parameters
Name | Type |
---|---|
permission | Permission |
Returns
Defined in
packages/server/src/WalletAPIServer.ts:49