Transaction
Last updated
Was this helpful?
Last updated
Was this helpful?
Params
Name
Type
Required
Description
client
Client
Conditional required
RPC client that will be used to interact with KardiaChain
provider
string
Conditional required
RPC endpoint. Either client
or provider
must be provided to initialize a smart contract instance
Return
Return a Transaction
instance .
Get transaction object by hash
Params
Name
Type
Required
Description
txHash
string
Required
Transaction hash to get detail
Return
object.
Params
None
Return
Name
Type
Description
pendingTransactions
List of pending transactions
Get transaction receipt object by hash
Params
Name
Type
Required
Description
txHash
string
Required
Transaction hash to get detail
Return
Submit transaction
Params
Name
Type
Required
Description
data
object
Required
Transaction data object
waitUntilMined
boolean
Indicate if wait for transaction to be executed successfully or return transaction hash immediately
waitTimeout
number
Time to wait for transaction to be executed (in milliseconds). Default to 5 minutes.
Return
Transaction Hash
if waitUntilMined
is false
Submit transaction using web extension
Params
Name
Type
Required
Description
data
object
Required
Transaction data object
waitUntilMined
boolean
Indicate if wait for transaction to be executed successfully or return transaction hash immediately
waitTimeout
number
Time to wait for transaction to be executed (in milliseconds). Default to 5 minutes.
Return
Transaction Hash
if waitUntilMined
is false
Transaction
object if waitUntilMined
is true
Generate transaction to submit later
Params
Name
Type
Required
Description
txPayload
object
Transaction payload
Return
Sign a transaction by private key
Params
Name
Type
Required
Description
tx
Required
Transaction
object. Can be achieved by using generateTransaction
method
privateKey
string
Required
Private key that will be used to sign transaction
Return
Raw transaction object ready to be submitted to KardiaChain
Name
Type
Description
messageHash
string
Transaction's message hash
v
string
Private key's v
r
string
Private key's r
s
string
Private key's s
rawTransaction
string
Signed transaction. This will be used to submit to KardiaChain
Send signed transaction to KardiaChain
Params
Name
Type
Required
Description
rawTx
string
Required
Signed transaction
waitUntilMined
boolean
Indicate if wait for transaction to be executed successfully or return transaction hash immediately
waitTimeOut
number
Time to wait for transaction to be executed (in milliseconds). Default to 5 minutes.
Return
Transaction Hash
if waitUntilMined
is false
Transaction
object if waitUntilMined
is true
Estimate gas used of a transaction
Params
Name
Type
Required
Description
txPayload
Required
Transaction object to estimate
data
string
Hex string represent transaction data.
Return
Estimated gas.
Debug a failed transaction
Params
Name
Type
Required
Description
txHash
string
Required
Transaction hash to debug
Return
Transaction debug object
[]
object.
object if
waitUntilMined
is true
A object ready to submit to be signed.