WalletConnect

WalletConnect Functions and Hooks

Init

Description​​

Initializes WalletConnect and connects to saved connections. You can't use any other functions before calling this one.

Return type​

Promise<void>

Usage Example

await sdk.walletConnect.init()

Connect

Description​

Connect the wallet to the dApp

Parameters​

NameTypeRequiredDefaultDescription

blockchainId

String

βœ”οΈ

Blockchain id

uri

String

βœ”οΈ

WalletConnect connection URI

Return type​

Promise<void>

Usage Example​

sdk.walletConnect.connect({ blockchainId: 'ethereum', uri: 'wc:f589920...eb61aa1' })

Get Connections

Description​

Returns the list of all the currently connected dApps

Return type​

{
  "blockchainId": string,
  "id": string,
  "platform": {
    "description": string,
    "icons": string[],
    "name": string,
    "url": string
  }
}

Usage Example​

const connections = sdk.walletConnect.getConnections()

Disconnect

Description​​

Disconnects wallet from the dApp

Parameters​

NameTypeRequiredDefaultDescription

id

String

βœ”οΈ

ID of connection

Return type​

Promise<void>

Usage Example​

const connections = sdk.walletConnect.getConnections()
sdk.walletConnect.disconnect(connections[0].id)

Last updated