-
Notifications
You must be signed in to change notification settings - Fork 65
[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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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)_ | ||
|
||
# Packages Docs | ||
|
||
A list of all packages available inside FCL library with functions and types documentation. | ||
|
||
- [@onflow/sdk](./sdk/index.md) | ||
|
||
--- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
sidebar_position: 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) | ||
|
||
|
||
--- |
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 | ||
} | ||
``` | ||
|
||
--- |
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> | ||
``` | ||
|
||
--- |
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> | ||
``` | ||
|
||
--- |
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` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we link to what this is? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
``` | ||
|
||
--- |
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> | ||
``` | ||
|
||
--- |
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) | ||
|
||
|
||
--- |
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` | ||
|
||
|
||
--- |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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 -->
There was a problem hiding this comment.
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.