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
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"
| "filecoin"
| "hedera"
| "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
Name | Type |
---|---|
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
Name | Type |
---|---|
K | extends "event.account.updated" |
Parameters
Name | Type |
---|---|
method | K |
params | MethodParamsIfExists <AppHandlers , K > |
Returns
void
Inherited from
RpcNode.notify
Defined in
core/lib/JSONRPC/RpcNode.d.ts:15
onRequest
▸ Protected
onRequest(request
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
request | RpcRequest <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
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
core/lib/JSONRPC/RpcNode.d.ts:14
setAccounts
▸ setAccounts(accounts
): WalletAPIServer
Parameters
Name | Type |
---|---|
accounts | Account [] |
Returns
Defined in
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" | "filecoin" | "hedera" | "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
Defined in
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
server/src/WalletAPIServer.ts:65
setPermissions
▸ setPermissions(permission
): WalletAPIServer
Parameters
Name | Type |
---|---|
permission | Permission |
Returns
Defined in
server/src/WalletAPIServer.ts:49