DappNetworkConfig

data class DappNetworkConfig(val networkId: String, val jsonApiBaseUrl: String? = null, val synchronizerId: String? = null, val accessTokenProvider: suspend () -> String? = null)

The network a session operates on, and how to reach its JSON Ledger API.

Constructors

Link copied to clipboard
constructor(networkId: String, jsonApiBaseUrl: String? = null, synchronizerId: String? = null, accessTokenProvider: suspend () -> String? = null)

Properties

Link copied to clipboard
val accessTokenProvider: suspend () -> String?

Mints a ledger access token. Its value never reaches a dApp.

Link copied to clipboard

Base URL of the JSON Ledger API, e.g. http://127.0.0.1:2975.

Link copied to clipboard

CAIP-2 network id, e.g. canton:da-mainnet.

Link copied to clipboard

The synchronizer the wallet submits to. Supplied by the wallet, never by a dApp.

Functions

Link copied to clipboard

The dApp-visible view. DappNetwork.accessToken is deliberately absent: handing a dApp a ledger token would let it act without the wallet, which defeats every approval in this file.