For the complete documentation index, see llms.txt. This page is also available as Markdown.

getaddresstxids - Zcash

Example code for the getaddresstxids JSON-RPC method. Сomplete guide on how to use the getaddresstxids JSON-RPC method in GetBlock.io Web3 documentation.

This method returns the list of transaction IDs involving one or more transparent addresses within a specified block range. A Zcash extension over Bitcoin Core, requiring address indexing on the Zebra node. Transactions are returned in ascending block height order.

Parameters

Parameter
Type
Required
Description

request

object

Yes

Request object (see below)

Request Object

Field
Type
Required
Description

addresses

array of string

Yes

Transparent addresses to query

start

integer

No

Starting block height (inclusive). Default 0

end

integer

No

Ending block height (inclusive). Default: chain tip

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getaddresstxids",
    "params": [
        {
            "addresses": [
                "t1c74RiTicVSKthLmn2c4WFLJdLDs5sQ4X6"
            ],
            "start": 2846342,
            "end": 2856342
        }
    ],
    "id": "getblock.io"
}'
example.js
const axios = require('axios');

const response = await axios.post('https://go.getblock.io/<ACCESS-TOKEN>/', {
    jsonrpc: '2.0',
    method: 'getaddresstxids',
    params: [
        {
            "addresses": [
                "t1c74RiTicVSKthLmn2c4WFLJdLDs5sQ4X6"
            ],
            "start": 2846342,
            "end": 2856342
        }
    ],
    id: 'getblock.io'
}, {
    headers: { 'Content-Type': 'application/json' }
});

console.log(response.data.result);

Response

Response Parameters

Parameter
Type
Description

result

array of string

Transaction IDs involving the queried addresses, in ascending block height order

Use Cases

  • Wallet Transaction History: Reconstruct a wallet's complete on-chain transparent history

  • Explorer Address Activity: Display all transactions touching an address on an explorer page

  • Compliance and Audit Trails: Enumerate transactions for a family of addresses for AML compliance

  • Balance Reconstruction from Genesis: Iterate all transactions to independently compute address balances

Error Handling

Error Code
Message
Description

-8

Invalid address

One or more addresses are malformed

-32602

Invalid params

Block range is invalid

-32603

Internal error

Address indexing may be disabled on the endpoint

Was this helpful?