@gala-chain/connect ∙ API
API > TrustWalletConnectClient
Class: TrustWalletConnectClient
Contents
- Extends
- Constructors
- new TrustWalletConnectClient()
- Properties
- address
- isInitialized
- options
- provider
- Accessors
- ethereumAddress
- galaChainAddress
- Methods
- calculatePersonalSignPrefix()
- connect()
- disconnect()
- emit()
- getPublicKey()
- initializeListeners()
- off()
- on()
- onAccountsChanged()
- sign()
- signMessage()
- submit()
Extends
Constructors
new TrustWalletConnectClient()
new TrustWalletConnectClient():
TrustWalletConnectClient
Overrides
BrowserConnectClient
.constructor
Source
chain-connect/src/customClients/TrustWalletConnectClient.ts:93
Properties
address
protected
address:string
Inherited from
Source
chain-connect/src/GalaChainClient.ts:153
isInitialized
protected
isInitialized:boolean
=false
Inherited from
BrowserConnectClient
.isInitialized
Source
chain-connect/src/customClients/BrowserConnectClient.ts:30
options
protected
options?:GalaChainProviderOptions
Inherited from
Source
chain-connect/src/GalaChainClient.ts:39
provider
protected
provider:undefined
|BrowserProvider
Inherited from
Source
chain-connect/src/GalaChainClient.ts:154
Accessors
ethereumAddress
get
ethereumAddress():string
set
ethereumAddress(val
):void
Parameters
▪ val: string
Source
chain-connect/src/GalaChainClient.ts:166
galaChainAddress
get
galaChainAddress():string
Source
chain-connect/src/GalaChainClient.ts:170
Methods
calculatePersonalSignPrefix()
calculatePersonalSignPrefix(
payload
):string
Parameters
▪ payload: object
Inherited from
BrowserConnectClient
.calculatePersonalSignPrefix
Source
chain-connect/src/GalaChainClient.ts:138
connect()
connect():
Promise
\<string
>
Overrides
Source
chain-connect/src/customClients/TrustWalletConnectClient.ts:98
disconnect()
disconnect():
void
Inherited from
BrowserConnectClient
.disconnect
Source
chain-connect/src/customClients/BrowserConnectClient.ts:86
emit()
emit(
event
,data
):boolean
Parameters
▪ event: keyof MetaMaskEvents
▪ data: null
| string
| string
[]
Inherited from
Source
chain-connect/src/GalaChainClient.ts:186
getPublicKey()
getPublicKey():
Promise
\<object
>
Inherited from
BrowserConnectClient
.getPublicKey
Source
chain-connect/src/GalaChainClient.ts:190
initializeListeners()
protected
initializeListeners():void
Initializes the listeners to watch for events from the provider. Not all providers may support every event
Inherited from
BrowserConnectClient
.initializeListeners
Source
chain-connect/src/customClients/BrowserConnectClient.ts:48
off()
off(
event
,listener
):TrustWalletConnectClient
Parameters
▪ event: keyof MetaMaskEvents
▪ listener: Listener
\<null
| string
| string
[]>
Inherited from
Source
chain-connect/src/GalaChainClient.ts:181
on()
on(
event
,listener
):TrustWalletConnectClient
Parameters
▪ event: keyof MetaMaskEvents
▪ listener: Listener
\<null
| string
| string
[]>
Inherited from
Source
chain-connect/src/GalaChainClient.ts:176
onAccountsChanged()
protected
onAccountsChanged(accounts
):void
Parameters
▪ accounts: string
[]
Inherited from
BrowserConnectClient
.onAccountsChanged
Source
chain-connect/src/customClients/BrowserConnectClient.ts:58
sign()
sign\<
T
>(method
,payload
,signingType
):Promise
\<T
&object
>
Type parameters
▪ T extends object
Parameters
▪ method: string
▪ payload: T
▪ signingType: SigningType
= SigningType.SIGN_TYPED_DATA
Inherited from
Source
chain-connect/src/customClients/BrowserConnectClient.ts:94
signMessage()
signMessage(
message
):Promise
\<string
>
Parameters
▪ message: string
Inherited from
BrowserConnectClient
.signMessage
Source
chain-connect/src/GalaChainClient.ts:204
submit()
submit\<
T
,U
>(__namedParameters
):Promise
\<GalaChainResponseSuccess
\<T
>>
Type parameters
▪ T
▪ U extends object
Parameters
▪ __namedParameters: object
▪ __namedParameters.headers?: Record
\<string
, string
>
▪ __namedParameters.method: string
▪ __namedParameters.payload: ConstructorArgs
\<U
>
▪ __namedParameters.requestConstructor?: ClassConstructor
\<ChainCallDTO
>
▪ __namedParameters.responseConstructor?: NonArrayClassConstructor
\<T
>
▪ __namedParameters.sign?: boolean
▪ __namedParameters.signingType?: SigningType
▪ __namedParameters.url: string