diff --git a/docs/build/tools/clients/fcl-js/transactions.md b/docs/build/tools/clients/fcl-js/transactions.md index 55b77e49bc..47361312b9 100644 --- a/docs/build/tools/clients/fcl-js/transactions.md +++ b/docs/build/tools/clients/fcl-js/transactions.md @@ -76,6 +76,16 @@ console.log(transaction); // The transactions status and events after being exec To learn more about `mutate`, check out the [API documentation](./packages-docs/fcl/mutate.md). +## Querying Transaction Results + +When querying transaction results (e.g., via HTTP/REST endpoints like `GET /v1/transaction_results/{id}`), you can provide either: +- A **transaction ID** (256-bit hash as hex string) +- A **scheduled transaction ID** (UInt64 as decimal string) + +The returned result always includes `transaction_id` as the underlying native transaction ID. For scheduled transactions, this will be the system transaction ID that executed the scheduled callback. + +Learn more about [Scheduled Transactions](/docs/build/cadence/advanced-concepts/scheduled-transactions.md). + ## Transaction Finality As of **FCL v1.15.0**, it is now recommended to use use `onceExecuted` in most cases, leading to a 2.5x reduction in latency when waiting for a transaction result. For example, the following code snippet should be updated from: diff --git a/docs/build/tools/clients/index.md b/docs/build/tools/clients/index.md index 8e0dfca8c2..375bff9b99 100644 --- a/docs/build/tools/clients/index.md +++ b/docs/build/tools/clients/index.md @@ -33,6 +33,14 @@ keywords: Flow provides a comprehensive suite of client tools and SDKs designed to help developers build applications that interact with the Flow blockchain. These tools support various programming languages and platforms, offering different levels of abstraction and functionality. +> Terminology note +> +> Anywhere an API or SDK accepts a Flow transaction ID, you may also provide a scheduled transaction ID: +> - Transaction ID: 256-bit hash represented as a 64-character hex string +> - Scheduled transaction ID: UInt64 represented as a decimal string +> +> For REST endpoints like `/v1/transactions/{id}` and `/v1/transaction_results/{id}`, the server treats the `id` as a transaction ID if it parses as hex; otherwise, as a scheduled transaction ID if it parses as a decimal UInt64. Both return identical response schemas. See the Protocol docs for details (`docs/protocol/access-onchain-data/index.md`). + ## JavaScript (FCL) [Flow Client Library (FCL)] is the primary JavaScript/TypeScript client for Flow. It provides: diff --git a/docs/build/tools/react-sdk/components.md b/docs/build/tools/react-sdk/components.md index 7ebc3eef97..a8a5aad07a 100644 --- a/docs/build/tools/react-sdk/components.md +++ b/docs/build/tools/react-sdk/components.md @@ -191,7 +191,7 @@ Dialog component for real-time transaction status updates. - `open: boolean` – Whether the dialog is open - `onOpenChange: (open: boolean) => void` – Callback to open/close dialog -- `txId?: string` – Optional Flow transaction ID to track +- `txId?: string` – Optional Flow transaction ID or scheduled transaction ID to track - `onSuccess?: () => void` – Optional callback when transaction is successful - `pendingTitle?: string` – Optional custom pending state title - `pendingDescription?: string` – Optional custom pending state description @@ -221,13 +221,13 @@ import { TransactionDialog } from "@onflow/react-sdk" ### `TransactionLink` -Link to the block explorer with the appropriate network scoped to transaction ID. +Link to the block explorer with the appropriate network scoped to transaction ID or scheduled transaction ID.