创建一个未签名的交易,用于延长未签名交易的过期时间。(单位为秒)
用法
visionWeb.transactionBuilder.extendExpiration(transaction, extension);
入参
参数 | 描述 | 类型 | 默认值 |
---|---|---|---|
transaction | transaction 对象 | object | - |
extension | 延长的过期时间,单位为秒 | number | - |
返回值
object,创建的 transaction 对象。
示例
const transaction = await visionWeb.transactionBuilder.sendVs(
'VJJKvvPZ1cLkRoeYmswWPYdwi9Y2mkK8c8',
10
);
visionWeb.transactionBuilder.extendExpiration(transaction,100);
> {
txID: 'd3fab294ba11f04357a175575142b3b8fb3aa41805075780ddd2d075cae4bfe6',
raw_data: {
contract: [ [Object] ],
ref_block_bytes: '46aa',
ref_block_hash: 'a1d0f2985875e775',
expiration: 1608467402000,
timestamp: 1608466844571
},
raw_data_hex: '0a0246aa2208a1d0f2985875e77540909a8381e82e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a15462d7a77f8bef6fe225bf5e353dd6a380f588a149612154653cd48c2723cb985679f4e44d99c64d22d89f41d180a709b97e180e82e',
visible: false
}