Skip to content

[EXAMPLE-DO-NOT-MERGE] Update FCL JS documentation from fcl-js@3fe593e5 #1305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 14 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Packages Docs
description: FCL packages documentation.
---

> _Doc autogenerated from [onflow/fcl-js](https://github.com/onflow/fcl-js)_
Copy link
Contributor

@briandoyle81 briandoyle81 Jun 3, 2025

Choose a reason for hiding this comment

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

Can we please update this message to have a comment explicitly say not to edit it:

<!-- THIS DOCUMENT IS AUTO-GENERATED. DO NOT EDIT MANUALLY -->

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, adding exactly that line.


# Packages Docs

A list of all packages available inside FCL library with functions and types documentation.

- [@onflow/sdk](./sdk/index.md)

---
47 changes: 47 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/account.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 1
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a title in the frontmatter. This is what will be rendered in the sidebar and at the top of the page, unless you do a H1 like you have here.

---

> _Doc autogenerated from [onflow/sdk/src/account/account.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/account/account.ts)_

# account

Returns the details of an account from their public address

## Import

```typescript
import { account } from "@onflow/sdk"
```


## Parameters

### `address`
- Type: `string`
Comment on lines +20 to +21
Copy link
Contributor

Choose a reason for hiding this comment

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

It probably doesn't matter with how the site is rendered, but if possible, please add a blank line between all headings/subheadings and content

- Description: Address of the account


### `options` (optional)
- Type: `AccountQueryOptions`

```typescript
interface AccountQueryOptions {
height?: number
id?: string
isSealed?: boolean
}
```

### `opts` (optional)
- Type: `object`
- Description: Optional parameters



## Returns

[`Promise<Account>`](../types#account)


---
42 changes: 42 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/arg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-arguments.ts)_

# arg

A utility builder to be used with fcl.args[...] to create FCL supported arguments for interactions

## Import

```typescript
import { arg } from "@onflow/sdk"
```


## Parameters

### `value`
- Type: `TypeDescriptorInput`
- Description: The value of the argument


### `xform`
- Type: `T`
- Description: A function to transform the value



## Returns

`CadenceArgument`

```typescript
type CadenceArgument<T extends TypeDescriptor<any, any>> = {
value: TypeDescriptorInput<T>
xform: T
}
```

---
42 changes: 42 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-arguments.ts)_

# args

A utility builder to be used with other builders to pass in arguments with a value and supported type

## Import

```typescript
import { args } from "@onflow/sdk"
```


## Parameters

### `ax`
- Type: `CadenceArgument`
- Description: An array of arguments

```typescript
type CadenceArgument<T extends TypeDescriptor<any, any>> = {
value: TypeDescriptorInput<T>
xform: T
}
```


## Returns

`InteractionBuilderFn`

```typescript
export type InteractionBuilderFn = (
ix: Interaction
) => Interaction | Promise<Interaction>
```

---
36 changes: 36 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/atBlockHeight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-at-block-height.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-at-block-height.ts)_

# atBlockHeight

A builder function that returns a partial interaction to a block at a specific height

## Import

```typescript
import { atBlockHeight } from "@onflow/sdk"
```


## Parameters

### `height`
- Type: `number`
- Description: The height of the block to get



## Returns

`InteractionBuilderFn`

```typescript
export type InteractionBuilderFn = (
ix: Interaction
) => Interaction | Promise<Interaction>
```

---
34 changes: 34 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/atBlockId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-at-block-id.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-at-block-id.ts)_

# atBlockId


## Import

```typescript
import { atBlockId } from "@onflow/sdk"
```


## Parameters

### `id`
- Type: `string`



## Returns

`InteractionBuilderFn`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we link to what this is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Links are added only to types that belong to typedefs package that are considered "core types". This one is a type local to the package and so its type definition is added completely in the lines below to have an easy and fast to use reference


```typescript
export type InteractionBuilderFn = (
ix: Interaction
) => Interaction | Promise<Interaction>
```

---
36 changes: 36 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/atLatestBlock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-at-latest-block.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-at-latest-block.ts)_

# atLatestBlock

A builder function that returns a partial interaction to query the latest block with the given finality state

## Import

```typescript
import { atLatestBlock } from "@onflow/sdk"
```


## Parameters

### `isSealed` (optional)
- Type: `boolean`
- Description: Block finality state, defaults to latest executed block ("soft-finality"), set to true for sealed blocks ("hard-finality")



## Returns

`InteractionBuilderFn`

```typescript
export type InteractionBuilderFn = (
ix: Interaction
) => Interaction | Promise<Interaction>
```

---
46 changes: 46 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-authorizations.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-authorizations.ts)_

# authorization


## Import

```typescript
import { authorization } from "@onflow/sdk"
```


## Parameters

### `addr`
- Type: `string`


### `signingFunction`
- Type: `SigningFn`

```typescript
type SigningFn = (
signable?: SignableMessage
) => SigningResult | Promise<SigningResult>
```

### `keyId` (optional)
- Type: `string | number`


### `sequenceNum` (optional)
- Type: `number`



## Returns

[`InteractionAccount`](../types#interactionaccount)


---
39 changes: 39 additions & 0 deletions docs/tools/clients/fcl-js/packages-docs/sdk/authorizations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/build/build-authorizations.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/build/build-authorizations.ts)_

# authorizations


## Import

```typescript
import { authorizations } from "@onflow/sdk"
```


## Parameters

### `ax` (optional)
- Type: `AccountAuthorization[]`

```typescript
export type AccountAuthorization =
| (AuthorizationFn & Partial<InteractionAccount>)
| Partial<InteractionAccount>
```


## Returns

`InteractionBuilderFn`

```typescript
export type InteractionBuilderFn = (
ix: Interaction
) => Interaction | Promise<Interaction>
```

---
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_position: 1
---

> _Doc autogenerated from [onflow/sdk/src/test-utils/index.ts](https://github.com/onflow/fcl-js/tree/master/packages/sdk/src/test-utils/index.ts)_

# authzDeepResolveMany


## Import

```typescript
import { authzDeepResolveMany } from "@onflow/sdk"
```


## Parameters

### `opts` (optional)
- Type: `IAuthzResolveMany`

```typescript
interface IAuthzResolveMany {
tempId?: string
authorizations: any[]
proposer?: any
payer?: any
}
```

### `depth` (optional)
- Type: `number`



## Returns

`function`


---
Loading