Skip to main content

@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

NameType
idstring
permissions{ currencies: string[] ; methods: string[] }
permissions.currenciesstring[]
permissions.methodsstring[]

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
NameType
requestRpcRequest<string, unknown>
contextWalletContext
handlersPartial<WalletHandlers>
Returns

Promise<TResult>

Defined in

packages/server/src/types.ts:23


ServerConfig

Ƭ ServerConfig: Object

Type declaration

NameType
appIdstring
trackingboolean
userIdstring
walletWalletInfo

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

NameType
accounts$Observable<Account[]>
configServerConfig
currencies$Observable<Currency[]>

Defined in

packages/server/src/types.ts:17


WalletInfo

Ƭ WalletInfo: Object

Type declaration

NameType
namestring
versionstring

Defined in

packages/server/src/types.ts:120

Functions

useWalletAPIServer

useWalletAPIServer(«destructured»): Object

Parameters

NameType
«destructured»Object
› accountsAccount[]
› configServerConfig
› 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
› permissionPermission
› transportTransport

Returns

Object

NameType
onMessage(event: string) => void
serverWalletAPIServer

Defined in

packages/server/src/react.ts:12