Skip to content

Commit 099254f

Browse files
authored
FCL-JS Packages Docs Regenerated (#1527)
Co-authored-by: mfbz <mfbz@users.noreply.github.com>
1 parent 10de2d9 commit 099254f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1531
-1260
lines changed
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: 'arg'
3-
description: 'arg function documentation.'
2+
title: "arg"
3+
description: "arg function documentation."
44
---
55

6-
<!-- 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 -->
6+
<!-- 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 -->
77

88
# arg
99

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

1919
```typescript
20-
import * as fcl from '@onflow/fcl';
20+
import * as fcl from "@onflow/fcl"
2121

22-
fcl.arg(value, xform);
22+
fcl.arg(value, xform)
2323
```
2424

2525
Or import directly the specific function:
2626

2727
```typescript
28-
import { arg } from '@onflow/fcl';
28+
import { arg } from "@onflow/fcl"
2929

30-
arg(value, xform);
30+
arg(value, xform)
3131
```
3232

3333
## Usage
3434

3535
```typescript
36-
import * as fcl from '@onflow/fcl';
36+
import * as fcl from "@onflow/fcl"
3737

3838
const result = await fcl.query({
3939
cadence: `
@@ -45,34 +45,36 @@ const result = await fcl.query({
4545
args: (arg, t) => [
4646
arg(7, t.Int), // a: Int
4747
arg(6, t.Int), // b: Int
48-
arg('0xba1132bc08f82fe2', t.Address), // addr: Address
48+
arg("0xba1132bc08f82fe2", t.Address), // addr: Address
4949
],
5050
});
5151
```
5252

5353
## Parameters
5454

55-
### `value`
55+
### `value`
5656

57-
- Type:
5857

58+
- Type:
5959
```typescript
60-
TypeDescriptorInput<T>;
60+
TypeDescriptorInput<T>
6161
```
62-
6362
- Description: Any value that you are looking to pass to other builders
6463

65-
### `xform`
64+
### `xform`
65+
6666

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

70+
7071
## Returns
7172

7273
```typescript
73-
CadenceArgument<T>;
74+
CadenceArgument<T>
7475
```
7576

77+
7678
An ArgumentObject that holds the value and type passed in
7779

78-
---
80+
---
Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: 'args'
3-
description: 'args function documentation.'
2+
title: "args"
3+
description: "args function documentation."
44
---
55

6-
<!-- 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 -->
6+
<!-- 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 -->
77

88
# args
99

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

1919
```typescript
20-
import * as fcl from '@onflow/fcl';
20+
import * as fcl from "@onflow/fcl"
2121

22-
fcl.args(ax);
22+
fcl.args(ax)
2323
```
2424

2525
Or import directly the specific function:
2626

2727
```typescript
28-
import { args } from '@onflow/fcl';
28+
import { args } from "@onflow/fcl"
2929

30-
args(ax);
30+
args(ax)
3131
```
3232

3333
## Usage
3434

3535
```typescript
36-
import * as fcl from '@onflow/fcl';
36+
import * as fcl from "@onflow/fcl"
3737

3838
await fcl.mutate({
3939
cadence: `
@@ -44,32 +44,33 @@ await fcl.mutate({
4444
}
4545
`,
4646
args: (arg, t) => [
47-
arg('10.0', t.UFix64), // Will be the first argument `amount: UFix64`
48-
arg('0xba1132bc08f82fe2', t.Address), // Will be the second argument `to: Address`
47+
arg("10.0", t.UFix64), // Will be the first argument `amount: UFix64`
48+
arg("0xba1132bc08f82fe2", t.Address), // Will be the second argument `to: Address`
4949
],
50-
});
50+
})
5151
```
5252

5353
## Parameters
5454

55-
### `ax`
55+
### `ax`
5656

57-
- Type:
5857

58+
- Type:
5959
```typescript
60-
CadenceArgument < any > [];
60+
CadenceArgument<any>[]
6161
```
62-
6362
- Description: An array of argument objects created with fcl.arg()
6463

64+
6565
## Returns
6666

6767
```typescript
6868
export type InteractionBuilderFn = (
69-
ix: Interaction,
70-
) => Interaction | Promise<Interaction>;
69+
ix: Interaction
70+
) => Interaction | Promise<Interaction>
7171
```
7272
73+
7374
A Partial Interaction object containing the arguments and types passed in
7475
75-
---
76+
---
Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: 'atBlockHeight'
3-
description: 'atBlockHeight function documentation.'
2+
title: "atBlockHeight"
3+
description: "atBlockHeight function documentation."
44
---
55

6-
<!-- 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 -->
6+
<!-- 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 -->
77

88
# atBlockHeight
99

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

2020
```typescript
21-
import * as fcl from '@onflow/fcl';
21+
import * as fcl from "@onflow/fcl"
2222

