Home Reference Source Test
public class | source

MultiSigWallet

Extends:

Wallet → MultiSigWallet

Static Method Summary

Static Public Methods
public static

fromPublicKeys(keyPair: KeyPair, minSignatures: number, publicKeys: Array<PublicKey>): MultiSigWallet

Create a new MultiSigWallet object.

public static

async loadEncrypted(buf: Uint8Array | string, key: Uint8Array | string): Promise<MultiSigWallet>

public static

loadPlain(buf: Uint8Array | string): MultiSigWallet

Constructor Summary

Public Constructor
public

constructor(keyPair: KeyPair, minSignatures: number, publicKeys: Array<PublicKey>): MultiSigWallet

Create a new MultiSigWallet object.

Member Summary

Public Members
public get
public get

exportedSize: number

public get

minSignatures: number

public get

Method Summary

Public Methods
public

completeTransaction(transaction: Transaction, aggregatedPublicKey: PublicKey, aggregatedCommitment: Commitment, signatures: Array<PartialSignature>): Transaction

public

Creates a commitment pair for signing a transaction.

public

createTransaction(recipientAddr: Address, value: number, fee: number, validityStartHeight: number): Transaction

Create a Transaction that still needs to be signed.

public

async exportEncrypted(key: Uint8Array | string, unlockKey: Uint8Array | string): Promise<Uint8Array>

public

exportPlain(): Uint8Array

public

partiallySignTransaction(transaction: Transaction, publicKeys: Array<PublicKey>, aggregatedCommitment: Commitment, secret: RandomSecret): PartialSignature

public

signTransaction(transaction: Transaction, aggregatedPublicKey: PublicKey, aggregatedCommitment: Commitment, signatures: Array<PartialSignature>): SignatureProof

Sign a transaction by the owner of this Wallet.

Inherited Summary

From class Wallet
public static

async generate(): Promise<Wallet>

Create a new Wallet.

public static

async loadEncrypted(buf: Uint8Array | string, key: Uint8Array | string): Promise<Wallet>

public static

loadPlain(buf: Uint8Array | string): Wallet

public get

The address of the Wallet owner.

public get

isLocked: boolean

public get
public get

The public key of the Wallet owner

public

createTransaction(recipient: Address, value: number, fee: number, validityStartHeight: number): Transaction

Create a Transaction that is signed by the owner of this Wallet.

public

equals(o: Wallet): boolean

public

exportEncrypted(key: Uint8Array | string, unlockKey: Uint8Array | string): Promise<Uint8Array>

public

exportPlain(): Uint8Array

public

lock(key: Uint8Array | string): Promise<void>

public

relock()

public

Sign a transaction by the owner of this Wallet.

public

unlock(key: Uint8Array | string): Promise<void>

Static Public Methods

public static fromPublicKeys(keyPair: KeyPair, minSignatures: number, publicKeys: Array<PublicKey>): MultiSigWallet source

Create a new MultiSigWallet object.

Params:

NameTypeAttributeDescription
keyPair KeyPair

KeyPair owning this Wallet.

minSignatures number

Number of signatures required.

publicKeys Array<PublicKey>

A list of all owners' public keys.

Return:

MultiSigWallet

A newly generated MultiSigWallet.

public static async loadEncrypted(buf: Uint8Array | string, key: Uint8Array | string): Promise<MultiSigWallet> source

Override:

Wallet#loadEncrypted

Params:

NameTypeAttributeDescription
buf Uint8Array | string
key Uint8Array | string

Return:

Promise<MultiSigWallet>

public static loadPlain(buf: Uint8Array | string): MultiSigWallet source

Override:

Wallet#loadPlain

Params:

NameTypeAttributeDescription
buf Uint8Array | string

Return:

MultiSigWallet

Public Constructors

public constructor(keyPair: KeyPair, minSignatures: number, publicKeys: Array<PublicKey>): MultiSigWallet source

Create a new MultiSigWallet object.

Override:

Wallet#constructor

Params:

NameTypeAttributeDescription
keyPair KeyPair

KeyPair owning this Wallet.

minSignatures number

Number of signatures required.

publicKeys Array<PublicKey>

A list of all aggregated public keys.

Return:

MultiSigWallet

A newly generated MultiSigWallet.

Public Members

public get encryptedExportedSize: number source

public get exportedSize: number source

public get minSignatures: number source

public get publicKeys: Array<PublicKey> source

Public Methods

public completeTransaction(transaction: Transaction, aggregatedPublicKey: PublicKey, aggregatedCommitment: Commitment, signatures: Array<PartialSignature>): Transaction source

Params:

NameTypeAttributeDescription
transaction Transaction
aggregatedPublicKey PublicKey
aggregatedCommitment Commitment
signatures Array<PartialSignature>

Return:

Transaction

public createCommitment(): CommitmentPair source

Creates a commitment pair for signing a transaction.

Return:

CommitmentPair

The commitment pair.

public createTransaction(recipientAddr: Address, value: number, fee: number, validityStartHeight: number): Transaction source

Create a Transaction that still needs to be signed.

Override:

Wallet#createTransaction

Params:

NameTypeAttributeDescription
recipientAddr Address

Address of the transaction receiver

value number

Number of Satoshis to send.

fee number

Number of Satoshis to donate to the Miner.

validityStartHeight number

The validityStartHeight for the transaction.

Return:

Transaction

A prepared Transaction object.

public async exportEncrypted(key: Uint8Array | string, unlockKey: Uint8Array | string): Promise<Uint8Array> source

Override:

Wallet#exportEncrypted

Params:

NameTypeAttributeDescription
key Uint8Array | string
unlockKey Uint8Array | string
  • optional

Return:

Promise<Uint8Array>

public exportPlain(): Uint8Array source

Override:

Wallet#exportPlain

Return:

Uint8Array

public partiallySignTransaction(transaction: Transaction, publicKeys: Array<PublicKey>, aggregatedCommitment: Commitment, secret: RandomSecret): PartialSignature source

Params:

NameTypeAttributeDescription
transaction Transaction
publicKeys Array<PublicKey>
aggregatedCommitment Commitment
secret RandomSecret

public signTransaction(transaction: Transaction, aggregatedPublicKey: PublicKey, aggregatedCommitment: Commitment, signatures: Array<PartialSignature>): SignatureProof source

Sign a transaction by the owner of this Wallet.

Override:

Wallet#signTransaction

Params:

NameTypeAttributeDescription
transaction Transaction

The transaction to sign.

aggregatedPublicKey PublicKey
aggregatedCommitment Commitment
signatures Array<PartialSignature>

Return:

SignatureProof

A signature proof for this transaction.