Skip to content
Draft
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
10 changes: 10 additions & 0 deletions docs/build/tools/clients/fcl-js/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions docs/build/tools/clients/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions docs/build/tools/react-sdk/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

<div style={{marginBottom: "1.5rem"}}><PlaygroundButton href="https://react.flow.com/#transactionlink" /></div>

**Props:**

- `txId: string` – The transaction ID to link to
- `txId: string` – The transaction ID or scheduled transaction ID to link to
- `variant?: ButtonProps["variant"]` – Optional button variant (defaults to `"link"`)

```tsx
Expand Down
4 changes: 2 additions & 2 deletions docs/build/tools/react-sdk/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ Fetches a Flow transaction by ID and returns the decoded transaction object.

#### Parameters:

* `txId?: string` – The Flow transaction ID to fetch.
* `txId?: string` – The Flow transaction ID or scheduled transaction ID to fetch.
* `query?: Omit<UseQueryOptions<Transaction | null, Error>, "queryKey" | "queryFn">` – Optional TanStack Query options like `staleTime`, `enabled`, etc.
* `flowClient?: FlowClient` - Optional `FlowClient` instance

Expand Down Expand Up @@ -501,7 +501,7 @@ import { useFlowTransactionStatus } from "@onflow/react-sdk"

#### Parameters:

- `id: string` – Transaction ID to subscribe to
- `id: string` – Transaction ID or scheduled transaction ID to subscribe to
- `flowClient?: FlowClient` - Optional `FlowClient` instance

#### Returns:
Expand Down