Client
Members
Name | Type | Description |
---|---|---|
context | string | TODO |
controller | boolean | TODO |
crypto | Crypto | TODO |
encoder | Encoder | TODO |
events | EventEmitter | Node's event emitter |
heartbeat | Heartbeat | TODO |
logger | Logger | Pino logger |
metadata | AppMetadata | TODO |
name | string | TODO |
pairing | - | TODO |
projectId | string | TODO |
protocol | string | TODO |
relayUrl | string | TODO |
relayer | - | TODO |
session | - | TODO |
storage | IKeyValueStorage | TODO |
version | number | TODO |
Methods
init
Description
Initializes WalletConnect client
Interfaces
Example
init(options?: ClientOptions): Promise<Client>
approve
Description
Approves proposal (i.e pairing / signing / send ...)
Interfaces
[ClientTypes.ApproveParams] [SessionTypes.Settled]
Example
approve(params: ClientTypes.ApproveParams): Promise<SessionTypes.Settled>
connect
Description
TODO
Interfaces
[ClientTypes.ConnectParams] [SessionTypes.Settled]
Example
connect(params: ClientTypes.ConnectParams): Promise<SessionTypes.Settled>
disconnect
Description
Disconects from websocket and stops listening to events
Interfaces
[ClientTypes.DisconnectParams]
Example
disconect(params: SequenceTypes.DeleteParams): Promise<void>
extend
Description
Allows to extend lifespan of a given topic by given time
Interfaces
Example
extend(params: SequenceTypes.ExtendParams): Promise<void>
notify
Description
Sends notification to specified topic
Interfaces
Example
notify(params: SequenceTypes.NotificationEvent): Promise<void>
off
Description
Removes event subscription. Same as removeListener
Example
off(event: string, listener: Function): void
on
Description
Creates event subscription
Example
on(event: string, listener: Function): void
once
Description
Creates event subscription that only triggers once
Example
once(event: string, listener: Function): void
pair
Description
Creates / starts pairing request for a given uri
Interfaces
[ClientTypes.PairParams] [PairingTypes.Settled]
Example
pair(params: ClientTypes.PairParams): Promise<PairingTypes.Settled>
ping
Description
Pings given topic, usefull to check if connection is still valid
Interfaces
Example
ping(params: ClientTypes.PingParams): Promise<void>
reject
Description
Rejects proposal (i.e pairing / signing / send ...)
Interfaces
Example
reject(params: ClientTypes.RejectParams): Promise<void>
removeListener
Description
Removes event subscription. Same as off
Example
removeListener(event: string, listener: Function): void
request
Description
Requests for method permissions on specified chains
Interfaces
Example
request(params: ClientTypes.RequestParams): Promise<any>
respond
Description
Responds to request
Interfaces
Example
respond(params: ClientTypes.RespondParams): Promise<void>
update
Description
Updates session to i.e. include / exclude accounts
Interfaces
Example
update(params: ClientTypes.UpdateParams): Promise<void>
upgrade
Description
Upgrades pairing i.e. extending it
Interfaces
Example
upgrade(params: ClientTypes.UpgradeParams): Promise<void>