Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions content/api-reference/solana/solana-api-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
55 changes: 55 additions & 0 deletions src/openrpc/chains/_components/solana/methods.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
121 changes: 121 additions & 0 deletions src/openrpc/chains/_components/solana/transaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment on lines +456 to +458
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace oneOf with anyOf for transaction result union

GetTransactionsForAddressResult.data.items currently uses oneOf for SignatureInfo vs TransactionDetails, but both referenced schemas are permissive objects with no required discriminator fields. A valid signatures payload can satisfy both branches (for example, it has slot/blockTime and extra fields are allowed), which causes oneOf validation to fail and breaks downstream schema validation/codegen for legitimate responses.

Useful? React with 👍 / 👎.

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
Expand Down
2 changes: 2 additions & 0 deletions src/openrpc/chains/solana/solana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading