Skip to content

Virto Signer API


Virto Signer API / signer/src / KreivoPassSigner

Class: KreivoPassSigner ​

Defined in: signer/src/signer.ts:22

Implements ​

  • PolkadotSigner

Constructors ​

Constructor ​

new KreivoPassSigner(authenticator): KreivoPassSigner

Defined in: signer/src/signer.ts:25

Parameters ​

authenticator ​

Authenticator<number>

Returns ​

KreivoPassSigner

Properties ​

publicKey ​

publicKey: Uint8Array<ArrayBufferLike>

Defined in: signer/src/signer.ts:23

Implementation of ​

PolkadotSigner.publicKey

Methods ​

makeSessionKeySigner() ​

makeSessionKeySigner(): [PolkadotSigner & object, SS58String]

Defined in: signer/src/signer.ts:38

Creates a sr25519 signer, and injects the publicKey to make the transaction maker use the Pass Account nonce.

Returns ​

[PolkadotSigner & object, SS58String]

A tuple with the signer and the address of the session key to be added.


signBytes() ​

signBytes(_): Promise<Uint8Array<ArrayBufferLike>>

Defined in: signer/src/signer.ts:124

Signs an arbitrary payload.

The signer may enforce certain restrictions to ensure that raw bytes passed do not constitute, for instance, a valid extrinsic.

Parameters ​

_ ​

Uint8Array

Returns ​

Promise<Uint8Array<ArrayBufferLike>>

A raw cryptographic signature.

Implementation of ​

PolkadotSigner.signBytes


signTx() ​

signTx(call, signedExtensions, encodedMetadata, atBlockNumber, hasher?): Promise<Uint8Array<ArrayBufferLike>>

Defined in: signer/src/signer.ts:49

Signs a transaction (extrinsic) for broadcasting.

Parameters ​

call ​

Uint8Array

signedExtensions ​

Record<string, TransactionExtensionMetadata>

Extensions that should be signed along with the extrinsic. The record's key represents the identifier, which is included both as the key and within the value for convenience. The value represents the extra portion, which is included in the extrinsic itself, while additionalSigned is the part that is signed but not included in the extrinsic.

encodedMetadata ​

Uint8Array

atBlockNumber ​

number

The block number at which the transaction has been created.

hasher? ​

(encoded) => Uint8Array<ArrayBufferLike>

An optional hashing function to build the extrinsic with. Defaults to Blake2b with a 256-bit hash length.

Returns ​

Promise<Uint8Array<ArrayBufferLike>>

A signed extrinsic ready to be broadcasted.

Implementation of ​

PolkadotSigner.signTx