Refractor API 0.1.1

/tx endpoint

Refractor refractor

Store a transaction

Sends a transaction (with or without signatures) to the server. If the transaction with the same hash doesn't exist on the server yet, the transaction and its signatures are stored on the server. Otherwise, Refractor finds new signatures and applies them to the existing transaction. Invalid or redundant signatures are discarded automatically.

Request body schema: application/json
Transaction description
network required
string Enum: "public" "testnet"
Stellar network name ("public" or "testnet").
xdr required
string
Base64-encoded Stellar transaction XDR with or without signatures.
expires
integer Default: "Current date + 30 days"
Transaction expiration date (UNIX timestamp), by default equals the transaction maxTime if not set.
callbackUrl
string
Callback URL where the transaction will be POSTed once ready.
submit
boolean Default: false
Whether the transaction should be automatically submitted to Horizon once ready.

Responses

200 Transaction stored/updated successfully
Returns the stored transaction object with the current signing status.
400 Invalid parameters, possible errors:
  • Unidentified network
  • Invalid transaction XDR
  • Invalid URL supplied in "callbackUrl" parameter
  • Invalid "requestedSigners" parameter
  • Invalid "expires" parameter
  • Invalid transaction's "timebounds.maxTime" value — the transaction already expired
406 Not supported, possible errors:
  • FeeBump transactions not supported
POST /tx
Request samples
Content type
application/json
Copy
{
  "network": "testnet",
  "xdr": "AAAAAgAAAABTWgh1bRm6Aksd…"
}
Response samples
200
Content type
application/json
{
  "network": "testnet",
  "xdr": "AAAAAgAAAABTWgh1bRm6Aksd…",
  "minTime": 1527178665,
  "maxTime": 1727178665,
  "callbackUrl": "https://my.server/callback",
  "submit": false,
  "signatures": [ ],
  "status": "pending",
  "submitted": 1627178665
}

Retrieve transaction info

Returns transaction information and signing status for a given transaction hash.

Path parameters
txHash required
string (TxHash) ^[a-f0-9]{64}$
Example:
a1ef625e2bda7e71493b8a6bb4b03fa6512a67593d99acacfe5fb59b79e28154
Transaction hash.

Responses

200 Transaction info retrieved
Returns the transaction object and its current signing status.
404 Transaction not found
No stored transaction matches the supplied hash.
GET /tx/{txHash}
Response samples
200
Content type
application/json
{
  "network": "testnet",
  "xdr": "AAAAAgAAAABTWgh1bRm6Aksd…",
  "minTime": 1527178665,
  "maxTime": 1727178665,
  "callbackUrl": "https://my.server/tx-signed",
  "submit": false,
  "signatures": [
    { 
    "key": "GA4K90L1NP…",
    "signature": "d30a85c…"
   }
  ],
  "status": "pending",
  "submitted": 1627178665
}