multiSign

Usage

visionWeb.vs.multiSign(transaction, privateKey, permissionId);

Parameters

ParameterDescriptionTypeDefault
transactionTransaction object.object-
privateKeyPrivate key.string-
permissionIdSpecifies which permission to use.string0

The parameter permissionId designates the permission type, with Owner ID = 0, Witness ID = 1, and the Active ID incremented from 2 onwards. When the contract is executed, the ID is used to specify which permission to use. For details on Vision-Core permissionId,please refer to the Multi-Signature guide.

Returns

Object

Example

const transactionObj = await visionWeb.transactionBuilder.freezeBalance(100000000,3,"ENTROPY","VNTxQP1qojBwiMkVfjfwcZ9vj7LF3DRQPn","VSj3YQydj8bMb9xJeTz5rMaC9NgopM4g4o");
const signedTransaction = await visionWeb.vs.multiSign(transactionObj , privateKey,0);
visionWeb.vs.multiSign();
> {
  visible: false,
  txID: 'fb31a41bbecd4bb9b33f56c440d1e1c5db60024c6988e32b7a96a943e35c7862',
  raw_data: {
    contract: [ [Object] ],
    ref_block_bytes: 'd2be',
    ref_block_hash: '3594a5fc3033cd51',
    expiration: 1608376056000,
    timestamp: 1608375998027
  },
  raw_data_hex: '0a02d2be22083594a5fc3033cd5140c0f1bbd5e72e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496186470cbacb8d5e72e',
  signature: [
    'e3eac4fa47fbcf715e562ce0eb72445dc5f1ddbaba9329e2b115e11022da010c3f95459ae872ffaa29b93ef155f6e4bc8b82389dd1cc015d8b010537c953db6600'
  ]
}