Kaspa REST API 2.3.0 to 2.4.1 - modified methods
v2.4.1https://kas.nownodes.ioThis page lists the Kaspa REST API methods whose behaviour changed between kaspa-rest-server 2.3.0 and 2.4.1. Each method is documented as it exists in 2.4.1, with a note at the top describing what changed.
Changed
- v1 (Toccata) transactions.
POST /transactionsandPOST /transactions/massaccept v1 transactions (computeBudget,covenant,gas) and a hexpayloadfor both v0 and v1. - Transaction mass.
POST /transactions/massnow also accounts for the normalized transient mass, so the returnedmasscan be higher than before.
Affected methods:
POST /transactionsPOST /transactions/mass
Authentication
api-keyAuthapiKeyAPI Key: api-key in header
REST API changelog 2.3.0 to 2.4.1 / Modified methods
Transactions
Submit A New Transaction
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Changed. Both v0 and v1 (Toccata) transactions are supported. For v1, inputs use computeBudget (with sigOpCount 0) and outputs can carry a covenant binding; the transaction can set gas. Both versions accept a hex payload. For v0 transactions the v1-only fields are ignored.
Submit a signed transaction to the Kaspa network and return its transaction id.
Both v0 and v1 (Toccata) transactions are supported. For v1, inputs use computeBudget (with sigOpCount 0) and outputs can carry a covenant binding; the transaction can set gas. Both versions accept a hex payload. For v0 transactions the v1-only fields are ignored.
Body
transactionSubmitTxModelrequiredallowOrphanbooleanfalseParameters
replaceByFeebooleanfalsequeryReplace an existing transaction in the mempool
Response
Successful Response
Bad Request
Validation Error
Calculate Transaction Mass
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Changed. The returned mass is the largest of the compute mass, the storage mass (KIP-0009) and the normalized transient mass, for both v0 and v1 transactions; previously the transient mass was not taken into account, so mass could be lower. The request accepts the v1 fields (computeBudget, covenant, gas, payload).
This function calculates and returns the mass of a transaction, which is essential for determining the minimum fee. The returned mass is the largest of the compute mass, the storage mass as defined in KIP-0009 and the normalized transient mass, for both v0 and v1 transactions.
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
versionintegerrequiredinputsArray<SubmitTxInput>requiredoutputsArray<SubmitTxOutput>requiredlockTimeinteger0subnetworkIdstringgasinteger0Gas (v1 transactions). Forced to 0 for v0.
payloadstringHex-encoded transaction payload. Supported for both v0 and v1 transactions.
Response
Successful Response
Validation Error