From 15024dc1593c754f81e570c475dabe4b290e0124 Mon Sep 17 00:00:00 2001 From: trevoraron Date: Tue, 31 Mar 2026 23:33:08 -0400 Subject: [PATCH 1/3] [OpenRPC] Add getTransactionsForAddress to Solana spec Adds the new getTransactionsForAddress JSON-RPC method with support for pagination, sort order, and filtering by status, token account activity, slot range, and block time range. --- .../solana/solana-api-overview.mdx | 8 +- .../chains/_components/solana/methods.yaml | 55 ++++++++ .../_components/solana/transaction.yaml | 121 ++++++++++++++++++ src/openrpc/chains/solana/solana.yaml | 2 + 4 files changed, 182 insertions(+), 4 deletions(-) diff --git a/content/api-reference/solana/solana-api-overview.mdx b/content/api-reference/solana/solana-api-overview.mdx index 5fba1d855..24d3f49c1 100644 --- a/content/api-reference/solana/solana-api-overview.mdx +++ b/content/api-reference/solana/solana-api-overview.mdx @@ -33,7 +33,7 @@ slug: docs/solana/solana-api-overview | [`getTokenAccountBalance`](/docs/chains/solana/solana-api-endpoints/get-token-account-balance) | [`getTokenAccountsByDelegate`](/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-delegate) | | [`getTokenAccountsByOwner`](/docs/chains/solana/solana-api-endpoints/get-token-accounts-by-owner) | [`getTokenLargestAccounts`](/docs/chains/solana/solana-api-endpoints/get-token-largest-accounts) | | [`getTokenSupply`](/docs/chains/solana/solana-api-endpoints/get-token-supply) | [`getTransaction`](/docs/chains/solana/solana-api-endpoints/get-transaction) | -| [`getTransactionCount`](/docs/chains/solana/solana-api-endpoints/get-transaction-count) | [`getVersion`](/docs/chains/solana/solana-api-endpoints/get-version) | -| [`getVoteAccounts`](/docs/chains/solana/solana-api-endpoints/get-vote-accounts) | [`isBlockhashValid`](/docs/chains/solana/solana-api-endpoints/is-blockhash-valid) | -| [`minimumLedgerSlot`](/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot) | [`requestAirdrop`](/docs/chains/solana/solana-api-endpoints/request-airdrop) | -| [`simulateBundle`](/docs/chains/solana/solana-api-endpoints/simulate-bundle) | | +| [`getTransactionCount`](/docs/chains/solana/solana-api-endpoints/get-transaction-count) | [`getTransactionsForAddress`](/docs/chains/solana/solana-api-endpoints/get-transactions-for-address) | +| [`getVersion`](/docs/chains/solana/solana-api-endpoints/get-version) | [`getVoteAccounts`](/docs/chains/solana/solana-api-endpoints/get-vote-accounts) | +| [`isBlockhashValid`](/docs/chains/solana/solana-api-endpoints/is-blockhash-valid) | [`minimumLedgerSlot`](/docs/chains/solana/solana-api-endpoints/minimum-ledger-slot) | +| [`requestAirdrop`](/docs/chains/solana/solana-api-endpoints/request-airdrop) | [`simulateBundle`](/docs/chains/solana/solana-api-endpoints/simulate-bundle) | diff --git a/src/openrpc/chains/_components/solana/methods.yaml b/src/openrpc/chains/_components/solana/methods.yaml index 51996d093..8735b5e05 100644 --- a/src/openrpc/chains/_components/solana/methods.yaml +++ b/src/openrpc/chains/_components/solana/methods.yaml @@ -1079,3 +1079,58 @@ components: description: The current transaction count from the ledger. schema: $ref: ./state.yaml#/components/schemas/TransactionCount + + getTransactionsForAddress: + name: getTransactionsForAddress + description: >- + Returns confirmed transactions that include the given address, with + support for pagination, sort order, and filtering by status, token + account activity, slot range, or block time range. + params: + - name: Account address + required: true + description: The account address as a base-58 encoded string. + schema: + $ref: "./base-types.yaml#/components/schemas/Pubkey" + - name: Configuration + required: false + description: Optional configuration object. + schema: + $ref: "./transaction.yaml#/components/schemas/GetTransactionsForAddressConfig" + examples: + - name: getTransactionsForAddress example (signatures) + params: + - name: Account address + value: "GwsPP9HHhCvEQeu3HTFzsVL6DEtnnYw4ALEtA3fMBC9Q" + - name: Configuration + value: + transactionDetails: "signatures" + limit: 3 + sortOrder: "desc" + result: + name: Transaction signatures result + value: + data: + - signature: "5UfDuX7WXcCJZMDKMaNbDcBrF5P3dHBvxFAGVmNXEWpLVFGHqvFbKHq7gVd4qePXkY2Lw3nZbM3fhKJtxqzCNVk" + slot: 251000042 + err: null + blockTime: 1710000123 + confirmationStatus: "finalized" + - signature: "3kxVBJHbNbBWU4Yr5rHzVyxMzNh4bzmGP7w5dQtmjqBT4e6Dkv2FvGLxHyNE9MbqUjuAzXsW8aM7EkXLsQNpYm3" + slot: 250999987 + err: null + blockTime: 1710000099 + confirmationStatus: "finalized" + - signature: "2mJkNpXyWv9NQxbLfBhzGCu3FbVeKxDsTHAjpMwYRN6nBqe5RsEzKWa4VJHoMtNcUxbPyL1sdEo8RvGkLz4DpAf" + slot: 250999801 + err: null + blockTime: 1710000011 + confirmationStatus: "finalized" + paginationToken: "2mJkNpXyWv9NQxbLfBhzGCu3FbVeKxDsTHAjpMwYRN6nBqe5RsEzKWa4VJHoMtNcUxbPyL1sdEo8RvGkLz4DpAf" + result: + name: Transactions result + description: >- + An object containing an array of transaction data and a pagination + token for fetching the next page. + schema: + $ref: "./transaction.yaml#/components/schemas/GetTransactionsForAddressResult" diff --git a/src/openrpc/chains/_components/solana/transaction.yaml b/src/openrpc/chains/_components/solana/transaction.yaml index 5223e7472..c27635538 100644 --- a/src/openrpc/chains/_components/solana/transaction.yaml +++ b/src/openrpc/chains/_components/solana/transaction.yaml @@ -341,6 +341,127 @@ components: - type: number nullable: true description: Transaction version. + GetTransactionsForAddressConfig: + title: GetTransactionsForAddress Configuration + type: object + properties: + transactionDetails: + type: string + description: >- + Level of transaction detail to return. `signatures` returns only + signature objects; `full` returns complete transaction data. + enum: + - signatures + - full + default: signatures + sortOrder: + type: string + description: Order in which to return transactions. `desc` returns newest first; `asc` returns oldest first. + enum: + - desc + - asc + default: desc + limit: + type: integer + description: >- + Maximum number of results to return. Maximum is 1,000 for + `signatures` mode and 100 for `full` mode. + default: 1000 + paginationToken: + type: string + description: >- + Opaque token returned by a previous response. When provided, + the response begins after the transaction identified by this token, + overriding any `before` parameter. + before: + type: string + description: >- + Return transactions older than this transaction signature (exclusive). + Ignored when `paginationToken` is provided. + until: + type: string + description: >- + Stop searching at this transaction signature (exclusive). Results will + not include the transaction identified by this signature. + encoding: + type: string + description: Encoding format for transaction data. Only applies when `transactionDetails` is `full`. + enum: + - json + - jsonParsed + - base64 + - base58 + default: json + maxSupportedTransactionVersion: + type: integer + description: >- + The maximum transaction version to return. Only applies when + `transactionDetails` is `full`. + filters: + $ref: "#/components/schemas/GetTransactionsForAddressFilters" + GetTransactionsForAddressFilters: + title: GetTransactionsForAddress Filters + type: object + properties: + status: + type: string + description: Filter by transaction outcome. + enum: + - any + - succeeded + - failed + default: any + blockTime: + $ref: "#/components/schemas/RangeFilter" + description: >- + Restrict results to transactions whose `blockTime` falls within + this range (Unix timestamps). Converted internally to an + approximate slot range. + slot: + $ref: "#/components/schemas/RangeFilter" + description: Restrict results to transactions within this slot range. + tokenAccounts: + type: string + description: >- + Filter by token account activity. `all` returns only transactions + that include token balances; `balanceChanged` returns only + transactions where at least one pre/post token balance differs; + `none` applies no token-account filter. + enum: + - none + - all + - balanceChanged + default: none + RangeFilter: + title: Range Filter + type: object + properties: + gte: + type: integer + description: Inclusive lower bound of the range. + lte: + type: integer + description: Inclusive upper bound of the range. + GetTransactionsForAddressResult: + title: GetTransactionsForAddress Result + type: object + properties: + data: + type: array + description: >- + Array of transaction results. Each item is a signature object when + `transactionDetails` is `signatures`, or a full transaction object + when `transactionDetails` is `full`. + items: + oneOf: + - $ref: "#/components/schemas/SignatureInfo" + - $ref: "#/components/schemas/TransactionDetails" + paginationToken: + type: string + nullable: true + description: >- + Token to pass as `paginationToken` in the next request to retrieve + the following page of results. `null` when there are no more results. SlotConfig: title: Slot Configuration type: object diff --git a/src/openrpc/chains/solana/solana.yaml b/src/openrpc/chains/solana/solana.yaml index 30d0c7e1c..49cb62923 100644 --- a/src/openrpc/chains/solana/solana.yaml +++ b/src/openrpc/chains/solana/solana.yaml @@ -71,6 +71,8 @@ methods: ../_components/solana/methods.yaml#/components/methods/getTokenLargestAccounts - $ref: ../_components/solana/methods.yaml#/components/methods/getTokenSupply - $ref: ../_components/solana/methods.yaml#/components/methods/getTransactionCount + - $ref: >- + ../_components/solana/methods.yaml#/components/methods/getTransactionsForAddress - $ref: ../_components/solana/methods.yaml#/components/methods/getVersion - $ref: ../_components/solana/methods.yaml#/components/methods/getVoteAccounts - $ref: ../_components/solana/methods.yaml#/components/methods/isBlockhashValid From ec9905756167f45f6af3b0150f4c96347606e359 Mon Sep 17 00:00:00 2001 From: trevoraron Date: Mon, 27 Apr 2026 10:58:17 -0400 Subject: [PATCH 2/3] [OpenRPC] Remove status and tokenAccounts filters from getTransactionsForAddress Only slot and blockTime filters are supported in the initial release. Also adds gt/lt operators to RangeFilter to match the Rust struct. Co-Authored-By: Claude Sonnet 4.6 --- .../_components/solana/transaction.yaml | 33 +++++-------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/src/openrpc/chains/_components/solana/transaction.yaml b/src/openrpc/chains/_components/solana/transaction.yaml index c27635538..05b30311a 100644 --- a/src/openrpc/chains/_components/solana/transaction.yaml +++ b/src/openrpc/chains/_components/solana/transaction.yaml @@ -403,45 +403,30 @@ components: title: GetTransactionsForAddress Filters type: object properties: - status: - type: string - description: Filter by transaction outcome. - enum: - - any - - succeeded - - failed - default: any blockTime: $ref: "#/components/schemas/RangeFilter" description: >- Restrict results to transactions whose `blockTime` falls within - this range (Unix timestamps). Converted internally to an - approximate slot range. + this range (Unix timestamps, seconds). slot: $ref: "#/components/schemas/RangeFilter" description: Restrict results to transactions within this slot range. - tokenAccounts: - type: string - description: >- - Filter by token account activity. `all` returns only transactions - that include token balances; `balanceChanged` returns only - transactions where at least one pre/post token balance differs; - `none` applies no token-account filter. - enum: - - none - - all - - balanceChanged - default: none RangeFilter: title: Range Filter type: object properties: gte: type: integer - description: Inclusive lower bound of the range. + description: Match values greater than or equal to this bound. + gt: + type: integer + description: Match values strictly greater than this bound. lte: type: integer - description: Inclusive upper bound of the range. + description: Match values less than or equal to this bound. + lt: + type: integer + description: Match values strictly less than this bound. GetTransactionsForAddressResult: title: GetTransactionsForAddress Result type: object From 6036c309528517b0c8f3e45d6b6ef7de312ed179 Mon Sep 17 00:00:00 2001 From: trevoraron Date: Mon, 27 Apr 2026 11:07:31 -0400 Subject: [PATCH 3/3] [OpenRPC] Fix limit description and add commitment param to getTransactionsForAddress Max limit is 1,000 for all modes. Document commitment validation behavior. Co-Authored-By: Claude Sonnet 4.6 --- .../chains/_components/solana/transaction.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/openrpc/chains/_components/solana/transaction.yaml b/src/openrpc/chains/_components/solana/transaction.yaml index 05b30311a..8526b7963 100644 --- a/src/openrpc/chains/_components/solana/transaction.yaml +++ b/src/openrpc/chains/_components/solana/transaction.yaml @@ -363,9 +363,7 @@ components: default: desc limit: type: integer - description: >- - Maximum number of results to return. Maximum is 1,000 for - `signatures` mode and 100 for `full` mode. + description: Maximum number of results to return. Maximum is 1,000. default: 1000 paginationToken: type: string @@ -397,6 +395,15 @@ components: description: >- The maximum transaction version to return. Only applies when `transactionDetails` is `full`. + commitment: + type: string + description: >- + Commitment level for the request. Must be `confirmed` or `finalized`; + passing `processed` returns an error. Defaults to `finalized`. + enum: + - confirmed + - finalized + default: finalized filters: $ref: "#/components/schemas/GetTransactionsForAddressFilters" GetTransactionsForAddressFilters: