Options
All
  • Public
  • Public/Protected
  • All
Menu

A simple interface used to define the options for wallet connect interaction

Hierarchy

  • WcConnectOptions

Index

Properties

appMetadata

appMetadata: AppMetadata

the dApp metadata to be shown on the wallet

{
name: "My dApp Name",
description: "This is the dApp description",
url: "https://mydappwebsite.com/",
icons: ["https://mydappwebsite.com/icon.png"]
}

Optional chainId

chainId?: string
deprecated

Use chains instead

Optional chains

chains?: string[]

Defines with which chains the dApp accepts to connect to

['neo3:mainnet', 'neo3:testnet', 'neo3:private']

The wallet will decide which chain it will use and the dApp can check the choice by calling one of the methods below:

// calling the static method passing a session as parameter
const chain = WcSdk.getChainId(session)
// calling the getter of an instance of WcSdk
const chain = wcInstance.chainId

methods

methods: ("invokeFunction" | "testInvoke" | "signMessage" | "verifyMessage" | "getapplicationlog")[]

Which methods the dApp needs authorization to call

[
'invokeFunction', // makes real invocations that persist data on the blockchain
'testInvoke', // makes test invocations that don't require user authorization, often used to retrieve information provided by the SmartContract
// You can also provide any other method name present on the RpcServer, eg.:
'getversion'
]

Optional topic

topic?: string

Only necessary if you've already had a connection and wants to reconnect to it

Generated using TypeDoc