@ledgerhq/wallet-api-server
Classes
Interfaces
Type Aliases
ClientContext
Ƭ ClientContext: { accounts$
: BehaviorSubject
<Account
[]> ; currencies$
: BehaviorSubject
<Currency
[]> } & ClientParams
Defined in
packages/server/src/types.ts:115
ClientParams
Ƭ ClientParams: Object
Type declaration
Name | Type |
---|---|
id | string |
permissions | { currencies : string [] ; methods : string [] } |
permissions.currencies | string [] |
permissions.methods | string [] |
Defined in
packages/server/src/types.ts:107
RPCHandler
Ƭ RPCHandler<TResult
>: (request
: RpcRequest
<string
, unknown
>, context
: WalletContext
, handlers
: Partial
<WalletHandlers
>) => Promise
<TResult
>
Type parameters
Name |
---|
TResult |
Type declaration
▸ (request
, context
, handlers
): Promise
<TResult
>
Parameters
Name | Type |
---|---|
request | RpcRequest <string , unknown > |
context | WalletContext |
handlers | Partial <WalletHandlers > |
Returns
Promise
<TResult
>
Defined in
packages/server/src/types.ts:23
ServerConfig
Ƭ ServerConfig: Object
Type declaration
Name | Type |
---|---|
appId | string |
tracking | boolean |
userId | string |
wallet | WalletInfo |
Defined in
packages/server/src/types.ts:125
TransformHandler
Ƭ TransformHandler<T
>: { [K in keyof T]: RPCHandler<ReturnTypeOfMethodIfExists<T, K>> }
Type parameters
Name |
---|
T |
Defined in
packages/server/src/types.ts:103
WalletContext
Ƭ WalletContext: Object
Type declaration
Name | Type |
---|---|
accounts$ | Observable <Account []> |
config | ServerConfig |
currencies$ | Observable <Currency []> |
Defined in
packages/server/src/types.ts:17
WalletInfo
Ƭ WalletInfo: Object
Type declaration
Name | Type |
---|---|
name | string |
version | string |
Defined in
packages/server/src/types.ts:120
Functions
useWalletAPIServer
▸ useWalletAPIServer(«destructured»
): Object
Parameters
Name | Type |
---|---|
«destructured» | Object |
› accounts | Account [] |
› config | ServerConfig |
› 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" })[] |
› logger? | Logger |
› permission | Permission |
› transport | Transport |
Returns
Object
Name | Type |
---|---|
onMessage | (event : string ) => void |
server | WalletAPIServer |
Defined in
packages/server/src/react.ts:12