23-
fcl.atBlockHeight(height);
23+
fcl.atBlockHeight(height)
2424
```
2525

2626
Or import directly the specific function:
2727

2828
```typescript
29-
import { atBlockHeight } from '@onflow/fcl';
29+
import { atBlockHeight } from "@onflow/fcl"
3030

31-
atBlockHeight(height);
31+
atBlockHeight(height)
3232
```
3333

3434
## Usage
3535

3636
```typescript
37-
import * as fcl from '@onflow/fcl';
37+
import * as fcl from "@onflow/fcl";
3838

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

4242
// Get account at specific block height
43-
await fcl
44-
.send([fcl.getAccount('0x1d007d755706c469'), fcl.atBlockHeight(12345)])
45-
.then(fcl.decode);
43+
await fcl.send([
44+
fcl.getAccount("0x1d007d755706c469"),
45+
fcl.atBlockHeight(12345)
46+
]).then(fcl.decode);
4647

4748
// Execute script at specific block height
48-
await fcl
49-
.send([
50-
fcl.script`
49+
await fcl.send([
50+
fcl.script`
5151
access(all) fun main(): UFix64 {
5252
return getCurrentBlock().height
5353
}
5454
`,
55-
fcl.atBlockHeight(100),
56-
])
57-
.then(fcl.decode);
55+
fcl.atBlockHeight(100)
56+
]).then(fcl.decode);
5857
```
5958

6059
## Parameters
6160

62-
### `height`
61+
### `height`
62+
6363

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

67+
6768
## Returns
6869

6970
```typescript
7071
export type InteractionBuilderFn = (
71-
ix: Interaction,
72-
) => Interaction | Promise<Interaction>;
72+
ix: Interaction
73+
) => Interaction | Promise<Interaction>
7374
```
7475
76+
7577
A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'
7678
77-
---
79+
---
Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: 'atBlockId'
3-
description: 'atBlockId function documentation.'
2+
title: "atBlockId"
3+
description: "atBlockId function documentation."
44
---
55

6-
<!-- 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 -->
6+
<!-- 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 -->
77

88
# atBlockId
99

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

2020
```typescript
21-
import * as fcl from '@onflow/fcl';
21+
import * as fcl from "@onflow/fcl"
2222

23-
fcl.atBlockId(id);
23+
fcl.atBlockId(id)
2424
```
2525

2626
Or import directly the specific function:
2727

2828
```typescript
29-
import { atBlockId } from '@onflow/fcl';
29+
import { atBlockId } from "@onflow/fcl"
3030

31-
atBlockId(id);
31+
atBlockId(id)
3232
```
3333

3434
## Usage
3535

3636
```typescript
37-
import * as fcl from '@onflow/fcl';
37+
import * as fcl from "@onflow/fcl";
3838

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

4242
// Get account at specific block ID
43-
await fcl
44-
.send([
45-
fcl.getAccount('0x1d007d755706c469'),
46-
fcl.atBlockId(
47-
'9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3',
48-
),
49-
])
50-
.then(fcl.decode);
43+
await fcl.send([
44+
fcl.getAccount("0x1d007d755706c469"),
45+
fcl.atBlockId("9dda5f281897389b99f103a1c6b180eec9dac870de846449a302103ce38453f3")
46+
]).then(fcl.decode);
5147

5248
// Execute script at specific block
53-
await fcl
54-
.send([
55-
fcl.script`
49+
await fcl.send([
50+
fcl.script`
5651
access(all) fun main(): UFix64 {
5752
return getCurrentBlock().timestamp
5853
}
5954
`,
60-
fcl.atBlockId('a1b2c3d4e5f6'),
61-
])
62-
.then(fcl.decode);
55+
fcl.atBlockId("a1b2c3d4e5f6")
56+
]).then(fcl.decode);
6357
```
6458

6559
## Parameters
6660

67-
### `id`
61+
### `id`
62+
6863

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

67+
7268
## Returns
7369

7470
```typescript
7571
export type InteractionBuilderFn = (
76-
ix: Interaction,
77-
) => Interaction | Promise<Interaction>;
72+
ix: Interaction
73+
) => Interaction | Promise<Interaction>
7874
```
7975
76+
8077
A partial interaction to be paired with another interaction such as 'fcl.getBlock()' or 'fcl.getAccount()'
8178
82-
---
79+
---

0 commit comments

Comments
 (0)