참고: 이 페이지는 아직 한국어로 번역되지 않았습니다. 아래는 영어 원문입니다.
A signer that uses JSON-RPC to sign transactions and messages.

Extends

Constructors

new JsonRpcSigner()

new JsonRpcSigner(provider, address): JsonRpcSigner
Creates a new JsonRpcSigner instance.

Parameters

ParameterTypeDescription
providerJsonRpcApiProvider<any>The JSON-RPC provider.
addressstringThe address of the signer.

Returns

JsonRpcSigner

Overrides

AbstractSigner.constructor

Source

providers/provider-jsonrpc.ts:328

Properties

PropertyModifierTypeDescriptionInherited from
providerreadonlyJsonRpcApiProvider<FetchRequest>The provider this signer is connected to.AbstractSigner.provider

Methods

connect()

connect(provider): Signer
Connects the signer to a provider.

Parameters

ParameterTypeDescription
providernull | ProviderThe provider to connect to.

Returns

Signer The connected signer.

Overrides

AbstractSigner.connect

Throws

If the signer cannot be reconnected.

Source

providers/provider-jsonrpc.ts:342

getAddress()

getAddress(): Promise<string>
Gets the address of the signer.

Returns

Promise<string> The address of the signer.

Overrides

AbstractSigner.getAddress

Source

providers/provider-jsonrpc.ts:353

sendTransaction()

sendTransaction(tx): Promise<TransactionResponse>
Sends a transaction.

Parameters

ParameterTypeDescription
txTransactionRequestThe transaction request.

Returns

Promise<TransactionResponse> The transaction response.

Overrides

AbstractSigner.sendTransaction

Throws

If the transaction cannot be sent.

Source

providers/provider-jsonrpc.ts:438

signMessage()

signMessage(_message): Promise<string>
Signs a message.

Parameters

ParameterTypeDescription
_messagestring | Uint8ArrayThe message to sign.

Returns

Promise<string> The signed message.

Overrides

AbstractSigner.signMessage

Source

providers/provider-jsonrpc.ts:551

signTransaction()

signTransaction(_tx): Promise<string>
Signs a transaction.

Parameters

ParameterTypeDescription
_txTransactionRequestThe transaction request.

Returns

Promise<string> The signed transaction.

Overrides

AbstractSigner.signTransaction

Throws

If the transaction cannot be signed.

Source

providers/provider-jsonrpc.ts:521

signTypedData()

signTypedData(
   domain, 
   types, 
_value): Promise<string>
Signs typed data.

Parameters

ParameterTypeDescription
domainTypedDataDomainThe domain of the typed data.
typesRecord<string, TypedDataField[]>The types of the typed data.
_valueRecord<string, any>The value of the typed data.

Returns

Promise<string> The signed typed data.

Overrides

AbstractSigner.signTypedData

Source

providers/provider-jsonrpc.ts:564

unlock()

unlock(password): Promise<boolean>
Unlocks the account.

Parameters

ParameterTypeDescription
passwordstringThe password to unlock the account.

Returns

Promise<boolean> True if the account is unlocked, false otherwise.

Source

providers/provider-jsonrpc.ts:583