Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DAppClientOptions

Hierarchy

  • DAppClientOptions

Index

Properties

Optional appUrl

appUrl: string

A URL to the website of the application

Optional blockExplorer

blockExplorer: BlockExplorer

The block explorer used by the SDK

Optional colorMode

colorMode: LIGHT | DARK

Set the color mode for the UI elements (alerts and toasts)

Optional disableDefaultEvents

disableDefaultEvents: boolean

Disable all default Events and UI elements. If passed together with "eventHandlers", the default eventHandlers will be removed, and the ones passed by the user will be added.

Optional eventHandlers

eventHandlers: { ACKNOWLEDGE_RECEIVED: any; ACTIVE_ACCOUNT_SET: any; ACTIVE_TRANSPORT_SET: any; BROADCAST_REQUEST_ERROR: any; BROADCAST_REQUEST_SENT: any; BROADCAST_REQUEST_SUCCESS: any; CHANNEL_CLOSED: any; INTERNAL_ERROR: any; LOCAL_RATE_LIMIT_REACHED: any; NO_PERMISSIONS: any; OPERATION_REQUEST_ERROR: any; OPERATION_REQUEST_SENT: any; OPERATION_REQUEST_SUCCESS: any; PAIR_INIT: any; PAIR_SUCCESS: any; PERMISSION_REQUEST_ERROR: any; PERMISSION_REQUEST_SENT: any; PERMISSION_REQUEST_SUCCESS: any; SIGN_REQUEST_ERROR: any; SIGN_REQUEST_SENT: any; SIGN_REQUEST_SUCCESS: any; UNKNOWN: any }

An object that will be used to overwrite default event handler behaviour.

If you plan to overwrite all default events, use "disableDefaultEvents" instead.

This will overwrite the default event handler, so this can lead to unexpected behavior in some cases. We recommend that you overwrite all handlers if you want to use your own UI.

If you simply want to be notified of events happening, but do not want to overwrite the default behavior, please use subscribeToEvent() on the DAppClient instead.

Type declaration

Optional iconUrl

iconUrl: string

A URL to the icon of the application

Optional matrixNodes

matrixNodes: string[]

A list of matrix nodes to connect to. If a non-empty array is passed, the default options will be overwritten. One node will be randomly selected based on the local keypair and the other nodes will be used as a fallback in case the primary node goes down.

Only provide the hostname, no https:// prefix. Eg. ['matrix.example.com']

name

name: string

Name of the application

Optional preferredNetwork

preferredNetwork: MAINNET | DELPHINET | EDONET | FLORENCENET | CUSTOM

Indicates on which network the DApp is planning to run. This is currently used to adjust the URLs of web-wallets in the pairing alert if they use different URLs for testnets. You will still have to define the network you intend to use during the permission request.

Optional storage

storage: Storage

The storage that will be used by the SDK

Generated using TypeDoc