Skip to content

New Transaction APIs & Bug Fixes - v0.6.3

Compare
Choose a tag to compare
@aaroncox aaroncox released this 17 Aug 23:08
· 117 commits to master since this release

What's Changed

APIClient

Support for the following API endpoints are included in this newest release.

compute_transaction

Accepts a Transaction type object, submits it to the defined API server, and returns a response which can be used to estimate network resource costs.

await client.v1.chain.compute_transaction(transaction)

Documentation | Implementation

get_transaction_status

Accepts a Checksum256 (Transaction ID) type parameter and returns the status of the transaction.

await client.v1.chain.get_transaction_status(transaction_id)

Documentation | Implementation

send_transaction2

Accepts a SignedTransaction type object and submits it to the defined API server.

Defaults

Utilizes the new /v1/chain/send_transaction2 API endpoint to submit a transaction.

await client.v1.chain.send_transaction2(signedTransaction)

Return Failure Traces

Enable or disable the return of failure traces. Defaults to a value of true, even if not specified. Set to false to disable.

await client.v1.chain.send_transaction2(signedTransaction, {
    return_failure_trace: true,
})

Transaction Retry

Allows a transaction to be retried for a number of blocks (0.5 seconds per block). Using this feature will await the specified number of blocks to ensure the transaction makes it on to the network.

await client.v1.chain.send_transaction2(signedTransaction, {
    // Enable Retry
    retry_trx: true,
    // Number of blocks to retry
    retry_trx_num_blocks: 10, 
})

Documentation | Implementation

Full Changelog

0.6.2...0.6.3