Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 18 additions & 16 deletions docs/build/tools/clients/fcl-js/packages-docs/fcl/arg.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: 'arg'
description: 'arg function documentation.'
title: "arg"
description: "arg function documentation."
---

<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/cadence/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/cadence/build-arguments.ts). DO NOT EDIT MANUALLY -->
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/build-arguments.ts). DO NOT EDIT MANUALLY -->

# arg

Expand All @@ -17,23 +17,23 @@ This function creates an ArgumentObject that holds the value and type passed in.
You can import the entire package and access the function:

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

fcl.arg(value, xform);
fcl.arg(value, xform)
```

Or import directly the specific function:

```typescript
import { arg } from '@onflow/fcl';
import { arg } from "@onflow/fcl"

arg(value, xform);
arg(value, xform)
```

## Usage

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

const result = await fcl.query({
cadence: `
Expand All @@ -45,34 +45,36 @@ const result = await fcl.query({
args: (arg, t) => [
arg(7, t.Int), // a: Int
arg(6, t.Int), // b: Int
arg('0xba1132bc08f82fe2', t.Address), // addr: Address
arg("0xba1132bc08f82fe2", t.Address), // addr: Address
],
});
```

## Parameters

### `value`
### `value`

- Type:

- Type:
```typescript
TypeDescriptorInput<T>;
TypeDescriptorInput<T>
```

- Description: Any value that you are looking to pass to other builders

### `xform`
### `xform`


- Type: `T`
- Description: A type supported by Flow (FType descriptor)


## Returns

```typescript
CadenceArgument<T>;
CadenceArgument<T>
```


An ArgumentObject that holds the value and type passed in

---
---
37 changes: 19 additions & 18 deletions docs/build/tools/clients/fcl-js/packages-docs/fcl/args.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: 'args'
description: 'args function documentation.'
title: "args"
description: "args function documentation."
---

<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/cadence/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/cadence/build-arguments.ts). DO NOT EDIT MANUALLY -->
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/build-arguments.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/build-arguments.ts). DO NOT EDIT MANUALLY -->

# args

Expand All @@ -17,23 +17,23 @@ This function returns a Partial Interaction that contains the arguments and type
You can import the entire package and access the function:

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

fcl.args(ax);
fcl.args(ax)
```

Or import directly the specific function:

```typescript
import { args } from '@onflow/fcl';
import { args } from "@onflow/fcl"

args(ax);
args(ax)
```

## Usage

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

await fcl.mutate({
cadence: `
Expand All @@ -44,32 +44,33 @@ await fcl.mutate({
}
`,
args: (arg, t) => [
arg('10.0', t.UFix64), // Will be the first argument `amount: UFix64`
arg('0xba1132bc08f82fe2', t.Address), // Will be the second argument `to: Address`
arg("10.0", t.UFix64), // Will be the first argument `amount: UFix64`
arg("0xba1132bc08f82fe2", t.Address), // Will be the second argument `to: Address`
],
});
})
```

## Parameters

### `ax`
### `ax`

- Type:

- Type:
```typescript
CadenceArgument < any > [];
CadenceArgument<any>[]
```

- Description: An array of argument objects created with fcl.arg()


## Returns

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


A Partial Interaction object containing the arguments and types passed in

---
---
44 changes: 23 additions & 21 deletions docs/build/tools/clients/fcl-js/packages-docs/fcl/atBlockHeight.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: 'atBlockHeight'
description: 'atBlockHeight function documentation.'
title: "atBlockHeight"
description: "atBlockHeight function documentation."
---

<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/cadence/build-at-block-height.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/cadence/build-at-block-height.ts). DO NOT EDIT MANUALLY -->
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/build-at-block-height.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/build-at-block-height.ts). DO NOT EDIT MANUALLY -->

# atBlockHeight

Expand All @@ -18,60 +18,62 @@ Block height expresses the height of the block on the chain. The latest block he
You can import the entire package and access the function:

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

fcl.atBlockHeight(height);
fcl.atBlockHeight(height)
```

Or import directly the specific function:

```typescript
import { atBlockHeight } from '@onflow/fcl';
import { atBlockHeight } from "@onflow/fcl"

atBlockHeight(height);
atBlockHeight(height)
```

## Usage

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl";

// Get block at specific height
await fcl.send([fcl.getBlock(), fcl.atBlockHeight(123)]).then(fcl.decode);

// Get account at specific block height
await fcl
.send([fcl.getAccount('0x1d007d755706c469'), fcl.atBlockHeight(12345)])
.then(fcl.decode);
await fcl.send([
fcl.getAccount("0x1d007d755706c469"),
fcl.atBlockHeight(12345)
]).then(fcl.decode);

// Execute script at specific block height
await fcl
.send([
fcl.script`
await fcl.send([
fcl.script`
access(all) fun main(): UFix64 {
return getCurrentBlock().height
}
`,
fcl.atBlockHeight(100),
])
.then(fcl.decode);
fcl.atBlockHeight(100)
]).then(fcl.decode);
```

## Parameters

### `height`
### `height`


- Type: `number`
- Description: The height of the block to execute the interaction at


## Returns

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


A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'

---
---
51 changes: 24 additions & 27 deletions docs/build/tools/clients/fcl-js/packages-docs/fcl/atBlockId.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: 'atBlockId'
description: 'atBlockId function documentation.'
title: "atBlockId"
description: "atBlockId function documentation."
---

<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/cadence/build-at-block-id.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/cadence/build-at-block-id.ts). DO NOT EDIT MANUALLY -->
<!-- THIS DOCUMENT IS AUTO-GENERATED FROM [onflow/fcl/../sdk/src/build/build-at-block-id.ts](https://github.com/onflow/fcl-js/tree/master/packages/fcl/../sdk/src/build/build-at-block-id.ts). DO NOT EDIT MANUALLY -->

# atBlockId

Expand All @@ -18,65 +18,62 @@ Block ID is SHA3-256 hash of the entire block payload. This hash is stored as an
You can import the entire package and access the function:

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl"

fcl.atBlockId(id);
fcl.atBlockId(id)
```

Or import directly the specific function:

```typescript
import { atBlockId } from '@onflow/fcl';
import { atBlockId } from "@onflow/fcl"

atBlockId(id);
atBlockId(id)
```

## Usage

```typescript
import * as fcl from '@onflow/fcl';
import * as fcl from "@onflow/fcl";

// Get block by ID
await fcl.send([fcl.getBlock(), fcl.atBlockId('23232323232')]).then(fcl.decode);
await fcl.send([fcl.getBlock(), fcl.atBlockId("23232323232")]).then(fcl.decode);

// Get account at specific block ID
await fcl
.send([
fcl.getAccount('0x1d007d755706c469'),
fcl.atBlockId(
'9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3',
),
])
.then(fcl.decode);
await fcl.send([
fcl.getAccount("0x1d007d755706c469"),
fcl.atBlockId("9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3")
]).then(fcl.decode);

// Execute script at specific block
await fcl
.send([
fcl.script`
await fcl.send([
fcl.script`
access(all) fun main(): UFix64 {
return getCurrentBlock().timestamp
}
`,
fcl.atBlockId('a1b2c3d4e5f6'),
])
.then(fcl.decode);
fcl.atBlockId("a1b2c3d4e5f6")
]).then(fcl.decode);
```

## Parameters

### `id`
### `id`


- Type: `string`
- Description: The ID of the block to execute the interaction at


## Returns

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


A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'

---
---
Loading