Icon LinkClass: Signer

@fuel-ts/account .Signer

Icon LinkConstructors

Icon Linkconstructor

new Signer(privateKey): Signer

Create a Signer instance from a given private key

Icon LinkParameters

NameTypeDescription
privateKeyBytesLike The private key to use for signing

Icon LinkReturns

Signer

A new Signer instance

Icon LinkDefined in

packages/account/src/signer/signer.ts:24 Icon Link

Icon LinkProperties

Icon Linkaddress

Readonly address: Address

Icon LinkDefined in

packages/account/src/signer/signer.ts:10 Icon Link


Icon LinkcompressedPublicKey

Readonly compressedPublicKey: string

Icon LinkDefined in

packages/account/src/signer/signer.ts:14 Icon Link


Icon LinkprivateKey

Readonly privateKey: string

Icon LinkDefined in

packages/account/src/signer/signer.ts:16 Icon Link


Icon LinkpublicKey

Readonly publicKey: string

Icon LinkDefined in

packages/account/src/signer/signer.ts:12 Icon Link

Icon LinkMethods

Icon LinkaddPoint

addPoint(point): string

Add point on the current elliptic curve

Icon LinkParameters

NameTypeDescription
pointBytesLike Point to add on the curve

Icon LinkReturns

string

compressed point on the curve

Icon LinkDefined in

packages/account/src/signer/signer.ts:72 Icon Link


Icon LinkextendPublicKey

extendPublicKey(publicKey): string

Extended publicKey from a compact publicKey

Icon LinkParameters

NameTypeDescription
publicKeyBytesLike Compact publicKey

Icon LinkReturns

string

extended publicKey

Icon LinkDefined in

packages/account/src/signer/signer.ts:130 Icon Link


Icon LinkgeneratePrivateKey

generatePrivateKey(entropy?): string | Uint8Array

Generate a random privateKey

Icon LinkParameters

NameTypeDescription
entropy?BytesLike Adds extra entropy to generate the privateKey

Icon LinkReturns

string | Uint8Array

random 32-byte hashed

Icon LinkDefined in

packages/account/src/signer/signer.ts:120 Icon Link


Icon LinkrecoverAddress

recoverAddress(data, signature): Address

Recover the address from a signature performed with sign .

Icon LinkParameters

NameTypeDescription
dataBytesLike Data
signatureBytesLike Signature

Icon LinkReturns

Address

Address from signature

Icon LinkDefined in

packages/account/src/signer/signer.ts:110 Icon Link


Icon LinkrecoverPublicKey

recoverPublicKey(data, signature): string

Recover the public key from a signature performed with sign .

Icon LinkParameters

NameTypeDescription
dataBytesLike Data
signatureBytesLike hashed signature

Icon LinkReturns

string

public key from signature from the

Icon LinkDefined in

packages/account/src/signer/signer.ts:86 Icon Link