Skip to content

CI documentation version #1346

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions www/versioned_docs/version-6.24.1/API/_category_.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
label: 'API'
2,885 changes: 2,885 additions & 0 deletions www/versioned_docs/version-6.24.1/API/classes/Account.md

Large diffs are not rendered by default.

1,302 changes: 1,302 additions & 0 deletions www/versioned_docs/version-6.24.1/API/classes/AccountInterface.md

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions www/versioned_docs/version-6.24.1/API/classes/BatchClient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
---
id: 'BatchClient'
title: 'Class: BatchClient'
sidebar_label: 'BatchClient'
sidebar_position: 0
custom_edit_url: null
---

## Constructors

### constructor

• **new BatchClient**(`options`): [`BatchClient`](BatchClient.md)

#### Parameters

| Name | Type |
| :-------- | :------------------------------------------------------- |
| `options` | [`BatchClientOptions`](../modules.md#batchclientoptions) |

#### Returns

[`BatchClient`](BatchClient.md)

#### Defined in

[src/utils/batch/index.ts:33](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L33)

## Properties

### nodeUrl

• **nodeUrl**: `string`

#### Defined in

[src/utils/batch/index.ts:13](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L13)

---

### headers

• **headers**: `object`

#### Defined in

[src/utils/batch/index.ts:15](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L15)

---

### interval

• **interval**: `number`

#### Defined in

[src/utils/batch/index.ts:17](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L17)

---

### requestId

• **requestId**: `number` = `0`

#### Defined in

[src/utils/batch/index.ts:19](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L19)

---

### pendingRequests

• `Private` **pendingRequests**: `Record`<`string` \| `number`, [`RequestBody`](../namespaces/types.RPC.JRPC.md#requestbody)\> = `{}`

#### Defined in

[src/utils/batch/index.ts:21](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L21)

---

### batchPromises

• `Private` **batchPromises**: `Record`<`string` \| `number`, `Promise`<[`ResponseBody`](../namespaces/types.RPC.JRPC.md#responsebody)[]\>\> = `{}`

#### Defined in

[src/utils/batch/index.ts:23](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L23)

---

### delayTimer

• `Private` `Optional` **delayTimer**: `Timeout`

#### Defined in

[src/utils/batch/index.ts:25](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L25)

---

### delayPromise

• `Private` `Optional` **delayPromise**: `Promise`<`void`\>

#### Defined in

[src/utils/batch/index.ts:27](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L27)

---

### delayPromiseResolve

• `Private` `Optional` **delayPromiseResolve**: () => `void`

#### Type declaration

▸ (): `void`

##### Returns

`void`

#### Defined in

[src/utils/batch/index.ts:29](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L29)

---

### baseFetch

• `Private` **baseFetch**: (`input`: `RequestInfo` \| `URL`, `init?`: `RequestInit`) => `Promise`<`Response`\>

#### Type declaration

▸ (`input`, `init?`): `Promise`<`Response`\>

##### Parameters

| Name | Type |
| :------ | :--------------------- |
| `input` | `RequestInfo` \| `URL` |
| `init?` | `RequestInit` |

##### Returns

`Promise`<`Response`\>

#### Defined in

[src/utils/batch/index.ts:31](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L31)

## Methods

### wait

▸ **wait**(): `Promise`<`void`\>

#### Returns

`Promise`<`void`\>

#### Defined in

[src/utils/batch/index.ts:40](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L40)

---

### addPendingRequest

▸ **addPendingRequest**<`T`\>(`method`, `params?`, `id?`): `string` \| `number`

#### Type parameters

| Name | Type |
| :--- | :-------------------------------------------------------------------------- |
| `T` | extends keyof `ReadMethods` \| keyof `WriteMethods` \| keyof `TraceMethods` |

#### Parameters

| Name | Type |
| :-------- | :------------------------------------------------------------------------------- |
| `method` | `T` |
| `params?` | [`Methods`](../namespaces/types.RPC.RPCSPEC07.API.md#methods)[`T`][``"params"``] |
| `id?` | `string` \| `number` |

#### Returns

`string` \| `number`

#### Defined in

[src/utils/batch/index.ts:66](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L66)

---

### sendBatch

▸ **sendBatch**(`requests`): `Promise`<`any`\>

#### Parameters

| Name | Type |
| :--------- | :------------------------------------------------------------- |
| `requests` | [`RequestBody`](../namespaces/types.RPC.JRPC.md#requestbody)[] |

#### Returns

`Promise`<`any`\>

#### Defined in

[src/utils/batch/index.ts:83](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L83)

---

### fetch

▸ **fetch**<`T`, `TResponse`\>(`method`, `params?`, `id?`): `Promise`<`TResponse`\>

Automatically batches and fetches JSON-RPC calls in a single request.

#### Type parameters

| Name | Type |
| :---------- | :-------------------------------------------------------------------------- |
| `T` | extends keyof `ReadMethods` \| keyof `WriteMethods` \| keyof `TraceMethods` |
| `TResponse` | extends `Object` |

#### Parameters

| Name | Type | Description |
| :-------- | :------------------------------------------------------------------------------- | :------------------ |
| `method` | `T` | Method to call |
| `params?` | [`Methods`](../namespaces/types.RPC.RPCSPEC07.API.md#methods)[`T`][``"params"``] | Method parameters |
| `id?` | `string` \| `number` | JSON-RPC Request ID |

#### Returns

`Promise`<`TResponse`\>

JSON-RPC Response

#### Defined in

[src/utils/batch/index.ts:100](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/batch/index.ts#L100)
95 changes: 95 additions & 0 deletions www/versioned_docs/version-6.24.1/API/classes/CairoCustomEnum.md
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.24.1/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.24.1/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:45](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/calldata/enum/CairoCustomEnum.ts#L45)

___

### activeVariant

▸ **activeVariant**(): `string`

#### Returns

`string`

the name of the valid variant of a Cairo custom Enum.

#### Defined in

[src/utils/calldata/enum/CairoCustomEnum.ts:54](https://github.com/starknet-io/starknet.js/blob/v6.24.1/src/utils/calldata/enum/CairoCustomEnum.ts#L54)
```
Loading