-
Notifications
You must be signed in to change notification settings - Fork 776
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1175 from starknet-io/ci/docs-version
CI documentation version
- Loading branch information
Showing
235 changed files
with
43,375 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
label: 'API' |
2,621 changes: 2,621 additions & 0 deletions
2,621
www/versioned_docs/version-6.11.0/API/classes/Account.md
Large diffs are not rendered by default.
Oops, something went wrong.
1,364 changes: 1,364 additions & 0 deletions
1,364
www/versioned_docs/version-6.11.0/API/classes/AccountInterface.md
Large diffs are not rendered by default.
Oops, something went wrong.
95 changes: 95 additions & 0 deletions
95
www/versioned_docs/version-6.11.0/API/classes/CairoCustomEnum.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
id: 'CairoCustomEnum' | ||
title: 'Class: CairoCustomEnum' | ||
sidebar_label: 'CairoCustomEnum' | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
Class to handle Cairo custom Enum | ||
|
||
**`Param`** | ||
|
||
object containing the variants and its content. Example : | ||
{Success: 234, Warning: undefined, Error: undefined}. | ||
Only one variant with a value, object, array. | ||
|
||
**`Example`** | ||
|
||
```typescript | ||
const myCairoEnum = new CairoCustomEnum({ | ||
Success: undefined, | ||
Warning: '0x7f32ea', | ||
Error: undefined, | ||
}); | ||
``` | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new CairoCustomEnum**(`enumContent`): [`CairoCustomEnum`](CairoCustomEnum.md) | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------------ | :------------------------------------------- | :----------------------------------------------------------------------------------------------- | | ||
| `enumContent` | [`CairoEnumRaw`](../modules.md#cairoenumraw) | an object with the variants as keys and the content as value. Only one content shall be defined. | | ||
|
||
#### Returns | ||
|
||
[`CairoCustomEnum`](CairoCustomEnum.md) | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoCustomEnum.ts:29](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoCustomEnum.ts#L29) | ||
|
||
## Properties | ||
|
||
### variant | ||
|
||
• `Readonly` **variant**: [`CairoEnumRaw`](../modules.md#cairoenumraw) | ||
|
||
direct readonly access to variants of the Cairo Custom Enum. | ||
|
||
**`Example`** | ||
|
||
```typescript | ||
const successValue = myCairoEnum.variant.Success; | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoCustomEnum.ts:24](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoCustomEnum.ts#L24) | ||
|
||
## Methods | ||
|
||
### unwrap | ||
|
||
▸ **unwrap**(): `any` | ||
|
||
#### Returns | ||
|
||
`any` | ||
|
||
the content of the valid variant of a Cairo custom Enum. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoCustomEnum.ts:47](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoCustomEnum.ts#L47) | ||
|
||
___ | ||
|
||
### activeVariant | ||
|
||
▸ **activeVariant**(): `string` | ||
|
||
#### Returns | ||
|
||
`string` | ||
|
||
the name of the valid variant of a Cairo custom Enum. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoCustomEnum.ts:60](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoCustomEnum.ts#L60) | ||
``` |
125 changes: 125 additions & 0 deletions
125
www/versioned_docs/version-6.11.0/API/classes/CairoOption.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
id: 'CairoOption' | ||
title: 'Class: CairoOption<T>' | ||
sidebar_label: 'CairoOption' | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
Class to handle Cairo Option | ||
|
||
**`Param`** | ||
|
||
CairoOptionVariant.Some or CairoOptionVariant.None | ||
|
||
**`Param`** | ||
|
||
value of type T. | ||
|
||
**`Example`** | ||
|
||
```typescript | ||
const myOption = new CairoOption<BigNumberish>(CairoOptionVariant.Some, '0x54dda8'); | ||
``` | ||
|
||
## Type parameters | ||
|
||
| Name | | ||
| :--- | | ||
| `T` | | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new CairoOption**<`T`\>(`variant`, `someContent?`): [`CairoOption`](CairoOption.md)<`T`\> | ||
|
||
#### Type parameters | ||
|
||
| Name | | ||
| :--- | | ||
| `T` | | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :------------- | :----------------------------------------------------- | | ||
| `variant` | [`CairoOptionVariant`](../enums/CairoOptionVariant.md) | | ||
| `someContent?` | `T` | | ||
|
||
#### Returns | ||
|
||
[`CairoOption`](CairoOption.md)<`T`\> | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:21](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L21) | ||
|
||
## Properties | ||
|
||
### Some | ||
|
||
• `Optional` `Readonly` **Some**: `T` | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:17](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L17) | ||
|
||
--- | ||
|
||
### None | ||
|
||
• `Optional` `Readonly` **None**: `boolean` | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:19](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L19) | ||
|
||
## Methods | ||
|
||
### unwrap | ||
|
||
▸ **unwrap**(): `undefined` \| `T` | ||
|
||
#### Returns | ||
|
||
`undefined` \| `T` | ||
|
||
the content of the valid variant of a Cairo custom Enum. | ||
If None, returns 'undefined'. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:44](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L44) | ||
|
||
--- | ||
|
||
### isSome | ||
|
||
▸ **isSome**(): `boolean` | ||
|
||
#### Returns | ||
|
||
`boolean` | ||
|
||
true if the valid variant is 'isSome'. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:55](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L55) | ||
|
||
--- | ||
|
||
### isNone | ||
|
||
▸ **isNone**(): `boolean` | ||
|
||
#### Returns | ||
|
||
`boolean` | ||
|
||
true if the valid variant is 'isNone'. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoOption.ts:63](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoOption.ts#L63) |
126 changes: 126 additions & 0 deletions
126
www/versioned_docs/version-6.11.0/API/classes/CairoResult.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
id: 'CairoResult' | ||
title: 'Class: CairoResult<T, U>' | ||
sidebar_label: 'CairoResult' | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
Class to handle Cairo Result | ||
|
||
**`Param`** | ||
|
||
CairoResultVariant.Ok or CairoResultVariant.Err | ||
|
||
**`Param`** | ||
|
||
value of type T or U. | ||
|
||
**`Example`** | ||
|
||
```typescript | ||
const myOption = new CairoResult<BigNumberish, CustomError>(CairoResultVariant.Ok, '0x54dda8'); | ||
``` | ||
|
||
## Type parameters | ||
|
||
| Name | | ||
| :--- | | ||
| `T` | | ||
| `U` | | ||
|
||
## Constructors | ||
|
||
### constructor | ||
|
||
• **new CairoResult**<`T`, `U`\>(`variant`, `resultContent`): [`CairoResult`](CairoResult.md)<`T`, `U`\> | ||
|
||
#### Type parameters | ||
|
||
| Name | | ||
| :--- | | ||
| `T` | | ||
| `U` | | ||
|
||
#### Parameters | ||
|
||
| Name | Type | | ||
| :-------------- | :----------------------------------------------------- | | ||
| `variant` | [`CairoResultVariant`](../enums/CairoResultVariant.md) | | ||
| `resultContent` | `T` \| `U` | | ||
|
||
#### Returns | ||
|
||
[`CairoResult`](CairoResult.md)<`T`, `U`\> | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:21](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L21) | ||
|
||
## Properties | ||
|
||
### Ok | ||
|
||
• `Optional` `Readonly` **Ok**: `T` | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:17](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L17) | ||
|
||
--- | ||
|
||
### Err | ||
|
||
• `Optional` `Readonly` **Err**: `U` | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:19](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L19) | ||
|
||
## Methods | ||
|
||
### unwrap | ||
|
||
▸ **unwrap**(): `T` \| `U` | ||
|
||
#### Returns | ||
|
||
`T` \| `U` | ||
|
||
the content of the valid variant of a Cairo Result. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:38](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L38) | ||
|
||
--- | ||
|
||
### isOk | ||
|
||
▸ **isOk**(): `boolean` | ||
|
||
#### Returns | ||
|
||
`boolean` | ||
|
||
true if the valid variant is 'Ok'. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:52](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L52) | ||
|
||
--- | ||
|
||
### isErr | ||
|
||
▸ **isErr**(): `boolean` | ||
|
||
#### Returns | ||
|
||
`boolean` | ||
|
||
true if the valid variant is 'isErr'. | ||
|
||
#### Defined in | ||
|
||
[src/utils/calldata/enum/CairoResult.ts:60](https://github.com/starknet-io/starknet.js/blob/v6.11.0/src/utils/calldata/enum/CairoResult.ts#L60) |
Oops, something went wrong.