Home Reference Source
public class | source

MultiSig

Static Method Summary

Static Public Methods
public static

createPrivateKey(saltDates: *): *

public static

createTransaction(numKeysRequired: *)

public static

generateAddress(publicKeys: *): *

users public Keys which are used in generating a multi sig address

public static

getMultiAESDecrypt(buffer: *, passwordsArray: *): *

public static

getMultiAESEncrypt(buffer: *, passwordsArray: *): *

public static

getPublicKeyFromPrivate(privateKey: *): *

public static

makeMultisigAddress(saltDates: *): {}

Generates 3 users' private keys => 3 users public Keys which are used in generating a multi sig address each users privateKey is mapped with multisig address to return the multisig privateKey attached to the user privateKey

public static

multisigPrivateKey(privateKey: *): *

public static

signMessage(msg: *, privateKey: *): *

public static

validateSignedMessage(msg: *, signature: *, publicKey: *): *

Static Public Methods

public static createPrivateKey(saltDates: *): * source

Params:

NameTypeAttributeDescription
saltDates *

Return:

*

public static createTransaction(numKeysRequired: *) source

create (and broadcast via 3PBP) a Transaction with a 2-of-4 P2SH(multisig) input https://github.com/BitcoinJSjs/BitcoinJSjs-lib/blob/e0f24fdd46e11533a7140e02dc43b04a4cc4522e/test/integration/transactions.js#L115

Params:

NameTypeAttributeDescription
numKeysRequired *

public static generateAddress(publicKeys: *): * source

users public Keys which are used in generating a multi sig address

Params:

NameTypeAttributeDescription
publicKeys *

Return:

*

Example:

let pubKeys = [ '026477115981fe981a6918a6297d9803c4dc04f328f22041bedff886bbc2962e01', '02c96db2302d19b43d4c69368babace7854cc84eb9e061cde51cfa77ca4a22b8b9', '03c6103b3b83e4a24a0e33a4df246ef11772f9992663db0c35759a5e2ebf68d8e9' ]; let address = InterfaceBlockchainAddressHelper2.generateAddress(pubKeys);

public static getMultiAESDecrypt(buffer: *, passwordsArray: *): * source

Params:

NameTypeAttributeDescription
buffer *

is the data to be decrypted

passwordsArray *

is the array with password for decrypt

Return:

*

multiAES decryption of buffer

public static getMultiAESEncrypt(buffer: *, passwordsArray: *): * source

Params:

NameTypeAttributeDescription
buffer *

is the data to be encrypted

passwordsArray *

is the array with password for encrypt

Return:

*

multiAES encryption of buffer

public static getPublicKeyFromPrivate(privateKey: *): * source

Params:

NameTypeAttributeDescription
privateKey *

Return:

*

public static makeMultisigAddress(saltDates: *): {} source

Generates 3 users' private keys => 3 users public Keys which are used in generating a multi sig address each users privateKey is mapped with multisig address to return the multisig privateKey attached to the user privateKey

Params:

NameTypeAttributeDescription
saltDates *

Return:

{}

public static multisigPrivateKey(privateKey: *): * source

Params:

NameTypeAttributeDescription
privateKey *

Return:

*

public static signMessage(msg: *, privateKey: *): * source

Params:

NameTypeAttributeDescription
msg *
privateKey *

Return:

*

public static validateSignedMessage(msg: *, signature: *, publicKey: *): * source

Params:

NameTypeAttributeDescription
msg *
signature *
publicKey *

Return:

*