@ledgerhq/wallet-api-server
Classes
Interfaces
Type Aliases
ClientContext
Ƭ ClientContext: { accounts$
: BehaviorSubject
<Account
[]> ; currencies$
: BehaviorSubject
<Currency
[]> } & ClientParams
Defined in
server/src/types.ts:112
ClientParams
Ƭ ClientParams: Object
Type declaration
Name | Type |
---|---|
id | string |
permissions | { currencies : string [] ; methods : string [] } |
permissions.currencies | string [] |
permissions.methods | string [] |
Defined in
server/src/types.ts:104
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
server/src/types.ts:23
ServerConfig
Ƭ ServerConfig: Object
Type declaration
Name | Type |
---|---|
appId | string |
tracking | boolean |
userId | string |
wallet | WalletInfo |
Defined in
server/src/types.ts:122
TransformHandler
Ƭ TransformHandler<T
>: { [K in keyof T]: RPCHandler<ReturnTypeOfMethodIfExists<T, K>> }
Type parameters
Name |
---|
T |
Defined in
server/src/types.ts:100
WalletContext
Ƭ WalletContext: Object
Type declaration
Name | Type |
---|---|
accounts$ | Observable <Account []> |
config | ServerConfig |
currencies$ | Observable <Currency []> |
Defined in
server/src/types.ts:17
WalletInfo
Ƭ WalletInfo: Object
Type declaration
Name | Type |
---|---|
name | string |
version | string |
Defined in
server/src/types.ts:117
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" | "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" })[] |
› logger? | Logger |
› permission | Permission |
› transport | Transport |
Returns
Object
Name | Type |
---|---|
onMessage | (event : string ) => void |
server | WalletAPIServer |
Defined in
server/src/react.ts:12