Home Reference Source
import {Account} from '@solana/web3'
public class | source

Account

An account key pair (public and secret keys).

Constructor Summary

Public Constructor
public

constructor(secretKey: Buffer | Uint8Array | Array<number>)

Create a new Account object

Member Summary

Public Members
public get

The public key for this account

public get

secretKey: Buffer

The unencrypted secret key for this account

Public Constructors

public constructor(secretKey: Buffer | Uint8Array | Array<number>) source

Create a new Account object

If the secretKey parameter is not provided a new key pair is randomly created for the account

Params:

NameTypeAttributeDescription
secretKey Buffer | Uint8Array | Array<number>

Secret key for the account

Public Members

public get publicKey: PublicKey source

The public key for this account

public get secretKey: Buffer source

The unencrypted secret key for this account