Broadcasts a signed raw transaction to the network.
Usage
visionWeb.vs.sendRawTransaction(signedTransaction);
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
signedTransaction | The signed transaction object. | string | - |
Returns
Object
Example
const transaction = await visionWeb.transactionBuilder.sendVs(
'462d7a77f8bef6fe225bf5e353dd6a380f588a1496',
100
);
const signedtx = await visionWeb.vs.sign(transaction, PrivateKey);
const receipt = await visionWeb.vs.sendRawTransaction(signedtx);
console.log(receipt);
> {
result: true,
txid: '9b930f3a582f09f1bdc576f25f83ae4affaa84e36313b0856ad0a4e754887524',
transaction: {
visible: false,
txID: '9b930f3a582f09f1bdc576f25f83ae4affaa84e36313b0856ad0a4e754887524',
raw_data: {
contract: [Array],
ref_block_bytes: 'd164',
ref_block_hash: '45fb32038a516f44',
expiration: 1608374994000,
timestamp: 1608374934245
},
raw_data_hex: '0a02d164220845fb32038a516f4440d088fbd4e72e5a65080112610a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412300a154653cd48c2723cb985679f4e44d99c64d22d89f41d1215462d7a77f8bef6fe225bf5e353dd6a380f588a1496186470e5b5f7d4e72e',
signature: [
'9acc571a0276be26207c524609b9450e0f133f340df1f3ec7669db9c50de633aa2bb8b68ceee59b259a740a0e20289591163f317a855d880747aa876484fb6da00'
]
}
}