Skip to main content

Class: NoOpSigner

Represents a Signer implementation that throws exceptions on every method that is used.

Hierarchy

Constructors

constructor

new NoOpSigner(): NoOpSigner

Returns

NoOpSigner

Overrides

Signer.constructor

Defined in

packages/core/src/signers/noop.ts:12

Accessors

isConnected

get isConnected(): boolean

Tells whether the signer is connected or not.

Returns

boolean

Inherited from

Signer.isConnected

Defined in

packages/core/src/signers/signer.ts:104


signingMode

get signingMode(): SigningMode

Returns the signing mode supported by the signer.

Returns

SigningMode

Overrides

Signer.signingMode

Defined in

packages/core/src/signers/noop.ts:20


status

get status(): SignerStatus

Gets the current signer status.

Returns

SignerStatus

Inherited from

Signer.status

Defined in

packages/core/src/signers/signer.ts:97

Methods

addStatusListener

addStatusListener(observer): void

Adds an observer that will be called each time the signer changes state.

Parameters

NameTypeDescription
observerSignerObserverThe observer to be called.

Returns

void

Inherited from

Signer.addStatusListener

Defined in

packages/core/src/signers/signer.ts:82


assertConnected

assertConnected(): void

Checks if the signer is connected and if not throws a SignerNotConnected exception.

Returns

void

Inherited from

Signer.assertConnected

Defined in

packages/core/src/signers/signer.ts:72


connect

connect(): Promise<void>

Connects the signer. If the signer is already connected no actions will be performed.

Returns

Promise<void>

Overrides

Signer.connect

Defined in

packages/core/src/signers/noop.ts:16


disconnect

disconnect(): Promise<void>

Disconnect the signer. If the signer is already disconnect no actions will be performed.

Returns

Promise<void>

Overrides

Signer.disconnect

Defined in

packages/core/src/signers/noop.ts:24


getAccounts

getAccounts(): Promise<readonly []>

Gets all the accounts managed by the signer.

NOTE: In some signer implementations, this method might execute asynchronously. This means the returned promise might never complete.

Returns

Promise<readonly []>

Overrides

Signer.getAccounts

Defined in

packages/core/src/signers/noop.ts:32


getCurrentAccount

getCurrentAccount(): Promise<undefined | AccountData>

Gets the account selected by the user as the account to be used, or undefined if no account has been selected yet.

Returns

Promise<undefined | AccountData>

Overrides

Signer.getCurrentAccount

Defined in

packages/core/src/signers/noop.ts:28


removeStatusListener

removeStatusListener(observer): void

Removes an observer so that it will not be called when the status changes.

Parameters

NameTypeDescription
observerSignerObserverThe observer to be removed.

Returns

void

Inherited from

Signer.removeStatusListener

Defined in

packages/core/src/signers/signer.ts:90


signAmino

signAmino(signerAddress, signDoc): Promise<AminoSignResponse>

Implements OfflineAminoSigner.

Parameters

NameType
signerAddressstring
signDocStdSignDoc

Returns

Promise<AminoSignResponse>

Overrides

Signer.signAmino

Defined in

packages/core/src/signers/noop.ts:36


signDirect

signDirect(signerAddress, signDoc): Promise<DirectSignResponse>

Implements OfflineDirectSigner.

Parameters

NameType
signerAddressstring
signDocSignDoc

Returns

Promise<DirectSignResponse>

Overrides

Signer.signDirect

Defined in

packages/core/src/signers/noop.ts:43


updateStatus

updateStatus(newStatus): void

Updates the signer status and notifies the observers.

Parameters

NameTypeDescription
newStatusSignerStatusThe new signer status.

Returns

void

Inherited from

Signer.updateStatus

Defined in

packages/core/src/signers/signer.ts:63