HttpLedgerApiProxy

ledgerApi backed by JsonLedgerApiClient.

The wallet supplies the credentials, so this is the authenticating proxy CIP-0103 describes. What it must not become is an open door: pair it with a LedgerApiPolicy — DappSession applies LedgerApiPolicy.ReadOnly by default — because the wallet's token is considerably more privileged than anything a dApp should wield through it.

Constructors

Link copied to clipboard
constructor(client: JsonLedgerApiClient)

Functions

Link copied to clipboard
open suspend override fun call(request: LedgerApiRequest): JsonElement

Performs request with the wallet's own credentials and returns the response body as raw JSON. Called only after the session's LedgerApiPolicy allowed it.