- balance
- call
- chainName
- closeConnection
- connect
- emit
- init
- initEventHandlers
- on
- onInit
- publicKey
- publicKeyAndIdentityToken
- send
- signMessage
- signTypedData
• new SignerService(_signer
, _providerType
)
Name | Type |
---|---|
_signer |
Required <SignerT > |
_providerType |
ProviderType |
• get
accountInfo(): AccountInfo
• get
address(): string
string
• get
chainId(): number
number
• get
did(): string
string
• get
didHex(): string
string
• get
isEthSigner(): boolean
boolean
• get
provider(): Provider
Provider
• get
providerType(): ProviderType
• get
signer(): Required
<SignerT
>
Required
<SignerT
>
▸ balance(): Promise
<BigNumber
>
Promise
<BigNumber
>
▸ call(__namedParameters
): Promise
<string
>
Makes a (readonly) call to a smart contract https://docs.ethers.io/v5/single-page/#/v5/api/providers/provider/-%23-Provider-call
Name | Type |
---|---|
__namedParameters |
TransactionRequest |
Promise
<string
>
The result of the call
▸ chainName(): string
string
▸ closeConnection(): Promise
<boolean
>
Promise
<boolean
>
▸ connect(signer
, providerType
): Promise
<void
>
Name | Type |
---|---|
signer |
Required <SignerT > |
providerType |
ProviderType |
Promise
<void
>
▸ emit(e
): Promise
<void
>
Name | Type |
---|---|
e |
ProviderEvent |
Promise
<void
>
▸ init(): Promise
<void
>
Promise
<void
>
▸ initEventHandlers(): void
Add event handler for certain events
requires
to be called after the connection to wallet was initialized
void
▸ on(event
, cb
): void
Name | Type |
---|---|
event |
ProviderEvent |
cb |
any |
void
▸ onInit(initializer
): void
Registers reinitialization of dependent service on signer reconnection
Name | Type |
---|---|
initializer |
ServiceInitializer |
void
▸ publicKey(): Promise
<string
>
Promise
<string
>
▸ publicKeyAndIdentityToken(): Promise
<IPubKeyAndIdentityToken
>
Promise
<IPubKeyAndIdentityToken
>
▸ send(__namedParameters
): Promise
<TransactionReceipt
>
Name | Type |
---|---|
__namedParameters |
TransactionRequest |
Promise
<TransactionReceipt
>
▸ signMessage(message
): Promise
<string
>
description
Tries to create eth_sign
conformant signature (https://eth.wiki/json-rpc/API#eth_sign)
Whether or not to hash the message prior to signature is determined by signature performed during login.
When running in browser isEthSigner
variable should be stored in local storage
Name | Type | Description |
---|---|---|
message |
Uint8Array |
The message to be signed. The message should have binary representation to avoid confusion of text with hexadecimal binary data |
Promise
<string
>
▸ signTypedData(domain
, types
, message
): Promise
<string
>
description
Tries to create conformant signature (https://eips.ethereum.org/EIPS/eip-712)
Name | Type |
---|---|
domain |
TypedDataDomain |
types |
Record <string , TypedDataField []> |
message |
Record <string , unknown > |
Promise
<string
>