Mass
This function calculates and returns the mass of a transaction, which is essential for determining the minimum fee. The mass calculation takes into account the storage mass as defined in KIP-0009.
Note: Be aware that if the transaction has a very low output amount or a high number of outputs, the mass can become significantly large.
Body
versionintegerRequired
lockTimeintegerOptionalDefault:
0
subnetworkIdstringOptional
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
POST /transactions/mass HTTP/1.1
Host: kas.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 250
{
"version": 1,
"inputs": [
{
"previousOutpoint": {
"transactionId": "text",
"index": 1
},
"signatureScript": "text",
"sequence": 1,
"sigOpCount": 1
}
],
"outputs": [
{
"amount": 1,
"scriptPublicKey": {
"version": 1,
"scriptPublicKey": "text"
}
}
],
"lockTime": 0,
"subnetworkId": "text"
}
{
"mass": 1,
"storage_mass": 1,
"compute_mass": 1
}