@fuel-ts/account v0.94.3 • Docs
Class: Signer
Constructors
new Signer()
new Signer(
privateKey
):Signer
Create a Signer instance from a given private key
Parameters
• privateKey: BytesLike
The private key to use for signing
Returns
A new Signer instance
Defined in
packages/account/src/signer/signer.ts:24
Properties
address
readonly
address:Address
Defined in
packages/account/src/signer/signer.ts:10
compressedPublicKey
readonly
compressedPublicKey:string
Defined in
packages/account/src/signer/signer.ts:14
privateKey
readonly
privateKey:string
Defined in
packages/account/src/signer/signer.ts:16
publicKey
readonly
publicKey:string
Defined in
packages/account/src/signer/signer.ts:12
Methods
addPoint()
addPoint(
point
):string
Add point on the current elliptic curve
Parameters
• point: BytesLike
Point to add on the curve
Returns
string
compressed point on the curve
Defined in
packages/account/src/signer/signer.ts:72
extendPublicKey()
static
extendPublicKey(publicKey
):string
Extended publicKey from a compact publicKey
Parameters
• publicKey: BytesLike
Compact publicKey
Returns
string
extended publicKey
Defined in
packages/account/src/signer/signer.ts:130
generatePrivateKey()
static
generatePrivateKey(entropy
?):string
|Uint8Array
Generate a random privateKey
Parameters
• entropy?: BytesLike
Adds extra entropy to generate the privateKey
Returns
string
| Uint8Array
random 32-byte hashed
Defined in
packages/account/src/signer/signer.ts:120
recoverAddress()
static
recoverAddress(data
,signature
):Address
Recover the address from a signature performed with sign
.
Parameters
• data: BytesLike
Data
• signature: BytesLike
Signature
Returns
Address from signature
Defined in
packages/account/src/signer/signer.ts:110
recoverPublicKey()
static
recoverPublicKey(data
,signature
):string
Recover the public key from a signature performed with sign
.
Parameters
• data: BytesLike
Data
• signature: BytesLike
hashed signature
Returns
string
public key from signature from the
Defined in
packages/account/src/signer/signer.ts:86