BSV blockchainBSV blockchain

Process a signed action (broadcast + store).

POST/actions/process

Corresponds to StorageProvider.processAction(auth, args). Called after the client has signed the raw transaction. Stores the completed transaction and optionally broadcasts it.

Body application/json

isNewTxbooleanrequired
isSendWithbooleanrequired
isNoSendbooleanrequired
isDelayedbooleanrequired
referencestring
txidstring
rawTxinteger[]
sendWithstring[]required

Response

Process results (broadcast status, optional send-with results).

sendWithResultsobject[]
notDelayedResultsobject[]
Show notDelayedResults properties
txidstring
status"success" | "doubleSpend" | "serviceError" | "invalidTx"
competingTxsstring[]
competingBeefinteger[]
logstring

Bad request — invalid arguments.

errorstring
codestring

Machine-readable error code (see specs/errors.md).

Authentication required or token invalid.

errorstring
codestring

Machine-readable error code (see specs/errors.md).

Internal storage error.

errorstring
codestring

Machine-readable error code (see specs/errors.md).

Request
curl -X POST "https://{host}/storage/v1/actions/process" \
  -H "Content-Type: application/json" \
  -d '{
  "isNewTx": true,
  "isSendWith": true,
  "isNoSend": true,
  "isDelayed": true,
  "reference": "string",
  "txid": "string",
  "rawTx": [
    0
  ],
  "sendWith": [
    "string"
  ]
}'
Response
{
  "sendWithResults": [
    {}
  ],
  "notDelayedResults": [
    {
      "txid": "string",
      "status": "success",
      "competingTxs": [
        "string"
      ],
      "competingBeef": [
        0
      ]
    }
  ],
  "log": "string"
}