multiSign

多重签名。

用法

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

入参

参数描述类型默认值
transactiontransaction 对象object-
privateKey私钥string-
permissionId指定使用的权限string0

permissionId,0 为 owner 权限,1 为 witness 权限,active id 从 2 开始递增分配。有关多重签名的详细信息,请查看

返回值

object,签名后的 transaction。

示例

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'
  ]
}