Confirmed script hash transactions

GET/esplora/api/scripthash/{key}/txs/chain

Wallet API v1.0.0 · Script hashes

The 25 newest confirmed transactions.

Example

curl 'https://api.tensorcash.org/esplora/api/scripthash/<scripthash>/txs/chain'

Parameters

NameInTypeRequiredDescription
keypathstringYesElectrum script hash, 64 hex characters.

Responses

StatusDescriptionBody
200Transactions, newest first
400Invalid scripthash
  • text/plain string
422Validation Error
503Index syncing: n/m
  • text/plain string

Schemas

Transaction

FieldTypeRequiredDescription
txidstringYes
versionintegerYes
locktimeintegerYes
vinTxIn[]Yes
voutTxOut[]Yes
sizeintegerYesBytes.
weightintegerYesWeight units.
feeintegerYesSatoshis.
statusTxStatusYes

TxIn

FieldTypeRequiredDescription
txidstringYesSpent transaction; 64 zeros for a coinbase input.
voutintegerYesSpent output index; 4294967295 for a coinbase input.
prevoutTxOut | nullYesThe output this input spends; null for a coinbase input.
scriptsigstringYesInput script, hex (the coinbase data for a coinbase input).
scriptsig_asmstringYes
is_coinbasebooleanYes
witnessstring[]—Witness stack, hex items. Present when not empty.
sequenceintegerYes

TxOut

FieldTypeRequiredDescription
scriptpubkeystringYesOutput script, hex.
scriptpubkey_asmstringYesOutput script in bcore's asm format (not Esplora's OP_PUSHBYTES_n form).
scriptpubkey_type"p2pkh" | "p2sh" | "v0_p2wpkh" | "v0_p2wsh" | "v1_p2tr" | "op_return" | "p2pk" | "multisig" | "anchor" | "unknown"Yes
scriptpubkey_addressstring—Present when the script has an address.
valueintegerYesAmount in satoshis.

TxStatus

FieldTypeRequiredDescription
confirmedbooleanYesFalse while the transaction is in the mempool.
block_heightinteger—Confirmed only.
block_hashstring—Confirmed only.
block_timeinteger—Block timestamp, Unix seconds. Confirmed only.

ValidationError

FieldTypeRequiredDescription
locstring | integer[]Yes
msgstringYes
typestringYes
Source
tensorcash-wallet-api (tensorcash-api) v1.0.0 (772799e) · bobponey · MIT