diff --git a/README.md b/README.md index 01bf84e..bd57de1 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ const quote = await client.getQuote({ ``` Note that we provide additional utilities for retrieving available routes, chain details, and token infos. -See [SDK reference](). +See [SDK reference](./packages/sdk/README.md). ### 3. Execute a quote diff --git a/packages/sdk/README.md b/packages/sdk/README.md new file mode 100644 index 0000000..fff9147 --- /dev/null +++ b/packages/sdk/README.md @@ -0,0 +1,45 @@ +# `@across-protocol/integrator-sdk` Reference + +## `AcrossClient` + +### Set Up + +- [`createAcrossClient`](./docs/functions/createAcrossClient.md) +- [`getAcrossClient`](./docs/functions/getAcrossClient.md) + +### Chains and Routes + +- [`getSupportedChains`](./docs/classes/AcrossClient.md#getsupportedchains) +- [`getAvailableRoutes`](./docs/classes/AcrossClient.md#getquote) + +### Quotes, Fees and Limits + +- [`getQuote`](./docs/classes/AcrossClient.md#getquote) +- [`getLimits`](./docs/classes/AcrossClient.md#getlimits) +- [`getSuggestedFees`](./docs/classes/AcrossClient.md#getsuggestedfees) + +### Transaction Simulations and Executions + +- [`executeQuote`](./docs/classes/AcrossClient.md#executequote) +- [`simulateDepositTx`](./docs/classes/AcrossClient.md#simulatedeposittx) + +### Deposit and Fill Status + +- [`waitForDepositTx`](./docs/classes/AcrossClient.md#waitfordeposittx) +- [`getDepositLogs`](./docs/classes/AcrossClient.md#getdepositlogs) +- [`getFillByDepositTx`](./docs/classes/AcrossClient.md#getfillbydeposittx) + +### Debugging via Tenderly + +- [`simulateTxOnTenderly`](./docs/classes/AcrossClient.md#simulatetxontenderly) + +## Utilities + +### Integrator tag + +- [`tagIntegratorId`](./docs/functions/tagIntegratorId.md) +- [`getIntegratorDataSuffix`](./docs/functions/getIntegratorDataSuffix.md) + +### Cross-chain message + +- [`buildMulticallHandlerMessage`](./docs/functions/buildMulticallHandlerMessage.md) diff --git a/packages/sdk/docs/README.md b/packages/sdk/docs/README.md new file mode 100644 index 0000000..b6467e6 --- /dev/null +++ b/packages/sdk/docs/README.md @@ -0,0 +1,45 @@ +# `@across-protocol/integrator-sdk` Reference + +## `AcrossClient` + +### Set Up + +- [`createAcrossClient`](_media/createAcrossClient.md) +- [`getAcrossClient`](_media/getAcrossClient.md) + +### Chains and Routes + +- [`getSupportedChains`](./docs/classes/AcrossClient.md#getsupportedchains) +- [`getAvailableRoutes`](./docs/classes/AcrossClient.md#getquote) + +### Quotes, Fees and Limits + +- [`getQuote`](./docs/classes/AcrossClient.md#getquote) +- [`getLimits`](./docs/classes/AcrossClient.md#getlimits) +- [`getSuggestedFees`](./docs/classes/AcrossClient.md#getsuggestedfees) + +### Transaction Simulations and Executions + +- [`executeQuote`](./docs/classes/AcrossClient.md#executequote) +- [`simulateDepositTx`](./docs/classes/AcrossClient.md#simulatedeposittx) + +### Deposit and Fill Status + +- [`waitForDepositTx`](./docs/classes/AcrossClient.md#waitfordeposittx) +- [`getDepositLogs`](./docs/classes/AcrossClient.md#getdepositlogs) +- [`getFillByDepositTx`](./docs/classes/AcrossClient.md#getfillbydeposittx) + +### Debugging via Tenderly + +- [`simulateTxOnTenderly`](./docs/classes/AcrossClient.md#simulatetxontenderly) + +## Utilities + +### Integrator tag + +- [`tagIntegratorId`](_media/tagIntegratorId.md) +- [`getIntegratorDataSuffix`](_media/getIntegratorDataSuffix.md) + +### Cross-chain message + +- [`buildMulticallHandlerMessage`](_media/buildMulticallHandlerMessage.md) diff --git a/packages/sdk/docs/_media/buildMulticallHandlerMessage.md b/packages/sdk/docs/_media/buildMulticallHandlerMessage.md new file mode 100644 index 0000000..e783f44 --- /dev/null +++ b/packages/sdk/docs/_media/buildMulticallHandlerMessage.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / buildMulticallHandlerMessage + +# Function: buildMulticallHandlerMessage() + +> **buildMulticallHandlerMessage**(`params`): \`0x$\{string\}\` + +## Parameters + +• **params**: [`BuildMessageParams`](../type-aliases/BuildMessageParams.md) + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/multicallHandler.ts:23](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/multicallHandler.ts#L23) diff --git a/packages/sdk/docs/_media/createAcrossClient.md b/packages/sdk/docs/_media/createAcrossClient.md new file mode 100644 index 0000000..dbd9828 --- /dev/null +++ b/packages/sdk/docs/_media/createAcrossClient.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / createAcrossClient + +# Function: createAcrossClient() + +> **createAcrossClient**(`options`): [`AcrossClient`](../classes/AcrossClient.md) + +Create a singleton `AcrossClient` instance. + +## Parameters + +• **options**: [`AcrossClientOptions`](../type-aliases/AcrossClientOptions.md) + +See [AcrossClientOptions](../type-aliases/AcrossClientOptions.md). + +## Returns + +[`AcrossClient`](../classes/AcrossClient.md) + +A new `AcrossClient` instance. + +## Defined in + +[packages/sdk/src/client.ts:588](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L588) diff --git a/packages/sdk/docs/_media/getAcrossClient.md b/packages/sdk/docs/_media/getAcrossClient.md new file mode 100644 index 0000000..a0c314d --- /dev/null +++ b/packages/sdk/docs/_media/getAcrossClient.md @@ -0,0 +1,21 @@ +[@across-protocol/integrator-sdk](../globals.md) / getAcrossClient + +# Function: getAcrossClient() + +> **getAcrossClient**(): [`AcrossClient`](../classes/AcrossClient.md) + +Get the existing `AcrossClient` singleton instance. + +## Returns + +[`AcrossClient`](../classes/AcrossClient.md) + +The existing `AcrossClient` instance. + +## Throws + +If the instance is not initialized. + +## Defined in + +[packages/sdk/src/client.ts:578](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L578) diff --git a/packages/sdk/docs/_media/getIntegratorDataSuffix.md b/packages/sdk/docs/_media/getIntegratorDataSuffix.md new file mode 100644 index 0000000..5bdc807 --- /dev/null +++ b/packages/sdk/docs/_media/getIntegratorDataSuffix.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getIntegratorDataSuffix + +# Function: getIntegratorDataSuffix() + +> **getIntegratorDataSuffix**(`integratorId`): \`0x$\{string\}\` + +## Parameters + +• **integratorId**: `string` + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/hex.ts:9](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/hex.ts#L9) diff --git a/packages/sdk/docs/_media/tagIntegratorId.md b/packages/sdk/docs/_media/tagIntegratorId.md new file mode 100644 index 0000000..71039e1 --- /dev/null +++ b/packages/sdk/docs/_media/tagIntegratorId.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / tagIntegratorId + +# Function: tagIntegratorId() + +> **tagIntegratorId**(`integratorId`, `txData`): \`0x$\{string\}\` + +## Parameters + +• **integratorId**: `string` + +• **txData**: \`0x$\{string\}\` + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/hex.ts:5](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/hex.ts#L5) diff --git a/packages/sdk/docs/classes/AcrossApiError.md b/packages/sdk/docs/classes/AcrossApiError.md new file mode 100644 index 0000000..98d2a9b --- /dev/null +++ b/packages/sdk/docs/classes/AcrossApiError.md @@ -0,0 +1,199 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossApiError + +# Class: AcrossApiError + +## Extends + +- [`HttpError`](HttpError.md) + +## Extended by + +- [`AcrossApiSimulationError`](AcrossApiSimulationError.md) + +## Constructors + +### new AcrossApiError() + +> **new AcrossApiError**(`params`, `opts`?): [`AcrossApiError`](AcrossApiError.md) + +#### Parameters + +• **params** + +• **params.code**: `"INVALID_PARAM"` \| `"MISSING_PARAM"` \| `"SIMULATION_ERROR"` \| `"AMOUNT_TOO_LOW"` \| `"AMOUNT_TOO_HIGH"` \| `"ROUTE_NOT_ENABLED"` \| `"UPSTREAM_RPC_ERROR"` \| `"UPSTREAM_HTTP_ERROR"` + +• **params.message?**: `string` + +• **params.name?**: `string` + +• **params.status?**: `number` + +• **params.url?**: `string` + +• **opts?**: `ErrorOptions` + +#### Returns + +[`AcrossApiError`](AcrossApiError.md) + +#### Overrides + +[`HttpError`](HttpError.md).[`constructor`](HttpError.md#constructors) + +#### Defined in + +[packages/sdk/src/errors/index.ts:33](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L33) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +[`HttpError`](HttpError.md).[`cause`](HttpError.md#cause) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +[`HttpError`](HttpError.md).[`message`](HttpError.md#message) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +[`HttpError`](HttpError.md).[`name`](HttpError.md#name) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +[`HttpError`](HttpError.md).[`stack`](HttpError.md#stack) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### status + +> `readonly` **status**: `number` + +#### Inherited from + +[`HttpError`](HttpError.md).[`status`](HttpError.md#status) + +#### Defined in + +[packages/sdk/src/errors/index.ts:15](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L15) + +*** + +### url + +> `readonly` **url**: `string` + +#### Inherited from + +[`HttpError`](HttpError.md).[`url`](HttpError.md#url) + +#### Defined in + +[packages/sdk/src/errors/index.ts:14](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L14) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +[`HttpError`](HttpError.md).[`prepareStackTrace`](HttpError.md#preparestacktrace) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +[`HttpError`](HttpError.md).[`stackTraceLimit`](HttpError.md#stacktracelimit) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +[`HttpError`](HttpError.md).[`captureStackTrace`](HttpError.md#capturestacktrace) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/AcrossApiSimulationError.md b/packages/sdk/docs/classes/AcrossApiSimulationError.md new file mode 100644 index 0000000..3ce299f --- /dev/null +++ b/packages/sdk/docs/classes/AcrossApiSimulationError.md @@ -0,0 +1,225 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossApiSimulationError + +# Class: AcrossApiSimulationError + +## Extends + +- [`AcrossApiError`](AcrossApiError.md) + +## Constructors + +### new AcrossApiSimulationError() + +> **new AcrossApiSimulationError**(`params`, `opts`?): [`AcrossApiSimulationError`](AcrossApiSimulationError.md) + +#### Parameters + +• **params** + +• **params.message?**: `string` + +• **params.transaction?** + +• **params.transaction.data?**: \`0x$\{string\}\` + +• **params.transaction.from?**: \`0x$\{string\}\` + +• **params.transaction.to?**: \`0x$\{string\}\` + +• **params.transaction.value?**: `string` + +• **params.url?**: `string` + +• **opts?**: `ErrorOptions` + +#### Returns + +[`AcrossApiSimulationError`](AcrossApiSimulationError.md) + +#### Overrides + +[`AcrossApiError`](AcrossApiError.md).[`constructor`](AcrossApiError.md#constructors) + +#### Defined in + +[packages/sdk/src/errors/index.ts:61](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L61) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`cause`](AcrossApiError.md#cause) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`message`](AcrossApiError.md#message) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`name`](AcrossApiError.md#name) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`stack`](AcrossApiError.md#stack) + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### status + +> `readonly` **status**: `number` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`status`](AcrossApiError.md#status) + +#### Defined in + +[packages/sdk/src/errors/index.ts:15](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L15) + +*** + +### transaction + +> `readonly` **transaction**: `object` + +#### data + +> **data**: \`0x$\{string\}\` + +#### from + +> **from**: \`0x$\{string\}\` + +#### to + +> **to**: \`0x$\{string\}\` + +#### value? + +> `optional` **value**: `string` + +#### Defined in + +[packages/sdk/src/errors/index.ts:54](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L54) + +*** + +### url + +> `readonly` **url**: `string` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`url`](AcrossApiError.md#url) + +#### Defined in + +[packages/sdk/src/errors/index.ts:14](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L14) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`prepareStackTrace`](AcrossApiError.md#preparestacktrace) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`stackTraceLimit`](AcrossApiError.md#stacktracelimit) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +[`AcrossApiError`](AcrossApiError.md).[`captureStackTrace`](AcrossApiError.md#capturestacktrace) + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/AcrossClient.md b/packages/sdk/docs/classes/AcrossClient.md new file mode 100644 index 0000000..a77e8c1 --- /dev/null +++ b/packages/sdk/docs/classes/AcrossClient.md @@ -0,0 +1,2991 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossClient + +# Class: AcrossClient + +Entrypoint for the Across Integrator SDK + +## Properties + +### logger + +> **logger**: [`LoggerT`](../type-aliases/LoggerT.md) + +#### Defined in + +[packages/sdk/src/client.ts:142](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L142) + +## Accessors + +### isTenderlyEnabled + +> `get` **isTenderlyEnabled**(): `boolean` + +#### Returns + +`boolean` + +#### Defined in + +[packages/sdk/src/client.ts:152](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L152) + +## Methods + +### executeQuote() + +> **executeQuote**(`params`): `Promise`\<`void`\> + +Execute a quote by: +1. Approving the SpokePool contract if necessary +2. Depositing the input token on the origin chain +3. Waiting for the deposit to be filled on the destination chain + +See [executeQuote](../functions/executeQuote.md) for more details. + +#### Parameters + +• **params**: `Omit`\<[`ExecuteQuoteParams`](../type-aliases/ExecuteQuoteParams.md), `"logger"` \| `"integratorId"` \| `"originClient"` \| `"destinationClient"`\> + +See [ExecuteQuoteParams](../type-aliases/ExecuteQuoteParams.md). + +#### Returns + +`Promise`\<`void`\> + +The deposit ID and receipts for the deposit and fill transactions. + +#### Example + +```ts +const quote = await client.getQuote({ route, inputAmount }); +const { depositId } = await client.executeQuote({ deposit: quote.deposit }); +``` + +#### Defined in + +[packages/sdk/src/client.ts:243](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L243) + +*** + +### getAvailableRoutes() + +> **getAvailableRoutes**(`params`): `Promise`\<[`GetAvailableRoutesReturnType`](../type-aliases/GetAvailableRoutesReturnType.md)\> + +Get the available routes for a given set of parameters. See [getAvailableRoutes](../functions/getAvailableRoutes.md). + +#### Parameters + +• **params**: `Omit`\<[`GetAvailableRoutesParams`](../type-aliases/GetAvailableRoutesParams.md), `"logger"` \| `"apiUrl"`\> + +See [GetAvailableRoutesParams](../type-aliases/GetAvailableRoutesParams.md). + +#### Returns + +`Promise`\<[`GetAvailableRoutesReturnType`](../type-aliases/GetAvailableRoutesReturnType.md)\> + +See [GetAvailableRoutesReturnType](../type-aliases/GetAvailableRoutesReturnType.md). + +#### Defined in + +[packages/sdk/src/client.ts:319](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L319) + +*** + +### getDepositLogs() + +> **getDepositLogs**(`params`): `Promise`\<`undefined` \| `Log`\<`bigint`, `number`, `false`, `undefined`, `true`, readonly [`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`], `"V3FundsDeposited"`\>\> + +Get the deposit logs for a given deposit. See [getDepositLogs](../functions/getDepositLogs.md). + +#### Parameters + +• **params**: [`GetDepositLogsParams`](../type-aliases/GetDepositLogsParams.md) + +See [GetDepositLogsParams](../type-aliases/GetDepositLogsParams.md). + +#### Returns + +`Promise`\<`undefined` \| `Log`\<`bigint`, `number`, `false`, `undefined`, `true`, readonly [`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`], `"V3FundsDeposited"`\>\> + +See [GetDepositLogsReturnType](../type-aliases/GetDepositLogsReturnType.md). + +#### Defined in + +[packages/sdk/src/client.ts:447](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L447) + +*** + +### getFillByDepositTx() + +> **getFillByDepositTx**(`__namedParameters`): `Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +#### Parameters + +• **\_\_namedParameters**: `Omit`\<[`GetFillByDepositTxParams`](../type-aliases/GetFillByDepositTxParams.md), `"destinationChainClient"` \| `"indexerUrl"`\> & `object` + +#### Returns + +`Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +#### Defined in + +[packages/sdk/src/client.ts:509](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L509) + +*** + +### getLimits() + +> **getLimits**(`params`): `Promise`\<[`GetLimitsReturnType`](../type-aliases/GetLimitsReturnType.md)\> + +Get the deposit limits for a given route. See [getLimits](../functions/getLimits.md). + +#### Parameters + +• **params**: `Omit`\<[`GetLimitsParams`](../type-aliases/GetLimitsParams.md), `"logger"` \| `"apiUrl"`\> + +See [GetLimitsParams](../type-aliases/GetLimitsParams.md). + +#### Returns + +`Promise`\<[`GetLimitsReturnType`](../type-aliases/GetLimitsReturnType.md)\> + +See [GetLimitsReturnType](../type-aliases/GetLimitsReturnType.md). + +#### Defined in + +[packages/sdk/src/client.ts:373](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L373) + +*** + +### getPublicClient() + +> **getPublicClient**(`chainId`): `object` + +**`Internal`** + +#### Parameters + +• **chainId**: `number` + +#### Returns + +`object` + +##### account + +> **account**: `undefined` + +The Account of the Client. + +##### batch? + +> `optional` **batch**: `object` + +Flags for batch settings. + +##### batch.multicall? + +> `optional` **multicall**: `boolean` \| `object` + +Toggle to enable `eth_call` multicall aggregation. + +##### cacheTime + +> **cacheTime**: `number` + +Time (in ms) that cached data will remain in memory. + +##### call() + +> **call**: (`parameters`) => `Promise`\<`CallReturnType`\> + +Executes a new message call immediately without submitting a transaction to the network. + +- Docs: https://viem.sh/docs/actions/public/call +- JSON-RPC Methods: [`eth_call`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_call) + +###### Parameters + +• **parameters**: `CallParameters`\<`Chain`\> + +###### Returns + +`Promise`\<`CallReturnType`\> + +The call data. CallReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const data = await client.call({ + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', + data: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', +}) +``` + +##### ccipRead? + +> `optional` **ccipRead**: `false` \| `object` + +[CCIP Read](https://eips.ethereum.org/EIPS/eip-3668) configuration. + +##### chain + +> **chain**: `Chain` + +Chain for the client. + +##### createBlockFilter() + +> **createBlockFilter**: () => `Promise`\<`object`\> + +Creates a Filter to listen for new block hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createBlockFilter +- JSON-RPC Methods: [`eth_newBlockFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newBlockFilter) + +###### Returns + +`Promise`\<`object`\> + +Filter. CreateBlockFilterReturnType + +###### id + +> **id**: \`0x$\{string\}\` + +###### request + +> **request**: `EIP1193RequestFn`\ + +###### type + +> **type**: `"block"` + +###### Example + +```ts +import { createPublicClient, createBlockFilter, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await createBlockFilter(client) +// { id: "0x345a6572337856574a76364e457a4366", type: 'block' } +``` + +##### createContractEventFilter() + +> **createContractEventFilter**: \<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<`CreateContractEventFilterReturnType`\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +Creates a Filter to retrieve event logs that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges) or [`getFilterLogs`](https://viem.sh/docs/actions/public/getFilterLogs). + +- Docs: https://viem.sh/docs/contract/createContractEventFilter + +###### Type Parameters + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **eventName** *extends* `undefined` \| `string` + +• **args** *extends* `undefined` \| `Record`\<`string`, `unknown`\> \| readonly `unknown`[] + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +###### Parameters + +• **args**: `CreateContractEventFilterParameters`\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\> + +CreateContractEventFilterParameters + +###### Returns + +`Promise`\<`CreateContractEventFilterReturnType`\<`abi`, `eventName`, `args`, `strict`, `fromBlock`, `toBlock`\>\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). CreateContractEventFilterReturnType + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), +}) +``` + +##### createEventFilter() + +> **createEventFilter**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\>(`args`?) => `Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +Creates a [`Filter`](https://viem.sh/docs/glossary/types#filter) to listen for new events that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createEventFilter +- JSON-RPC Methods: [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) + +###### Type Parameters + +• **abiEvent** *extends* `undefined` \| `AbiEvent` = `undefined` + +• **abiEvents** *extends* `undefined` \| readonly `unknown`[] \| readonly `AbiEvent`[] = `abiEvent` *extends* `AbiEvent` ? [`abiEvent`\<`abiEvent`\>] : `undefined` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **_EventName** *extends* `undefined` \| `string` = `MaybeAbiEventName`\<`abiEvent`\> + +• **_Args** *extends* `undefined` \| `Record`\<`string`, `unknown`\> \| readonly `unknown`[] = `undefined` + +###### Parameters + +• **args?**: `CreateEventFilterParameters`\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`, `_EventName`, `_Args`\> + +CreateEventFilterParameters + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: Filter\<"event", abiEvents, \_EventName, \_Args, strict, fromBlock, toBlock\>\[K\] \}\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). CreateEventFilterReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xfba3912ca04dd458c843e2ee08967fc04f3579c2', +}) +``` + +##### createPendingTransactionFilter() + +> **createPendingTransactionFilter**: () => `Promise`\<`object`\> + +Creates a Filter to listen for new pending transaction hashes that can be used with [`getFilterChanges`](https://viem.sh/docs/actions/public/getFilterChanges). + +- Docs: https://viem.sh/docs/actions/public/createPendingTransactionFilter +- JSON-RPC Methods: [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) + +###### Returns + +`Promise`\<`object`\> + +[`Filter`](https://viem.sh/docs/glossary/types#filter). CreateBlockFilterReturnType + +###### id + +> **id**: \`0x$\{string\}\` + +###### request + +> **request**: `EIP1193RequestFn`\ + +###### type + +> **type**: `"transaction"` + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +// { id: "0x345a6572337856574a76364e457a4366", type: 'transaction' } +``` + +##### estimateContractGas() + +> **estimateContractGas**: \<`chain`, `abi`, `functionName`, `args`\>(`args`) => `Promise`\<`bigint`\> + +Estimates the gas required to successfully execute a contract write function call. + +- Docs: https://viem.sh/docs/contract/estimateContractGas + +###### Type Parameters + +• **chain** *extends* `undefined` \| `Chain` + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **functionName** *extends* `string` + +• **args** *extends* `unknown` + +###### Parameters + +• **args**: `EstimateContractGasParameters`\<`abi`, `functionName`, `args`, `chain`\> + +EstimateContractGasParameters + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). EstimateContractGasReturnType + +###### Remarks + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`estimateGas` action](https://viem.sh/docs/actions/public/estimateGas) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gas = await client.estimateContractGas({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint() public']), + functionName: 'mint', + account: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266', +}) +``` + +##### estimateFeesPerGas() + +> **estimateFeesPerGas**: \<`chainOverride`, `type`\>(`args`?) => `Promise`\<`EstimateFeesPerGasReturnType`\<`type`\>\> + +Returns an estimate for the fees per gas for a transaction to be included +in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateFeesPerGas + +###### Type Parameters + +• **chainOverride** *extends* `undefined` \| `Chain` = `undefined` + +• **type** *extends* `FeeValuesType` = `"eip1559"` + +###### Parameters + +• **args?**: `EstimateFeesPerGasParameters`\<`Chain`, `chainOverride`, `type`\> + +###### Returns + +`Promise`\<`EstimateFeesPerGasReturnType`\<`type`\>\> + +An estimate (in wei) for the fees per gas. EstimateFeesPerGasReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateFeesPerGas() +// { maxFeePerGas: ..., maxPriorityFeePerGas: ... } +``` + +##### estimateGas() + +> **estimateGas**: (`args`) => `Promise`\<`bigint`\> + +Estimates the gas necessary to complete a transaction without submitting it to the network. + +- Docs: https://viem.sh/docs/actions/public/estimateGas +- JSON-RPC Methods: [`eth_estimateGas`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_estimategas) + +###### Parameters + +• **args**: `EstimateGasParameters`\<`Chain`\> + +EstimateGasParameters + +###### Returns + +`Promise`\<`bigint`\> + +The gas estimate (in wei). EstimateGasReturnType + +###### Example + +```ts +import { createPublicClient, http, parseEther } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasEstimate = await client.estimateGas({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', + value: parseEther('1'), +}) +``` + +##### estimateMaxPriorityFeePerGas() + +> **estimateMaxPriorityFeePerGas**: \<`chainOverride`\>(`args`?) => `Promise`\<`bigint`\> + +Returns an estimate for the max priority fee per gas (in wei) for a transaction +to be included in the next block. + +- Docs: https://viem.sh/docs/actions/public/estimateMaxPriorityFeePerGas + +###### Type Parameters + +• **chainOverride** *extends* `undefined` \| `Chain` = `undefined` + +###### Parameters + +• **args?** + +• **args.chain?**: `null` \| `chainOverride` + +###### Returns + +`Promise`\<`bigint`\> + +An estimate (in wei) for the max priority fee per gas. EstimateMaxPriorityFeePerGasReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const maxPriorityFeePerGas = await client.estimateMaxPriorityFeePerGas() +// 10000000n +``` + +##### extend() + +> **extend**: \<`client`\>(`fn`) => `Client`\<`Transport`, `Chain`, `undefined`, `PublicRpcSchema`, \{ \[K in string \| number \| symbol\]: client\[K\] \} & `PublicActions`\<`Transport`, `Chain`\>\> + +###### Type Parameters + +• **client** *extends* `object` & `ExactPartial`\<`ExtendableProtectedActions`\<`Transport`, `Chain`, `undefined`\>\> + +###### Parameters + +• **fn** + +###### Returns + +`Client`\<`Transport`, `Chain`, `undefined`, `PublicRpcSchema`, \{ \[K in string \| number \| symbol\]: client\[K\] \} & `PublicActions`\<`Transport`, `Chain`\>\> + +##### getBalance() + +> **getBalance**: (`args`) => `Promise`\<`bigint`\> + +Returns the balance of an address in wei. + +- Docs: https://viem.sh/docs/actions/public/getBalance +- JSON-RPC Methods: [`eth_getBalance`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getbalance) + +###### Parameters + +• **args**: `GetBalanceParameters` + +GetBalanceParameters + +###### Returns + +`Promise`\<`bigint`\> + +The balance of the address in wei. GetBalanceReturnType + +###### Remarks + +You can convert the balance to ether units with [`formatEther`](https://viem.sh/docs/utilities/formatEther). + +```ts +const balance = await getBalance(client, { + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + blockTag: 'safe' +}) +const balanceAsEther = formatEther(balance) +// "6.942" +``` + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const balance = await client.getBalance({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +// 10000000000000000000000n (wei) +``` + +##### getBlobBaseFee() + +> **getBlobBaseFee**: () => `Promise`\<`bigint`\> + +Returns the base fee per blob gas in wei. + +- Docs: https://viem.sh/docs/actions/public/getBlobBaseFee +- JSON-RPC Methods: [`eth_blobBaseFee`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blobBaseFee) + +###### Returns + +`Promise`\<`bigint`\> + +The blob base fee (in wei). GetBlobBaseFeeReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getBlobBaseFee } from 'viem/public' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blobBaseFee = await client.getBlobBaseFee() +``` + +##### getBlock() + +> **getBlock**: \<`includeTransactions`, `blockTag`\>(`args`?) => `Promise`\<`object`\> + +Returns information about a block at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlock +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks +- JSON-RPC Methods: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash) for `blockHash`. + +###### Type Parameters + +• **includeTransactions** *extends* `boolean` = `false` + +• **blockTag** *extends* `BlockTag` = `"latest"` + +###### Parameters + +• **args?**: `GetBlockParameters`\<`includeTransactions`, `blockTag`\> + +GetBlockParameters + +###### Returns + +`Promise`\<`object`\> + +Information about the block. GetBlockReturnType + +###### baseFeePerGas + +> **baseFeePerGas**: `null` \| `bigint` + +Base fee per gas + +###### blobGasUsed + +> **blobGasUsed**: `bigint` + +Total used blob gas by all transactions in this block + +###### difficulty + +> **difficulty**: `bigint` + +Difficulty for this block + +###### excessBlobGas + +> **excessBlobGas**: `bigint` + +Excess blob gas + +###### extraData + +> **extraData**: \`0x$\{string\}\` + +"Extra data" field of this block + +###### gasLimit + +> **gasLimit**: `bigint` + +Maximum gas allowed in this block + +###### gasUsed + +> **gasUsed**: `bigint` + +Total used gas by all transactions in this block + +###### hash + +> **hash**: `blockTag` *extends* `"pending"` ? `null` : \`0x$\{string\}\` + +Block hash or `null` if pending + +###### logsBloom + +> **logsBloom**: `blockTag` *extends* `"pending"` ? `null` : \`0x$\{string\}\` + +Logs bloom filter or `null` if pending + +###### miner + +> **miner**: \`0x$\{string\}\` + +Address that received this block’s mining rewards + +###### mixHash + +> **mixHash**: \`0x$\{string\}\` + +Unique identifier for the block. + +###### nonce + +> **nonce**: `blockTag` *extends* `"pending"` ? `null` : \`0x$\{string\}\` + +Proof-of-work hash or `null` if pending + +###### number + +> **number**: `blockTag` *extends* `"pending"` ? `null` : `bigint` + +Block number or `null` if pending + +###### parentHash + +> **parentHash**: \`0x$\{string\}\` + +Parent block hash + +###### receiptsRoot + +> **receiptsRoot**: \`0x$\{string\}\` + +Root of the this block’s receipts trie + +###### sealFields + +> **sealFields**: \`0x$\{string\}\`[] + +###### sha3Uncles + +> **sha3Uncles**: \`0x$\{string\}\` + +SHA3 of the uncles data in this block + +###### size + +> **size**: `bigint` + +Size of this block in bytes + +###### stateRoot + +> **stateRoot**: \`0x$\{string\}\` + +Root of this block’s final state trie + +###### timestamp + +> **timestamp**: `bigint` + +Unix timestamp of when this block was collated + +###### totalDifficulty + +> **totalDifficulty**: `null` \| `bigint` + +Total difficulty of the chain until this block + +###### transactions + +> **transactions**: `includeTransactions` *extends* `true` ? (`object` \| `object` \| `object` \| `object` \| `object`)[] : \`0x$\{string\}\`[] + +###### transactionsRoot + +> **transactionsRoot**: \`0x$\{string\}\` + +Root of this block’s transaction trie + +###### uncles + +> **uncles**: \`0x$\{string\}\`[] + +List of uncle hashes + +###### withdrawals? + +> `optional` **withdrawals**: `Withdrawal`[] + +List of withdrawal objects + +###### withdrawalsRoot? + +> `optional` **withdrawalsRoot**: \`0x$\{string\}\` + +Root of the this block’s withdrawals trie + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getBlock() +``` + +##### getBlockNumber() + +> **getBlockNumber**: (`args`?) => `Promise`\<`bigint`\> + +Returns the number of the most recent block seen. + +- Docs: https://viem.sh/docs/actions/public/getBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/fetching-blocks +- JSON-RPC Methods: [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) + +###### Parameters + +• **args?**: `GetBlockNumberParameters` + +GetBlockNumberParameters + +###### Returns + +`Promise`\<`bigint`\> + +The number of the block. GetBlockNumberReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const blockNumber = await client.getBlockNumber() +// 69420n +``` + +##### getBlockTransactionCount() + +> **getBlockTransactionCount**: (`args`?) => `Promise`\<`number`\> + +Returns the number of Transactions at a block number, hash, or tag. + +- Docs: https://viem.sh/docs/actions/public/getBlockTransactionCount +- JSON-RPC Methods: + - Calls [`eth_getBlockTransactionCountByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbynumber) for `blockNumber` & `blockTag`. + - Calls [`eth_getBlockTransactionCountByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblocktransactioncountbyhash) for `blockHash`. + +###### Parameters + +• **args?**: `GetBlockTransactionCountParameters` + +GetBlockTransactionCountParameters + +###### Returns + +`Promise`\<`number`\> + +The block transaction count. GetBlockTransactionCountReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const count = await client.getBlockTransactionCount() +``` + +##### ~~getBytecode()~~ + +> **getBytecode**: (`args`) => `Promise`\<`GetCodeReturnType`\> + +###### Parameters + +• **args**: `GetCodeParameters` + +###### Returns + +`Promise`\<`GetCodeReturnType`\> + +###### Deprecated + +Use `getCode` instead. + +##### getChainId() + +> **getChainId**: () => `Promise`\<`number`\> + +Returns the chain ID associated with the current network. + +- Docs: https://viem.sh/docs/actions/public/getChainId +- JSON-RPC Methods: [`eth_chainId`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_chainid) + +###### Returns + +`Promise`\<`number`\> + +The current chain ID. GetChainIdReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const chainId = await client.getChainId() +// 1 +``` + +##### getCode() + +> **getCode**: (`args`) => `Promise`\<`GetCodeReturnType`\> + +Retrieves the bytecode at an address. + +- Docs: https://viem.sh/docs/contract/getCode +- JSON-RPC Methods: [`eth_getCode`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getcode) + +###### Parameters + +• **args**: `GetCodeParameters` + +GetBytecodeParameters + +###### Returns + +`Promise`\<`GetCodeReturnType`\> + +The contract's bytecode. GetBytecodeReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getCode({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', +}) +``` + +##### getContractEvents() + +> **getContractEvents**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs emitted by a contract. + +- Docs: https://viem.sh/docs/actions/public/getContractEvents +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **eventName** *extends* `undefined` \| `string` = `undefined` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +###### Parameters + +• **args**: `GetContractEventsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> + +###### Returns + +`Promise`\<`GetContractEventsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. GetContractEventsReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { wagmiAbi } from './abi' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getContractEvents(client, { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: wagmiAbi, + eventName: 'Transfer' +}) +``` + +##### getEip712Domain() + +> **getEip712Domain**: (`args`) => `Promise`\<`GetEip712DomainReturnType`\> + +Reads the EIP-712 domain from a contract, based on the ERC-5267 specification. + +###### Parameters + +• **args**: `GetEip712DomainParameters` + +###### Returns + +`Promise`\<`GetEip712DomainReturnType`\> + +The EIP-712 domain, fields, and extensions. GetEip712DomainReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) + +const domain = await client.getEip712Domain({ + address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +}) +// { +// domain: { +// name: 'ExampleContract', +// version: '1', +// chainId: 1, +// verifyingContract: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', +// }, +// fields: '0x0f', +// extensions: [], +// } +``` + +##### getEnsAddress() + +> **getEnsAddress**: (`args`) => `Promise`\<`GetEnsAddressReturnType`\> + +Gets address for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAddress +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +• **args** + +GetEnsAddressParameters + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.coinType?**: `number` + +ENSIP-9 compliant coinType used to resolve addresses for other chains + +• **args.gatewayUrls?**: `string`[] + +Universal Resolver gateway URLs to use for resolving CCIP-read requests. + +• **args.name**: `string` + +Name to get the address for. + +• **args.strict?**: `boolean` + +Whether or not to throw errors propagated from the ENS Universal Resolver Contract. + +• **args.universalResolverAddress?**: \`0x$\{string\}\` + +Address of ENS Universal Resolver Contract. + +###### Returns + +`Promise`\<`GetEnsAddressReturnType`\> + +Address for ENS name or `null` if not found. GetEnsAddressReturnType + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAddress = await client.getEnsAddress({ + name: normalize('wevm.eth'), +}) +// '0xd2135CfB216b74109775236E36d4b433F1DF507B' +``` + +##### getEnsAvatar() + +> **getEnsAvatar**: (`args`) => `Promise`\<`GetEnsAvatarReturnType`\> + +Gets the avatar of an ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsAvatar +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +• **args** + +GetEnsAvatarParameters + +• **args.assetGatewayUrls?**: `AssetGatewayUrls` + +Gateway urls to resolve IPFS and/or Arweave assets. + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.gatewayUrls?**: `string`[] + +Universal Resolver gateway URLs to use for resolving CCIP-read requests. + +• **args.name**: `string` + +ENS name to get Text for. + +• **args.strict?**: `boolean` + +Whether or not to throw errors propagated from the ENS Universal Resolver Contract. + +• **args.universalResolverAddress?**: \`0x$\{string\}\` + +Address of ENS Universal Resolver Contract. + +###### Returns + +`Promise`\<`GetEnsAvatarReturnType`\> + +Avatar URI or `null` if not found. GetEnsAvatarReturnType + +###### Remarks + +Calls [`getEnsText`](https://viem.sh/docs/ens/actions/getEnsText) with `key` set to `'avatar'`. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensAvatar = await client.getEnsAvatar({ + name: normalize('wevm.eth'), +}) +// 'https://ipfs.io/ipfs/Qma8mnp6xV3J2cRNf3mTth5C8nV11CAnceVinc3y8jSbio' +``` + +##### getEnsName() + +> **getEnsName**: (`args`) => `Promise`\<`GetEnsNameReturnType`\> + +Gets primary name for specified address. + +- Docs: https://viem.sh/docs/ens/actions/getEnsName +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +• **args** + +GetEnsNameParameters + +• **args.address**: \`0x$\{string\}\` + +Address to get ENS name for. + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.gatewayUrls?**: `string`[] + +Universal Resolver gateway URLs to use for resolving CCIP-read requests. + +• **args.strict?**: `boolean` + +Whether or not to throw errors propagated from the ENS Universal Resolver Contract. + +• **args.universalResolverAddress?**: \`0x$\{string\}\` + +Address of ENS Universal Resolver Contract. + +###### Returns + +`Promise`\<`GetEnsNameReturnType`\> + +Name or `null` if not found. GetEnsNameReturnType + +###### Remarks + +Calls `reverse(bytes)` on ENS Universal Resolver Contract to "reverse resolve" the address to the primary ENS name. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const ensName = await client.getEnsName({ + address: '0xd2135CfB216b74109775236E36d4b433F1DF507B', +}) +// 'wevm.eth' +``` + +##### getEnsResolver() + +> **getEnsResolver**: (`args`) => `Promise`\<\`0x$\{string\}\`\> + +Gets resolver for ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +• **args** + +GetEnsResolverParameters + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.name**: `string` + +Name to get the address for. + +• **args.universalResolverAddress?**: \`0x$\{string\}\` + +Address of ENS Universal Resolver Contract. + +###### Returns + +`Promise`\<\`0x$\{string\}\`\> + +Address for ENS resolver. GetEnsResolverReturnType + +###### Remarks + +Calls `findResolver(bytes)` on ENS Universal Resolver Contract to retrieve the resolver of an ENS name. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const resolverAddress = await client.getEnsResolver({ + name: normalize('wevm.eth'), +}) +// '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41' +``` + +##### getEnsText() + +> **getEnsText**: (`args`) => `Promise`\<`GetEnsTextReturnType`\> + +Gets a text record for specified ENS name. + +- Docs: https://viem.sh/docs/ens/actions/getEnsResolver +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/ens + +###### Parameters + +• **args** + +GetEnsTextParameters + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.gatewayUrls?**: `string`[] + +Universal Resolver gateway URLs to use for resolving CCIP-read requests. + +• **args.key**: `string` + +Text record to retrieve. + +• **args.name**: `string` + +ENS name to get Text for. + +• **args.strict?**: `boolean` + +Whether or not to throw errors propagated from the ENS Universal Resolver Contract. + +• **args.universalResolverAddress?**: \`0x$\{string\}\` + +Address of ENS Universal Resolver Contract. + +###### Returns + +`Promise`\<`GetEnsTextReturnType`\> + +Address for ENS resolver. GetEnsTextReturnType + +###### Remarks + +Calls `resolve(bytes, bytes)` on ENS Universal Resolver Contract. + +Since ENS names prohibit certain forbidden characters (e.g. underscore) and have other validation rules, you likely want to [normalize ENS names](https://docs.ens.domains/contract-api-reference/name-processing#normalising-names) with [UTS-46 normalization](https://unicode.org/reports/tr46) before passing them to `getEnsAddress`. You can use the built-in [`normalize`](https://viem.sh/docs/ens/utilities/normalize) function for this. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { normalize } from 'viem/ens' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const twitterRecord = await client.getEnsText({ + name: normalize('wevm.eth'), + key: 'com.twitter', +}) +// 'wevm_dev' +``` + +##### getFeeHistory() + +> **getFeeHistory**: (`args`) => `Promise`\<`GetFeeHistoryReturnType`\> + +Returns a collection of historical gas information. + +- Docs: https://viem.sh/docs/actions/public/getFeeHistory +- JSON-RPC Methods: [`eth_feeHistory`](https://docs.alchemy.com/reference/eth-feehistory) + +###### Parameters + +• **args**: `GetFeeHistoryParameters` + +GetFeeHistoryParameters + +###### Returns + +`Promise`\<`GetFeeHistoryReturnType`\> + +The gas estimate (in wei). GetFeeHistoryReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const feeHistory = await client.getFeeHistory({ + blockCount: 4, + rewardPercentiles: [25, 75], +}) +``` + +##### getFilterChanges() + +> **getFilterChanges**: \<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<`GetFilterChangesReturnType`\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of logs or hashes based on a [Filter](/docs/glossary/terms#filter) since the last time it was called. + +- Docs: https://viem.sh/docs/actions/public/getFilterChanges +- JSON-RPC Methods: [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges) + +###### Type Parameters + +• **filterType** *extends* `FilterType` + +• **abi** *extends* `undefined` \| `Abi` \| readonly `unknown`[] + +• **eventName** *extends* `undefined` \| `string` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +###### Parameters + +• **args**: `GetFilterChangesParameters`\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> + +GetFilterChangesParameters + +###### Returns + +`Promise`\<`GetFilterChangesReturnType`\<`filterType`, `abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Logs or hashes. GetFilterChangesReturnType + +###### Remarks + +A Filter can be created from the following actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createContractEventFilter`](https://viem.sh/docs/contract/createContractEventFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +Depending on the type of filter, the return value will be different: + +- If the filter was created with `createContractEventFilter` or `createEventFilter`, it returns a list of logs. +- If the filter was created with `createPendingTransactionFilter`, it returns a list of transaction hashes. +- If the filter was created with `createBlockFilter`, it returns a list of block hashes. + +###### Examples + +```ts +// Blocks +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createBlockFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +```ts +// Contract Events +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createContractEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + abi: parseAbi(['event Transfer(address indexed, address indexed, uint256)']), + eventName: 'Transfer', +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Raw Events +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterChanges({ filter }) +``` + +```ts +// Transactions +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createPendingTransactionFilter() +const hashes = await client.getFilterChanges({ filter }) +``` + +##### getFilterLogs() + +> **getFilterLogs**: \<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>(`args`) => `Promise`\<`GetFilterLogsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs since the filter was created. + +- Docs: https://viem.sh/docs/actions/public/getFilterLogs +- JSON-RPC Methods: [`eth_getFilterLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterlogs) + +###### Type Parameters + +• **abi** *extends* `undefined` \| `Abi` \| readonly `unknown`[] + +• **eventName** *extends* `undefined` \| `string` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +###### Parameters + +• **args**: `GetFilterLogsParameters`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\> + +GetFilterLogsParameters + +###### Returns + +`Promise`\<`GetFilterLogsReturnType`\<`abi`, `eventName`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. GetFilterLogsReturnType + +###### Remarks + +`getFilterLogs` is only compatible with **event filters**. + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const filter = await client.createEventFilter({ + address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', + event: parseAbiItem('event Transfer(address indexed, address indexed, uint256)'), +}) +const logs = await client.getFilterLogs({ filter }) +``` + +##### getGasPrice() + +> **getGasPrice**: () => `Promise`\<`bigint`\> + +Returns the current price of gas (in wei). + +- Docs: https://viem.sh/docs/actions/public/getGasPrice +- JSON-RPC Methods: [`eth_gasPrice`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gasprice) + +###### Returns + +`Promise`\<`bigint`\> + +The gas price (in wei). GetGasPriceReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const gasPrice = await client.getGasPrice() +``` + +##### getLogs() + +> **getLogs**: \<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>(`args`?) => `Promise`\<`GetLogsReturnType`\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +Returns a list of event logs matching the provided parameters. + +- Docs: https://viem.sh/docs/actions/public/getLogs +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/filters-and-logs/event-logs +- JSON-RPC Methods: [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) + +###### Type Parameters + +• **abiEvent** *extends* `undefined` \| `AbiEvent` = `undefined` + +• **abiEvents** *extends* `undefined` \| readonly `unknown`[] \| readonly `AbiEvent`[] = `abiEvent` *extends* `AbiEvent` ? [`abiEvent`\<`abiEvent`\>] : `undefined` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +• **fromBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +• **toBlock** *extends* `undefined` \| `bigint` \| `BlockTag` = `undefined` + +###### Parameters + +• **args?**: `GetLogsParameters`\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\> + +GetLogsParameters + +###### Returns + +`Promise`\<`GetLogsReturnType`\<`abiEvent`, `abiEvents`, `strict`, `fromBlock`, `toBlock`\>\> + +A list of event logs. GetLogsReturnType + +###### Example + +```ts +import { createPublicClient, http, parseAbiItem } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const logs = await client.getLogs() +``` + +##### getProof() + +> **getProof**: (`args`) => `Promise`\<`GetProofReturnType`\> + +Returns the account and storage values of the specified account including the Merkle-proof. + +- Docs: https://viem.sh/docs/actions/public/getProof +- JSON-RPC Methods: + - Calls [`eth_getProof`](https://eips.ethereum.org/EIPS/eip-1186) + +###### Parameters + +• **args**: `GetProofParameters` + +###### Returns + +`Promise`\<`GetProofReturnType`\> + +Proof data. GetProofReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const block = await client.getProof({ + address: '0x...', + storageKeys: ['0x...'], +}) +``` + +##### getStorageAt() + +> **getStorageAt**: (`args`) => `Promise`\<`GetStorageAtReturnType`\> + +Returns the value from a storage slot at a given address. + +- Docs: https://viem.sh/docs/contract/getStorageAt +- JSON-RPC Methods: [`eth_getStorageAt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getstorageat) + +###### Parameters + +• **args**: `GetStorageAtParameters` + +GetStorageAtParameters + +###### Returns + +`Promise`\<`GetStorageAtReturnType`\> + +The value of the storage slot. GetStorageAtReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { getStorageAt } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const code = await client.getStorageAt({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + slot: toHex(0), +}) +``` + +##### getTransaction() + +> **getTransaction**: \<`blockTag`\>(`args`) => `Promise`\<`object` \| `object` \| `object` \| `object` \| `object`\> + +Returns information about a [Transaction](https://viem.sh/docs/glossary/terms#transaction) given a hash or block identifier. + +- Docs: https://viem.sh/docs/actions/public/getTransaction +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionByHash`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionByHash) + +###### Type Parameters + +• **blockTag** *extends* `BlockTag` = `"latest"` + +###### Parameters + +• **args**: `GetTransactionParameters`\<`blockTag`\> + +GetTransactionParameters + +###### Returns + +`Promise`\<`object` \| `object` \| `object` \| `object` \| `object`\> + +The transaction information. GetTransactionReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transaction = await client.getTransaction({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionConfirmations() + +> **getTransactionConfirmations**: (`args`) => `Promise`\<`bigint`\> + +Returns the number of blocks passed (confirmations) since the transaction was processed on a block. + +- Docs: https://viem.sh/docs/actions/public/getTransactionConfirmations +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionConfirmations`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionConfirmations) + +###### Parameters + +• **args**: `GetTransactionConfirmationsParameters`\<`Chain`\> + +GetTransactionConfirmationsParameters + +###### Returns + +`Promise`\<`bigint`\> + +The number of blocks passed since the transaction was processed. If confirmations is 0, then the Transaction has not been confirmed & processed yet. GetTransactionConfirmationsReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const confirmations = await client.getTransactionConfirmations({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### getTransactionCount() + +> **getTransactionCount**: (`args`) => `Promise`\<`number`\> + +Returns the number of [Transactions](https://viem.sh/docs/glossary/terms#transaction) an Account has broadcast / sent. + +- Docs: https://viem.sh/docs/actions/public/getTransactionCount +- JSON-RPC Methods: [`eth_getTransactionCount`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactioncount) + +###### Parameters + +• **args**: `GetTransactionCountParameters` + +GetTransactionCountParameters + +###### Returns + +`Promise`\<`number`\> + +The number of transactions an account has sent. GetTransactionCountReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionCount = await client.getTransactionCount({ + address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### getTransactionReceipt() + +> **getTransactionReceipt**: (`args`) => `Promise`\<`TransactionReceipt`\> + +Returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt) given a [Transaction](https://viem.sh/docs/glossary/terms#transaction) hash. + +- Docs: https://viem.sh/docs/actions/public/getTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/fetching-transactions +- JSON-RPC Methods: [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) + +###### Parameters + +• **args**: `GetTransactionReceiptParameters` + +GetTransactionReceiptParameters + +###### Returns + +`Promise`\<`TransactionReceipt`\> + +The transaction receipt. GetTransactionReceiptReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.getTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### key + +> **key**: `string` + +A key for the client. + +##### multicall() + +> **multicall**: \<`contracts`, `allowFailure`\>(`args`) => `Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> + +Similar to [`readContract`](https://viem.sh/docs/contract/readContract), but batches up multiple functions on a contract in a single RPC call via the [`multicall3` contract](https://github.com/mds1/multicall). + +- Docs: https://viem.sh/docs/contract/multicall + +###### Type Parameters + +• **contracts** *extends* readonly `unknown`[] + +• **allowFailure** *extends* `boolean` = `true` + +###### Parameters + +• **args**: `MulticallParameters`\<`contracts`, `allowFailure`\> + +MulticallParameters + +###### Returns + +`Promise`\<`MulticallReturnType`\<`contracts`, `allowFailure`\>\> + +An array of results with accompanying status. MulticallReturnType + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const abi = parseAbi([ + 'function balanceOf(address) view returns (uint256)', + 'function totalSupply() view returns (uint256)', +]) +const result = await client.multicall({ + contracts: [ + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], + }, + { + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi, + functionName: 'totalSupply', + }, + ], +}) +// [{ result: 424122n, status: 'success' }, { result: 1000000n, status: 'success' }] +``` + +##### name + +> **name**: `string` + +A name for the client. + +##### pollingInterval + +> **pollingInterval**: `number` + +Frequency (in ms) for polling enabled actions & events. Defaults to 4_000 milliseconds. + +##### prepareTransactionRequest() + +> **prepareTransactionRequest**: \<`request`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? Object : Pick\))\[K\] \}\> + +Prepares a transaction request for signing. + +- Docs: https://viem.sh/docs/actions/wallet/prepareTransactionRequest + +###### Type Parameters + +• **request** *extends* `Omit`\<`object`, `"from"`\> \| `Omit`\<`object`, `"from"`\> \| `Omit`\<`object`, `"from"`\> \| `Omit`\<`object`, `"from"`\> \| `Omit`\<`object`, `"from"`\> & `object` & `object` + +• **chainOverride** *extends* `undefined` \| `Chain` = `undefined` + +• **accountOverride** *extends* `undefined` \| \`0x$\{string\}\` \| `Account` = `undefined` + +###### Parameters + +• **args**: `PrepareTransactionRequestParameters`\<`Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`, `request`\> + +PrepareTransactionRequestParameters + +###### Returns + +`Promise`\<\{ \[K in string \| number \| symbol\]: (UnionRequiredBy\ & ((...) extends (...) ? (...) : (...)) & ((...) extends (...) ? (...) : (...)), IsNever\<(...)\> extends true ? unknown : ExactPartial\<(...)\>\> & Object, ParameterTypeToParameters\\> & (unknown extends request\["kzg"\] ? Object : Pick\))\[K\] \}\> + +The transaction request. PrepareTransactionRequestReturnType + +###### Examples + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +```ts +// Account Hoisting +import { createWalletClient, http } from 'viem' +import { privateKeyToAccount } from 'viem/accounts' +import { mainnet } from 'viem/chains' + +const client = createWalletClient({ + account: privateKeyToAccount('0x…'), + chain: mainnet, + transport: custom(window.ethereum), +}) +const request = await client.prepareTransactionRequest({ + to: '0x0000000000000000000000000000000000000000', + value: 1n, +}) +``` + +##### readContract() + +> **readContract**: \<`abi`, `functionName`, `args`\>(`args`) => `Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> + +Calls a read-only function on a contract, and returns the response. + +- Docs: https://viem.sh/docs/contract/readContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/reading-contracts + +###### Type Parameters + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **functionName** *extends* `string` + +• **args** *extends* `unknown` + +###### Parameters + +• **args**: `ReadContractParameters`\<`abi`, `functionName`, `args`\> + +ReadContractParameters + +###### Returns + +`Promise`\<`ReadContractReturnType`\<`abi`, `functionName`, `args`\>\> + +The response from the contract. Type is inferred. ReadContractReturnType + +###### Remarks + +A "read-only" function (constant function) on a Solidity contract is denoted by a `view` or `pure` keyword. They can only read the state of the contract, and cannot make any changes to it. Since read-only methods do not change the state of the contract, they do not require any gas to be executed, and can be called by any user without the need to pay for gas. + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' +import { readContract } from 'viem/contract' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.readContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function balanceOf(address) view returns (uint256)']), + functionName: 'balanceOf', + args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'], +}) +// 424122n +``` + +##### request + +> **request**: `EIP1193RequestFn`\<`PublicRpcSchema`\> + +Request function wrapped with friendly error handling + +##### sendRawTransaction() + +> **sendRawTransaction**: (`args`) => `Promise`\<\`0x$\{string\}\`\> + +Sends a **signed** transaction to the network + +- Docs: https://viem.sh/docs/actions/wallet/sendRawTransaction +- JSON-RPC Method: [`eth_sendRawTransaction`](https://ethereum.github.io/execution-apis/api-documentation/) + +###### Parameters + +• **args**: `SendRawTransactionParameters` + +###### Returns + +`Promise`\<\`0x$\{string\}\`\> + +The transaction hash. SendRawTransactionReturnType + +###### Example + +```ts +import { createWalletClient, custom } from 'viem' +import { mainnet } from 'viem/chains' +import { sendRawTransaction } from 'viem/wallet' + +const client = createWalletClient({ + chain: mainnet, + transport: custom(window.ethereum), +}) + +const hash = await client.sendRawTransaction({ + serializedTransaction: '0x02f850018203118080825208808080c080a04012522854168b27e5dc3d5839bab5e6b39e1a0ffd343901ce1622e3d64b48f1a04e00902ae0502c4728cbf12156290df99c3ed7de85b1dbfe20b5c36931733a33' +}) +``` + +##### simulateContract() + +> **simulateContract**: \<`abi`, `functionName`, `args`, `chainOverride`, `accountOverride`\>(`args`) => `Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> + +Simulates/validates a contract interaction. This is useful for retrieving **return data** and **revert reasons** of contract write functions. + +- Docs: https://viem.sh/docs/contract/simulateContract +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/contracts/writing-to-contracts + +###### Type Parameters + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **functionName** *extends* `string` + +• **args** *extends* `unknown` + +• **chainOverride** *extends* `undefined` \| `Chain` + +• **accountOverride** *extends* `undefined` \| \`0x$\{string\}\` \| `Account` = `undefined` + +###### Parameters + +• **args**: `SimulateContractParameters`\<`abi`, `functionName`, `args`, `Chain`, `chainOverride`, `accountOverride`\> + +SimulateContractParameters + +###### Returns + +`Promise`\<`SimulateContractReturnType`\<`abi`, `functionName`, `args`, `Chain`, `undefined` \| `Account`, `chainOverride`, `accountOverride`\>\> + +The simulation result and write request. SimulateContractReturnType + +###### Remarks + +This function does not require gas to execute and _**does not**_ change the state of the blockchain. It is almost identical to [`readContract`](https://viem.sh/docs/contract/readContract), but also supports contract write functions. + +Internally, uses a [Public Client](https://viem.sh/docs/clients/public) to call the [`call` action](https://viem.sh/docs/actions/public/call) with [ABI-encoded `data`](https://viem.sh/docs/contract/encodeFunctionData). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const result = await client.simulateContract({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['function mint(uint32) view returns (uint32)']), + functionName: 'mint', + args: ['69420'], + account: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', +}) +``` + +##### transport + +> **transport**: `TransportConfig`\<`string`, `EIP1193RequestFn`\> & `Record`\<`string`, `any`\> + +The RPC transport + +##### type + +> **type**: `string` + +The type of client. + +##### uid + +> **uid**: `string` + +A unique ID for the client. + +##### uninstallFilter() + +> **uninstallFilter**: (`args`) => `Promise`\<`boolean`\> + +Destroys a Filter that was created from one of the following Actions: + +- [`createBlockFilter`](https://viem.sh/docs/actions/public/createBlockFilter) +- [`createEventFilter`](https://viem.sh/docs/actions/public/createEventFilter) +- [`createPendingTransactionFilter`](https://viem.sh/docs/actions/public/createPendingTransactionFilter) + +- Docs: https://viem.sh/docs/actions/public/uninstallFilter +- JSON-RPC Methods: [`eth_uninstallFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_uninstallFilter) + +###### Parameters + +• **args**: `UninstallFilterParameters` + +UninstallFilterParameters + +###### Returns + +`Promise`\<`boolean`\> + +A boolean indicating if the Filter was successfully uninstalled. UninstallFilterReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' +import { createPendingTransactionFilter, uninstallFilter } from 'viem/public' + +const filter = await client.createPendingTransactionFilter() +const uninstalled = await client.uninstallFilter({ filter }) +// true +``` + +##### verifyMessage() + +> **verifyMessage**: (`args`) => `Promise`\<`boolean`\> + +Verify that a message was signed by the provided address. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/actions/public/verifyMessage](https://viem.sh/docs/actions/public/verifyMessage) + +###### Parameters + +• **args** + +• **args.address**: \`0x$\{string\}\` + +The address that signed the original message. + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.factory?**: \`0x$\{string\}\` + +• **args.factoryData?**: \`0x$\{string\}\` + +• **args.message**: `SignableMessage` + +The message to be verified. + +• **args.signature**: \`0x$\{string\}\` \| `Uint8Array` \| `Signature` + +The signature that was generated by signing the message with the address's private key. + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. VerifyMessageReturnType + +##### verifySiweMessage() + +> **verifySiweMessage**: (`args`) => `Promise`\<`boolean`\> + +Verifies [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message was signed. + +Compatible with Smart Contract Accounts & Externally Owned Accounts via [ERC-6492](https://eips.ethereum.org/EIPS/eip-6492). + +- Docs [https://viem.sh/docs/siwe/actions/verifySiweMessage](https://viem.sh/docs/siwe/actions/verifySiweMessage) + +###### Parameters + +• **args** + +• **args.address?**: \`0x$\{string\}\` + +Ethereum address to check against. + +• **args.blockNumber?**: `bigint` + +The balance of the account at a block number. + +• **args.blockTag?**: `BlockTag` + +The balance of the account at a block tag. + +**Default** + +```ts +'latest' +``` + +• **args.domain?**: `string` + +[RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) authority to check against. + +• **args.message**: `string` + +EIP-4361 formatted message. + +• **args.nonce?**: `string` + +Random string to check against. + +• **args.scheme?**: `string` + +[RFC 3986](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) URI scheme to check against. + +• **args.signature**: \`0x$\{string\}\` + +Signature to check against. + +• **args.time?**: `Date` + +Current time to check optional `expirationTime` and `notBefore` fields. + +**Default** + +```ts +new Date() +``` + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. VerifySiweMessageReturnType + +##### verifyTypedData() + +> **verifyTypedData**: (`args`) => `Promise`\<`boolean`\> + +Verify that typed data was signed by the provided address. + +- Docs [https://viem.sh/docs/actions/public/verifyTypedData](https://viem.sh/docs/actions/public/verifyTypedData) + +###### Parameters + +• **args**: `VerifyTypedDataParameters` + +###### Returns + +`Promise`\<`boolean`\> + +Whether or not the signature is valid. VerifyTypedDataReturnType + +##### waitForTransactionReceipt() + +> **waitForTransactionReceipt**: (`args`) => `Promise`\<`TransactionReceipt`\> + +Waits for the [Transaction](https://viem.sh/docs/glossary/terms#transaction) to be included on a [Block](https://viem.sh/docs/glossary/terms#block) (one confirmation), and then returns the [Transaction Receipt](https://viem.sh/docs/glossary/terms#transaction-receipt). If the Transaction reverts, then the action will throw an error. + +- Docs: https://viem.sh/docs/actions/public/waitForTransactionReceipt +- Example: https://stackblitz.com/github/wevm/viem/tree/main/examples/transactions/sending-transactions +- JSON-RPC Methods: + - Polls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt) on each block until it has been processed. + - If a Transaction has been replaced: + - Calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbynumber) and extracts the transactions + - Checks if one of the Transactions is a replacement + - If so, calls [`eth_getTransactionReceipt`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getTransactionReceipt). + +###### Parameters + +• **args**: `WaitForTransactionReceiptParameters`\<`Chain`\> + +WaitForTransactionReceiptParameters + +###### Returns + +`Promise`\<`TransactionReceipt`\> + +The transaction receipt. WaitForTransactionReceiptReturnType + +###### Remarks + +The `waitForTransactionReceipt` action additionally supports Replacement detection (e.g. sped up Transactions). + +Transactions can be replaced when a user modifies their transaction in their wallet (to speed up or cancel). Transactions are replaced when they are sent from the same nonce. + +There are 3 types of Transaction Replacement reasons: + +- `repriced`: The gas price has been modified (e.g. different `maxFeePerGas`) +- `cancelled`: The Transaction has been cancelled (e.g. `value === 0n`) +- `replaced`: The Transaction has been replaced (e.g. different `value` or `data`) + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const transactionReceipt = await client.waitForTransactionReceipt({ + hash: '0x4ca7ee652d57678f26e887c149ab0735f41de37bcad58c9f6d3ed5824f15b74d', +}) +``` + +##### watchBlockNumber() + +> **watchBlockNumber**: (`args`) => `WatchBlockNumberReturnType` + +Watches and returns incoming block numbers. + +- Docs: https://viem.sh/docs/actions/public/watchBlockNumber +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_blockNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_blocknumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Parameters + +• **args**: `WatchBlockNumberParameters` + +WatchBlockNumberParameters + +###### Returns + +`WatchBlockNumberReturnType` + +A function that can be invoked to stop watching for new block numbers. WatchBlockNumberReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlockNumber({ + onBlockNumber: (blockNumber) => console.log(blockNumber), +}) +``` + +##### watchBlocks() + +> **watchBlocks**: \<`includeTransactions`, `blockTag`\>(`args`) => `WatchBlocksReturnType` + +Watches and returns information for incoming blocks. + +- Docs: https://viem.sh/docs/actions/public/watchBlocks +- Examples: https://stackblitz.com/github/wevm/viem/tree/main/examples/blocks/watching-blocks +- JSON-RPC Methods: + - When `poll: true`, calls [`eth_getBlockByNumber`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getBlockByNumber) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newHeads"` event. + +###### Type Parameters + +• **includeTransactions** *extends* `boolean` = `false` + +• **blockTag** *extends* `BlockTag` = `"latest"` + +###### Parameters + +• **args**: `WatchBlocksParameters`\<`Transport`, `Chain`, `includeTransactions`, `blockTag`\> + +WatchBlocksParameters + +###### Returns + +`WatchBlocksReturnType` + +A function that can be invoked to stop watching for new block numbers. WatchBlocksReturnType + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchBlocks({ + onBlock: (block) => console.log(block), +}) +``` + +##### watchContractEvent() + +> **watchContractEvent**: \<`abi`, `eventName`, `strict`\>(`args`) => `WatchContractEventReturnType` + +Watches and returns emitted contract event logs. + +- Docs: https://viem.sh/docs/contract/watchContractEvent + +###### Type Parameters + +• **abi** *extends* `Abi` \| readonly `unknown`[] + +• **eventName** *extends* `string` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +###### Parameters + +• **args**: `WatchContractEventParameters`\<`abi`, `eventName`, `strict`, `Transport`\> + +WatchContractEventParameters + +###### Returns + +`WatchContractEventReturnType` + +A function that can be invoked to stop watching for new event logs. WatchContractEventReturnType + +###### Remarks + +This Action will batch up all the event logs found within the [`pollingInterval`](https://viem.sh/docs/contract/watchContractEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/contract/watchContractEvent#onLogs). + +`watchContractEvent` will attempt to create an [Event Filter](https://viem.sh/docs/contract/createContractEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchContractEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +###### Example + +```ts +import { createPublicClient, http, parseAbi } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchContractEvent({ + address: '0xFBA3912Ca04dd458c843e2EE08967fC04f3579c2', + abi: parseAbi(['event Transfer(address indexed from, address indexed to, uint256 value)']), + eventName: 'Transfer', + args: { from: '0xc961145a54C96E3aE9bAA048c4F4D6b04C13916b' }, + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchEvent() + +> **watchEvent**: \<`abiEvent`, `abiEvents`, `strict`\>(`args`) => `WatchEventReturnType` + +Watches and returns emitted [Event Logs](https://viem.sh/docs/glossary/terms#event-log). + +- Docs: https://viem.sh/docs/actions/public/watchEvent +- JSON-RPC Methods: + - **RPC Provider supports `eth_newFilter`:** + - Calls [`eth_newFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newfilter) to create a filter (called on initialize). + - On a polling interval, it will call [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges). + - **RPC Provider does not support `eth_newFilter`:** + - Calls [`eth_getLogs`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs) for each block between the polling interval. + +###### Type Parameters + +• **abiEvent** *extends* `undefined` \| `AbiEvent` = `undefined` + +• **abiEvents** *extends* `undefined` \| readonly `unknown`[] \| readonly `AbiEvent`[] = `abiEvent` *extends* `AbiEvent` ? [`abiEvent`\<`abiEvent`\>] : `undefined` + +• **strict** *extends* `undefined` \| `boolean` = `undefined` + +###### Parameters + +• **args**: `WatchEventParameters`\<`abiEvent`, `abiEvents`, `strict`, `Transport`\> + +WatchEventParameters + +###### Returns + +`WatchEventReturnType` + +A function that can be invoked to stop watching for new Event Logs. WatchEventReturnType + +###### Remarks + +This Action will batch up all the Event Logs found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchEvent#pollinginterval-optional), and invoke them via [`onLogs`](https://viem.sh/docs/actions/public/watchEvent#onLogs). + +`watchEvent` will attempt to create an [Event Filter](https://viem.sh/docs/actions/public/createEventFilter) and listen to changes to the Filter per polling interval, however, if the RPC Provider does not support Filters (e.g. `eth_newFilter`), then `watchEvent` will fall back to using [`getLogs`](https://viem.sh/docs/actions/public/getLogs) instead. + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = client.watchEvent({ + onLogs: (logs) => console.log(logs), +}) +``` + +##### watchPendingTransactions() + +> **watchPendingTransactions**: (`args`) => `WatchPendingTransactionsReturnType` + +Watches and returns pending transaction hashes. + +- Docs: https://viem.sh/docs/actions/public/watchPendingTransactions +- JSON-RPC Methods: + - When `poll: true` + - Calls [`eth_newPendingTransactionFilter`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_newpendingtransactionfilter) to initialize the filter. + - Calls [`eth_getFilterChanges`](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getFilterChanges) on a polling interval. + - When `poll: false` & WebSocket Transport, uses a WebSocket subscription via [`eth_subscribe`](https://docs.alchemy.com/reference/eth-subscribe-polygon) and the `"newPendingTransactions"` event. + +###### Parameters + +• **args**: `WatchPendingTransactionsParameters`\<`Transport`\> + +WatchPendingTransactionsParameters + +###### Returns + +`WatchPendingTransactionsReturnType` + +A function that can be invoked to stop watching for new pending transaction hashes. WatchPendingTransactionsReturnType + +###### Remarks + +This Action will batch up all the pending transactions found within the [`pollingInterval`](https://viem.sh/docs/actions/public/watchPendingTransactions#pollinginterval-optional), and invoke them via [`onTransactions`](https://viem.sh/docs/actions/public/watchPendingTransactions#ontransactions). + +###### Example + +```ts +import { createPublicClient, http } from 'viem' +import { mainnet } from 'viem/chains' + +const client = createPublicClient({ + chain: mainnet, + transport: http(), +}) +const unwatch = await client.watchPendingTransactions({ + onTransactions: (hashes) => console.log(hashes), +}) +``` + +#### Defined in + +[packages/sdk/src/client.ts:217](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L217) + +*** + +### getQuote() + +> **getQuote**(`params`): `Promise`\<[`Quote`](../type-aliases/Quote.md)\> + +Get a quote for a given set of parameters. See [getQuote](../functions/getQuote.md). + +#### Parameters + +• **params**: `Omit`\<[`GetQuoteParams`](../type-aliases/GetQuoteParams.md), `"logger"` \| `"apiUrl"`\> + +See [GetQuoteParams](../type-aliases/GetQuoteParams.md). + +#### Returns + +`Promise`\<[`Quote`](../type-aliases/Quote.md)\> + +See [Quote](../type-aliases/Quote.md). + +#### Defined in + +[packages/sdk/src/client.ts:411](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L411) + +*** + +### getSuggestedFees() + +> **getSuggestedFees**(`params`): `Promise`\<[`GetSuggestedFeesReturnType`](../type-aliases/GetSuggestedFeesReturnType.md)\> + +Get the suggested fees for a given route. See [getSuggestedFees](../functions/getSuggestedFees.md). + +#### Parameters + +• **params**: `Omit`\<[`GetSuggestedFeesParams`](../type-aliases/GetSuggestedFeesParams.md), `"logger"` \| `"apiUrl"`\> + +See [GetSuggestedFeesParams](../type-aliases/GetSuggestedFeesParams.md). + +#### Returns + +`Promise`\<[`GetSuggestedFeesReturnType`](../type-aliases/GetSuggestedFeesReturnType.md)\> + +See [GetSuggestedFeesReturnType](../type-aliases/GetSuggestedFeesReturnType.md). + +#### Defined in + +[packages/sdk/src/client.ts:334](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L334) + +*** + +### getSupportedChains() + +> **getSupportedChains**(`params`): `Promise`\<[`ChainsQueryResponse`](../type-aliases/ChainsQueryResponse.md)\> + +#### Parameters + +• **params**: `Omit`\<[`GetSupportedChainsParams`](../type-aliases/GetSupportedChainsParams.md), `"logger"` \| `"apiUrl"`\> + +#### Returns + +`Promise`\<[`ChainsQueryResponse`](../type-aliases/ChainsQueryResponse.md)\> + +#### Defined in + +[packages/sdk/src/client.ts:535](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L535) + +*** + +### simulateDepositTx() + +> **simulateDepositTx**(`params`): `Promise`\<`SimulateContractReturnType`\> + +#### Parameters + +• **params**: `Omit`\<[`SimulateDepositTxParams`](../type-aliases/SimulateDepositTxParams.md), `"logger"` \| `"publicClient"` \| `"integratorId"`\> + +#### Returns + +`Promise`\<`SimulateContractReturnType`\> + +#### Defined in + +[packages/sdk/src/client.ts:453](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L453) + +*** + +### simulateTxOnTenderly() + +> **simulateTxOnTenderly**(`params`): `Promise`\<`object`\> + +#### Parameters + +• **params**: `Omit`\<[`TenderlySimulateTxParams`](../type-aliases/TenderlySimulateTxParams.md), `"accessKey"` \| `"accountSlug"` \| `"enableShare"` \| `"projectSlug"`\> + +#### Returns + +`Promise`\<`object`\> + +##### simulationId + +> **simulationId**: `string` + +##### simulationUrl + +> **simulationUrl**: `string` = `url` + +#### Defined in + +[packages/sdk/src/client.ts:545](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L545) + +*** + +### update() + +> **update**(`params`): `void` + +#### Parameters + +• **params**: `Pick`\<[`AcrossClientOptions`](../type-aliases/AcrossClientOptions.md), `"walletClient"`\> + +#### Returns + +`void` + +#### Defined in + +[packages/sdk/src/client.ts:210](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L210) + +*** + +### waitForDepositTx() + +> **waitForDepositTx**(`__namedParameters`): `Promise`\<[`DepositStatus`](../type-aliases/DepositStatus.md)\> + +#### Parameters + +• **\_\_namedParameters**: `Omit`\<[`WaitForDepositTxParams`](../type-aliases/WaitForDepositTxParams.md), `"publicClient"`\> & `object` + +#### Returns + +`Promise`\<[`DepositStatus`](../type-aliases/DepositStatus.md)\> + +#### Defined in + +[packages/sdk/src/client.ts:497](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L497) + +*** + +### waitForFillTx() + +> **waitForFillTx**(`params`): `Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +#### Parameters + +• **params**: `Omit`\<[`WaitForFillTxParams`](../type-aliases/WaitForFillTxParams.md), `"destinationPublicClient"`\> + +#### Returns + +`Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +#### Defined in + +[packages/sdk/src/client.ts:522](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L522) + +*** + +### create() + +> `static` **create**(`options`): [`AcrossClient`](AcrossClient.md) + +Create a new `AcrossClient` instance as a singleton. + +#### Parameters + +• **options**: [`AcrossClientOptions`](../type-aliases/AcrossClientOptions.md) + +See [AcrossClientOptions](../type-aliases/AcrossClientOptions.md). + +#### Returns + +[`AcrossClient`](AcrossClient.md) + +A new `AcrossClient` instance if it doesn't exist, otherwise the existing +instance. + +#### Defined in + +[packages/sdk/src/client.ts:189](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L189) + +*** + +### getInstance() + +> `static` **getInstance**(): [`AcrossClient`](AcrossClient.md) + +Get the existing `AcrossClient` singleton instance. + +#### Returns + +[`AcrossClient`](AcrossClient.md) + +The existing `AcrossClient` instance. + +#### Throws + +If the instance is not initialized. + +#### Defined in + +[packages/sdk/src/client.ts:201](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L201) diff --git a/packages/sdk/docs/classes/ConfigError.md b/packages/sdk/docs/classes/ConfigError.md new file mode 100644 index 0000000..bedbaee --- /dev/null +++ b/packages/sdk/docs/classes/ConfigError.md @@ -0,0 +1,155 @@ +[@across-protocol/integrator-sdk](../globals.md) / ConfigError + +# Class: ConfigError + +## Extends + +- `Error` + +## Constructors + +### new ConfigError() + +> **new ConfigError**(`message`?): [`ConfigError`](ConfigError.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`ConfigError`](ConfigError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:116](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L116) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/DefaultLogger.md b/packages/sdk/docs/classes/DefaultLogger.md new file mode 100644 index 0000000..960f844 --- /dev/null +++ b/packages/sdk/docs/classes/DefaultLogger.md @@ -0,0 +1,191 @@ +[@across-protocol/integrator-sdk](../globals.md) / DefaultLogger + +# Class: DefaultLogger + +## Implements + +- [`LoggerT`](../type-aliases/LoggerT.md) + +## Constructors + +### new DefaultLogger() + +> **new DefaultLogger**(`logLevel`): [`DefaultLogger`](DefaultLogger.md) + +#### Parameters + +• **logLevel**: `"DEBUG"` \| `"INFO"` \| `"WARN"` \| `"ERROR"` + +#### Returns + +[`DefaultLogger`](DefaultLogger.md) + +#### Defined in + +[packages/sdk/src/utils/logger.ts:16](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L16) + +## Properties + +### logLevel + +> **logLevel**: `"DEBUG"` \| `"INFO"` \| `"WARN"` \| `"ERROR"` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:12](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L12) + +*** + +### logPrefix + +> `readonly` **logPrefix**: `">"` = `">"` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:14](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L14) + +*** + +### secondaryLabel + +> `readonly` **secondaryLabel**: `"@across-protocol/integrator-sdk"` = `"@across-protocol/integrator-sdk"` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:13](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L13) + +## Methods + +### createLogLevelLabel() + +> **createLogLevelLabel**(`logLevel`): `object` + +#### Parameters + +• **logLevel**: `"DEBUG"` \| `"INFO"` \| `"WARN"` \| `"ERROR"` + +#### Returns + +`object` + +##### label + +> **label**: `string` + +##### prefix + +> **prefix**: `string` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:20](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L20) + +*** + +### debug() + +> **debug**(...`data`): `void` + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +#### Implementation of + +`LoggerT.debug` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:42](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L42) + +*** + +### error() + +> **error**(...`data`): `void` + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +#### Implementation of + +`LoggerT.error` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:61](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L61) + +*** + +### info() + +> **info**(...`data`): `void` + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +#### Implementation of + +`LoggerT.info` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:49](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L49) + +*** + +### log() + +> **log**(`logLevel`, ...`data`): `void` + +Description - creates an indentation group for each call to `logger.[logLevel]()` + +#### Parameters + +• **logLevel**: `"DEBUG"` \| `"INFO"` \| `"WARN"` \| `"ERROR"` + +• ...**data**: `any`[] + +#### Returns + +`void` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:33](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L33) + +*** + +### warn() + +> **warn**(...`data`): `void` + +#### Parameters + +• ...**data**: `any`[] + +#### Returns + +`void` + +#### Implementation of + +`LoggerT.warn` + +#### Defined in + +[packages/sdk/src/utils/logger.ts:55](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L55) diff --git a/packages/sdk/docs/classes/DepositRevert.md b/packages/sdk/docs/classes/DepositRevert.md new file mode 100644 index 0000000..072624d --- /dev/null +++ b/packages/sdk/docs/classes/DepositRevert.md @@ -0,0 +1,155 @@ +[@across-protocol/integrator-sdk](../globals.md) / DepositRevert + +# Class: DepositRevert + +## Extends + +- `Error` + +## Constructors + +### new DepositRevert() + +> **new DepositRevert**(`message`?): [`DepositRevert`](DepositRevert.md) + +#### Parameters + +• **message?**: `string` + +#### Returns + +[`DepositRevert`](DepositRevert.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:7](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L7) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/HttpError.md b/packages/sdk/docs/classes/HttpError.md new file mode 100644 index 0000000..3cd18e5 --- /dev/null +++ b/packages/sdk/docs/classes/HttpError.md @@ -0,0 +1,189 @@ +[@across-protocol/integrator-sdk](../globals.md) / HttpError + +# Class: HttpError + +## Extends + +- `Error` + +## Extended by + +- [`AcrossApiError`](AcrossApiError.md) + +## Constructors + +### new HttpError() + +> **new HttpError**(`params`, `opts`?): [`HttpError`](HttpError.md) + +#### Parameters + +• **params** + +• **params.message?**: `string` + +• **params.name?**: `string` + +• **params.status?**: `number` + +• **params.url?**: `string` + +• **opts?**: `ErrorOptions` + +#### Returns + +[`HttpError`](HttpError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:16](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L16) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### status + +> `readonly` **status**: `number` + +#### Defined in + +[packages/sdk/src/errors/index.ts:15](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L15) + +*** + +### url + +> `readonly` **url**: `string` + +#### Defined in + +[packages/sdk/src/errors/index.ts:14](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L14) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/IndexerError.md b/packages/sdk/docs/classes/IndexerError.md new file mode 100644 index 0000000..5ea878c --- /dev/null +++ b/packages/sdk/docs/classes/IndexerError.md @@ -0,0 +1,169 @@ +[@across-protocol/integrator-sdk](../globals.md) / IndexerError + +# Class: IndexerError + +## Extends + +- `Error` + +## Constructors + +### new IndexerError() + +> **new IndexerError**(`url`, `message`?, `error`?): [`IndexerError`](IndexerError.md) + +#### Parameters + +• **url**: `string` + +• **message?**: `string` + +• **error?**: `string` + +#### Returns + +[`IndexerError`](IndexerError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:108](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L108) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### url + +> `readonly` **url**: `string` + +#### Defined in + +[packages/sdk/src/errors/index.ts:107](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L107) + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/NoDepositLogError.md b/packages/sdk/docs/classes/NoDepositLogError.md new file mode 100644 index 0000000..8fd3786 --- /dev/null +++ b/packages/sdk/docs/classes/NoDepositLogError.md @@ -0,0 +1,157 @@ +[@across-protocol/integrator-sdk](../globals.md) / NoDepositLogError + +# Class: NoDepositLogError + +## Extends + +- `Error` + +## Constructors + +### new NoDepositLogError() + +> **new NoDepositLogError**(`txHash`, `chainId`): [`NoDepositLogError`](NoDepositLogError.md) + +#### Parameters + +• **txHash**: \`0x$\{string\}\` + +• **chainId**: `number` + +#### Returns + +[`NoDepositLogError`](NoDepositLogError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:123](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L123) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/NoFillLogError.md b/packages/sdk/docs/classes/NoFillLogError.md new file mode 100644 index 0000000..6207e37 --- /dev/null +++ b/packages/sdk/docs/classes/NoFillLogError.md @@ -0,0 +1,159 @@ +[@across-protocol/integrator-sdk](../globals.md) / NoFillLogError + +# Class: NoFillLogError + +## Extends + +- `Error` + +## Constructors + +### new NoFillLogError() + +> **new NoFillLogError**(`depositId`, `depositTxHash`, `chainId`): [`NoFillLogError`](NoFillLogError.md) + +#### Parameters + +• **depositId**: `number` + +• **depositTxHash**: \`0x$\{string\}\` + +• **chainId**: `number` + +#### Returns + +[`NoFillLogError`](NoFillLogError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:130](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L130) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/classes/SimulationError.md b/packages/sdk/docs/classes/SimulationError.md new file mode 100644 index 0000000..93ee9ee --- /dev/null +++ b/packages/sdk/docs/classes/SimulationError.md @@ -0,0 +1,183 @@ +[@across-protocol/integrator-sdk](../globals.md) / SimulationError + +# Class: SimulationError + +## Extends + +- `Error` + +## Constructors + +### new SimulationError() + +> **new SimulationError**(`params`, `opts`?): [`SimulationError`](SimulationError.md) + +#### Parameters + +• **params** + +• **params.message?**: `string` + +• **params.simulationId?**: `string` + +• **params.simulationUrl?**: `string` + +• **opts?**: `ErrorOptions` + +#### Returns + +[`SimulationError`](SimulationError.md) + +#### Overrides + +`Error.constructor` + +#### Defined in + +[packages/sdk/src/errors/index.ts:91](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L91) + +## Properties + +### cause? + +> `optional` **cause**: `unknown` + +#### Inherited from + +`Error.cause` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24 + +*** + +### message + +> **message**: `string` + +#### Inherited from + +`Error.message` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1076 + +*** + +### name + +> **name**: `string` + +#### Inherited from + +`Error.name` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1075 + +*** + +### simulationId + +> `readonly` **simulationId**: `string` + +#### Defined in + +[packages/sdk/src/errors/index.ts:88](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L88) + +*** + +### simulationUrl + +> `readonly` **simulationUrl**: `string` + +#### Defined in + +[packages/sdk/src/errors/index.ts:89](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/index.ts#L89) + +*** + +### stack? + +> `optional` **stack**: `string` + +#### Inherited from + +`Error.stack` + +#### Defined in + +node\_modules/.pnpm/typescript@5.3.3/node\_modules/typescript/lib/lib.es5.d.ts:1077 + +*** + +### prepareStackTrace()? + +> `static` `optional` **prepareStackTrace**: (`err`, `stackTraces`) => `any` + +Optional override for formatting stack traces + +#### Parameters + +• **err**: `Error` + +• **stackTraces**: `CallSite`[] + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:28 + +*** + +### stackTraceLimit + +> `static` **stackTraceLimit**: `number` + +#### Inherited from + +`Error.stackTraceLimit` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:30 + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt`?): `void` + +Create .stack property on a target object + +#### Parameters + +• **targetObject**: `object` + +• **constructorOpt?**: `Function` + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +#### Defined in + +node\_modules/.pnpm/@types+node@20.16.2/node\_modules/@types/node/globals.d.ts:21 diff --git a/packages/sdk/docs/functions/buildMulticallHandlerMessage.md b/packages/sdk/docs/functions/buildMulticallHandlerMessage.md new file mode 100644 index 0000000..e783f44 --- /dev/null +++ b/packages/sdk/docs/functions/buildMulticallHandlerMessage.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / buildMulticallHandlerMessage + +# Function: buildMulticallHandlerMessage() + +> **buildMulticallHandlerMessage**(`params`): \`0x$\{string\}\` + +## Parameters + +• **params**: [`BuildMessageParams`](../type-aliases/BuildMessageParams.md) + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/multicallHandler.ts:23](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/multicallHandler.ts#L23) diff --git a/packages/sdk/docs/functions/buildSearchParams.md b/packages/sdk/docs/functions/buildSearchParams.md new file mode 100644 index 0000000..810a279 --- /dev/null +++ b/packages/sdk/docs/functions/buildSearchParams.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / buildSearchParams + +# Function: buildSearchParams() + +> **buildSearchParams**\<`T`\>(`params`): `string` + +Builds a URL search string from an object of query parameters. + +## Type Parameters + +• **T** *extends* `Record`\<`string`, `ParamBaseValue` \| `ParamBaseValue`[]\> + +## Parameters + +• **params**: `T` + +An object where keys are query parameter names and values are either a string or an array of strings representing the parameter values. + +## Returns + +`string` + +queryString - A properly formatted query string for use in URLs, (without the leading '?'). + +## Defined in + +[packages/sdk/src/utils/fetch.ts:20](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/fetch.ts#L20) diff --git a/packages/sdk/docs/functions/configurePublicClients.md b/packages/sdk/docs/functions/configurePublicClients.md new file mode 100644 index 0000000..bdfb5b2 --- /dev/null +++ b/packages/sdk/docs/functions/configurePublicClients.md @@ -0,0 +1,21 @@ +[@across-protocol/integrator-sdk](../globals.md) / configurePublicClients + +# Function: configurePublicClients() + +> **configurePublicClients**(`chains`, `pollingInterval`, `rpcUrls`?): [`ConfiguredPublicClientMap`](../type-aliases/ConfiguredPublicClientMap.md) + +## Parameters + +• **chains**: `Chain`[] + +• **pollingInterval**: `number` + +• **rpcUrls?** + +## Returns + +[`ConfiguredPublicClientMap`](../type-aliases/ConfiguredPublicClientMap.md) + +## Defined in + +[packages/sdk/src/utils/configurePublicClients.ts:5](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/configurePublicClients.ts#L5) diff --git a/packages/sdk/docs/functions/createAcrossClient.md b/packages/sdk/docs/functions/createAcrossClient.md new file mode 100644 index 0000000..dbd9828 --- /dev/null +++ b/packages/sdk/docs/functions/createAcrossClient.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / createAcrossClient + +# Function: createAcrossClient() + +> **createAcrossClient**(`options`): [`AcrossClient`](../classes/AcrossClient.md) + +Create a singleton `AcrossClient` instance. + +## Parameters + +• **options**: [`AcrossClientOptions`](../type-aliases/AcrossClientOptions.md) + +See [AcrossClientOptions](../type-aliases/AcrossClientOptions.md). + +## Returns + +[`AcrossClient`](../classes/AcrossClient.md) + +A new `AcrossClient` instance. + +## Defined in + +[packages/sdk/src/client.ts:588](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L588) diff --git a/packages/sdk/docs/functions/executeQuote.md b/packages/sdk/docs/functions/executeQuote.md new file mode 100644 index 0000000..7393c9f --- /dev/null +++ b/packages/sdk/docs/functions/executeQuote.md @@ -0,0 +1,26 @@ +[@across-protocol/integrator-sdk](../globals.md) / executeQuote + +# Function: executeQuote() + +> **executeQuote**(`params`): `Promise`\<`object` \| `object`\> + +Executes a quote by: +1. Approving the SpokePool contract if necessary +2. Depositing the input token on the origin chain +3. Waiting for the deposit to be filled on the destination chain + +## Parameters + +• **params**: [`ExecuteQuoteParams`](../type-aliases/ExecuteQuoteParams.md) + +See [ExecuteQuoteParams](../type-aliases/ExecuteQuoteParams.md). + +## Returns + +`Promise`\<`object` \| `object`\> + +The deposit ID and receipts for the deposit and fill transactions. + +## Defined in + +[packages/sdk/src/actions/executeQuote.ts:167](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/executeQuote.ts#L167) diff --git a/packages/sdk/docs/functions/fetchAcrossApi.md b/packages/sdk/docs/functions/fetchAcrossApi.md new file mode 100644 index 0000000..045e9c5 --- /dev/null +++ b/packages/sdk/docs/functions/fetchAcrossApi.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / fetchAcrossApi + +# Function: fetchAcrossApi() + +> **fetchAcrossApi**\<`ResBody`, `ReqParams`\>(`apiUrl`, `params`, `logger`?): `Promise`\<`ResBody`\> + +## Type Parameters + +• **ResBody** + +• **ReqParams** = `object` + +## Parameters + +• **apiUrl**: `string` + +• **params**: `ReqParams` + +• **logger?**: [`LoggerT`](../type-aliases/LoggerT.md) + +## Returns + +`Promise`\<`ResBody`\> + +## Defined in + +[packages/sdk/src/utils/fetch.ts:91](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/fetch.ts#L91) diff --git a/packages/sdk/docs/functions/fetchIndexerApi.md b/packages/sdk/docs/functions/fetchIndexerApi.md new file mode 100644 index 0000000..2705c91 --- /dev/null +++ b/packages/sdk/docs/functions/fetchIndexerApi.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / fetchIndexerApi + +# Function: fetchIndexerApi() + +> **fetchIndexerApi**\<`ResBody`, `ReqParams`\>(`apiUrl`, `params`, `logger`?): `Promise`\<`ResBody`\> + +## Type Parameters + +• **ResBody** + +• **ReqParams** = `object` + +## Parameters + +• **apiUrl**: `string` + +• **params**: `ReqParams` + +• **logger?**: [`LoggerT`](../type-aliases/LoggerT.md) + +## Returns + +`Promise`\<`ResBody`\> + +## Defined in + +[packages/sdk/src/utils/fetch.ts:126](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/fetch.ts#L126) diff --git a/packages/sdk/docs/functions/getAcrossClient.md b/packages/sdk/docs/functions/getAcrossClient.md new file mode 100644 index 0000000..a0c314d --- /dev/null +++ b/packages/sdk/docs/functions/getAcrossClient.md @@ -0,0 +1,21 @@ +[@across-protocol/integrator-sdk](../globals.md) / getAcrossClient + +# Function: getAcrossClient() + +> **getAcrossClient**(): [`AcrossClient`](../classes/AcrossClient.md) + +Get the existing `AcrossClient` singleton instance. + +## Returns + +[`AcrossClient`](../classes/AcrossClient.md) + +The existing `AcrossClient` instance. + +## Throws + +If the instance is not initialized. + +## Defined in + +[packages/sdk/src/client.ts:578](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L578) diff --git a/packages/sdk/docs/functions/getAvailableRoutes.md b/packages/sdk/docs/functions/getAvailableRoutes.md new file mode 100644 index 0000000..ace9e35 --- /dev/null +++ b/packages/sdk/docs/functions/getAvailableRoutes.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / getAvailableRoutes + +# Function: getAvailableRoutes() + +> **getAvailableRoutes**(`params`): `Promise`\<[`GetAvailableRoutesReturnType`](../type-aliases/GetAvailableRoutesReturnType.md)\> + +Get the available routes for a given set of parameters. + +## Parameters + +• **params**: [`GetAvailableRoutesParams`](../type-aliases/GetAvailableRoutesParams.md) + +See [GetAvailableRoutesParams](../type-aliases/GetAvailableRoutesParams.md). + +## Returns + +`Promise`\<[`GetAvailableRoutesReturnType`](../type-aliases/GetAvailableRoutesReturnType.md)\> + +See [GetAvailableRoutesReturnType](../type-aliases/GetAvailableRoutesReturnType.md). + +## Defined in + +[packages/sdk/src/actions/getAvailableRoutes.ts:44](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getAvailableRoutes.ts#L44) diff --git a/packages/sdk/docs/functions/getCurrentTimeSeconds.md b/packages/sdk/docs/functions/getCurrentTimeSeconds.md new file mode 100644 index 0000000..2c4c69d --- /dev/null +++ b/packages/sdk/docs/functions/getCurrentTimeSeconds.md @@ -0,0 +1,13 @@ +[@across-protocol/integrator-sdk](../globals.md) / getCurrentTimeSeconds + +# Function: getCurrentTimeSeconds() + +> **getCurrentTimeSeconds**(): `number` + +## Returns + +`number` + +## Defined in + +[packages/sdk/src/utils/timestamp.ts:1](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/timestamp.ts#L1) diff --git a/packages/sdk/docs/functions/getDepositLogs.md b/packages/sdk/docs/functions/getDepositLogs.md new file mode 100644 index 0000000..f6bd306 --- /dev/null +++ b/packages/sdk/docs/functions/getDepositLogs.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getDepositLogs + +# Function: getDepositLogs() + +> **getDepositLogs**(`__namedParameters`): `undefined` \| `Log`\<`bigint`, `number`, `false`, `undefined`, `true`, readonly [`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`], `"V3FundsDeposited"`\> + +## Parameters + +• **\_\_namedParameters**: [`GetDepositLogsParams`](../type-aliases/GetDepositLogsParams.md) + +## Returns + +`undefined` \| `Log`\<`bigint`, `number`, `false`, `undefined`, `true`, readonly [`object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`, `object`], `"V3FundsDeposited"`\> + +## Defined in + +[packages/sdk/src/actions/getDepositLogs.ts:10](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getDepositLogs.ts#L10) diff --git a/packages/sdk/docs/functions/getFillByDepositTx.md b/packages/sdk/docs/functions/getFillByDepositTx.md new file mode 100644 index 0000000..58f7ac6 --- /dev/null +++ b/packages/sdk/docs/functions/getFillByDepositTx.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getFillByDepositTx + +# Function: getFillByDepositTx() + +> **getFillByDepositTx**(`params`): `Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +## Parameters + +• **params**: [`GetFillByDepositTxParams`](../type-aliases/GetFillByDepositTxParams.md) + +## Returns + +`Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +## Defined in + +[packages/sdk/src/actions/getFillByDepositTx.ts:24](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getFillByDepositTx.ts#L24) diff --git a/packages/sdk/docs/functions/getIntegratorDataSuffix.md b/packages/sdk/docs/functions/getIntegratorDataSuffix.md new file mode 100644 index 0000000..5bdc807 --- /dev/null +++ b/packages/sdk/docs/functions/getIntegratorDataSuffix.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getIntegratorDataSuffix + +# Function: getIntegratorDataSuffix() + +> **getIntegratorDataSuffix**(`integratorId`): \`0x$\{string\}\` + +## Parameters + +• **integratorId**: `string` + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/hex.ts:9](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/hex.ts#L9) diff --git a/packages/sdk/docs/functions/getLimits.md b/packages/sdk/docs/functions/getLimits.md new file mode 100644 index 0000000..ad585fc --- /dev/null +++ b/packages/sdk/docs/functions/getLimits.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / getLimits + +# Function: getLimits() + +> **getLimits**(`params`): `Promise`\<[`GetLimitsReturnType`](../type-aliases/GetLimitsReturnType.md)\> + +Returns the deposit limits for a given route. + +## Parameters + +• **params**: [`GetLimitsParams`](../type-aliases/GetLimitsParams.md) + +See [GetLimitsParams](../type-aliases/GetLimitsParams.md). + +## Returns + +`Promise`\<[`GetLimitsReturnType`](../type-aliases/GetLimitsReturnType.md)\> + +See [GetLimitsReturnType](../type-aliases/GetLimitsReturnType.md). + +## Defined in + +[packages/sdk/src/actions/getLimits.ts:69](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getLimits.ts#L69) diff --git a/packages/sdk/docs/functions/getMultiCallHandlerAddress.md b/packages/sdk/docs/functions/getMultiCallHandlerAddress.md new file mode 100644 index 0000000..7316a47 --- /dev/null +++ b/packages/sdk/docs/functions/getMultiCallHandlerAddress.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getMultiCallHandlerAddress + +# Function: getMultiCallHandlerAddress() + +> **getMultiCallHandlerAddress**(`chainId`): `"0x924a9f036260DdD5808007E1AA95f08eD08aA569"` \| `"0x863859ef502F0Ee9676626ED5B418037252eFeb2"` \| `"0x1015c58894961F4F7Dd7D68ba033e28Ed3ee1cDB"` + +## Parameters + +• **chainId**: `number` + +## Returns + +`"0x924a9f036260DdD5808007E1AA95f08eD08aA569"` \| `"0x863859ef502F0Ee9676626ED5B418037252eFeb2"` \| `"0x1015c58894961F4F7Dd7D68ba033e28Ed3ee1cDB"` + +## Defined in + +[packages/sdk/src/utils/multicallHandler.ts:10](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/multicallHandler.ts#L10) diff --git a/packages/sdk/docs/functions/getQuote.md b/packages/sdk/docs/functions/getQuote.md new file mode 100644 index 0000000..e264fbd --- /dev/null +++ b/packages/sdk/docs/functions/getQuote.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / getQuote + +# Function: getQuote() + +> **getQuote**(`params`): `Promise`\<[`Quote`](../type-aliases/Quote.md)\> + +Get a quote for a given set of parameters. + +## Parameters + +• **params**: [`GetQuoteParams`](../type-aliases/GetQuoteParams.md) + +See [GetQuoteParams](../type-aliases/GetQuoteParams.md). + +## Returns + +`Promise`\<[`Quote`](../type-aliases/Quote.md)\> + +See [Quote](../type-aliases/Quote.md). + +## Defined in + +[packages/sdk/src/actions/getQuote.ts:119](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getQuote.ts#L119) diff --git a/packages/sdk/docs/functions/getSuggestedFees.md b/packages/sdk/docs/functions/getSuggestedFees.md new file mode 100644 index 0000000..526499e --- /dev/null +++ b/packages/sdk/docs/functions/getSuggestedFees.md @@ -0,0 +1,123 @@ +[@across-protocol/integrator-sdk](../globals.md) / getSuggestedFees + +# Function: getSuggestedFees() + +> **getSuggestedFees**(`params`): `Promise`\<`object`\> + +Returns the suggested fees for a given deposit route. + +## Parameters + +• **params**: [`GetSuggestedFeesParams`](../type-aliases/GetSuggestedFeesParams.md) + +See [GetSuggestedFeesParams](../type-aliases/GetSuggestedFeesParams.md). + +## Returns + +`Promise`\<`object`\> + +See [GetSuggestedFeesReturnType](../type-aliases/GetSuggestedFeesReturnType.md). + +### destinationSpokePoolAddress + +> **destinationSpokePoolAddress**: \`0x$\{string\}\` + +### estimatedFillTimeSec + +> **estimatedFillTimeSec**: `number` = `data.estimatedFillTimeSec` + +### exclusiveRelayer + +> **exclusiveRelayer**: \`0x$\{string\}\` + +### exclusivityDeadline + +> **exclusivityDeadline**: `number` = `data.exclusivityDeadline` + +### isAmountTooLow + +> **isAmountTooLow**: `boolean` = `data.isAmountTooLow` + +### limits + +> **limits**: `object` + +### limits.maxDeposit + +> **maxDeposit**: `bigint` + +### limits.maxDepositInstant + +> **maxDepositInstant**: `bigint` + +### limits.minDeposit + +> **minDeposit**: `bigint` + +### lpFee + +> **lpFee**: `object` + +### lpFee.pct + +> **pct**: `bigint` + +### lpFee.total + +> **total**: `bigint` + +### outputAmount + +> **outputAmount**: `bigint` + +### quoteBlock + +> **quoteBlock**: `number` + +### relayerCapitalFee + +> **relayerCapitalFee**: `object` + +### relayerCapitalFee.pct + +> **pct**: `bigint` + +### relayerCapitalFee.total + +> **total**: `bigint` + +### relayerGasFee + +> **relayerGasFee**: `object` + +### relayerGasFee.pct + +> **pct**: `bigint` + +### relayerGasFee.total + +> **total**: `bigint` + +### spokePoolAddress + +> **spokePoolAddress**: \`0x$\{string\}\` + +### timestamp + +> **timestamp**: `number` + +### totalRelayFee + +> **totalRelayFee**: `object` + +### totalRelayFee.pct + +> **pct**: `bigint` + +### totalRelayFee.total + +> **total**: `bigint` + +## Defined in + +[packages/sdk/src/actions/getSuggestedFees.ts:146](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getSuggestedFees.ts#L146) diff --git a/packages/sdk/docs/functions/getSupportedChains.md b/packages/sdk/docs/functions/getSupportedChains.md new file mode 100644 index 0000000..0e72d39 --- /dev/null +++ b/packages/sdk/docs/functions/getSupportedChains.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / getSupportedChains + +# Function: getSupportedChains() + +> **getSupportedChains**(`__namedParameters`): `Promise`\<[`ChainsQueryResponse`](../type-aliases/ChainsQueryResponse.md)\> + +## Parameters + +• **\_\_namedParameters**: [`GetSupportedChainsParams`](../type-aliases/GetSupportedChainsParams.md) + +## Returns + +`Promise`\<[`ChainsQueryResponse`](../type-aliases/ChainsQueryResponse.md)\> + +## Defined in + +[packages/sdk/src/utils/getSupportedChains.ts:17](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/getSupportedChains.ts#L17) diff --git a/packages/sdk/docs/functions/isOk.md b/packages/sdk/docs/functions/isOk.md new file mode 100644 index 0000000..b93ef94 --- /dev/null +++ b/packages/sdk/docs/functions/isOk.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / isOk + +# Function: isOk() + +> **isOk**(`res`): `boolean` + +## Parameters + +• **res**: `Response` + +## Returns + +`boolean` + +## Defined in + +[packages/sdk/src/utils/fetch.ts:35](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/fetch.ts#L35) diff --git a/packages/sdk/docs/functions/simulateApproveTx.md b/packages/sdk/docs/functions/simulateApproveTx.md new file mode 100644 index 0000000..ad0ebd4 --- /dev/null +++ b/packages/sdk/docs/functions/simulateApproveTx.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / simulateApproveTx + +# Function: simulateApproveTx() + +> **simulateApproveTx**(`params`): `Promise`\<`SimulateContractReturnType`\> + +## Parameters + +• **params**: [`SimulateApproveTxParams`](../type-aliases/SimulateApproveTxParams.md) + +## Returns + +`Promise`\<`SimulateContractReturnType`\> + +## Defined in + +[packages/sdk/src/actions/simulateApproveTx.ts:17](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/simulateApproveTx.ts#L17) diff --git a/packages/sdk/docs/functions/simulateDepositTx.md b/packages/sdk/docs/functions/simulateDepositTx.md new file mode 100644 index 0000000..ff66013 --- /dev/null +++ b/packages/sdk/docs/functions/simulateDepositTx.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / simulateDepositTx + +# Function: simulateDepositTx() + +> **simulateDepositTx**(`params`): `Promise`\<`SimulateContractReturnType`\> + +## Parameters + +• **params**: [`SimulateDepositTxParams`](../type-aliases/SimulateDepositTxParams.md) + +## Returns + +`Promise`\<`SimulateContractReturnType`\> + +## Defined in + +[packages/sdk/src/actions/simulateDepositTx.ts:25](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/simulateDepositTx.ts#L25) diff --git a/packages/sdk/docs/functions/simulateTxOnTenderly.md b/packages/sdk/docs/functions/simulateTxOnTenderly.md new file mode 100644 index 0000000..e451caa --- /dev/null +++ b/packages/sdk/docs/functions/simulateTxOnTenderly.md @@ -0,0 +1,31 @@ +[@across-protocol/integrator-sdk](../globals.md) / simulateTxOnTenderly + +# Function: simulateTxOnTenderly() + +> **simulateTxOnTenderly**(`params`): `Promise`\<`object`\> + +Simulates a transaction on Tenderly and returns a shareable URL. + +## Parameters + +• **params**: [`TenderlySimulateTxParams`](../type-aliases/TenderlySimulateTxParams.md) + +The parameters for the simulation. + +## Returns + +`Promise`\<`object`\> + +A URL to the simulation result. + +### simulationId + +> **simulationId**: `string` + +### simulationUrl + +> **simulationUrl**: `string` = `url` + +## Defined in + +[packages/sdk/src/utils/tenderly.ts:34](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/tenderly.ts#L34) diff --git a/packages/sdk/docs/functions/tagIntegratorId.md b/packages/sdk/docs/functions/tagIntegratorId.md new file mode 100644 index 0000000..71039e1 --- /dev/null +++ b/packages/sdk/docs/functions/tagIntegratorId.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / tagIntegratorId + +# Function: tagIntegratorId() + +> **tagIntegratorId**(`integratorId`, `txData`): \`0x$\{string\}\` + +## Parameters + +• **integratorId**: `string` + +• **txData**: \`0x$\{string\}\` + +## Returns + +\`0x$\{string\}\` + +## Defined in + +[packages/sdk/src/utils/hex.ts:5](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/hex.ts#L5) diff --git a/packages/sdk/docs/functions/waitForDepositTx.md b/packages/sdk/docs/functions/waitForDepositTx.md new file mode 100644 index 0000000..dd6d5e4 --- /dev/null +++ b/packages/sdk/docs/functions/waitForDepositTx.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / waitForDepositTx + +# Function: waitForDepositTx() + +> **waitForDepositTx**(`params`): `Promise`\<[`DepositStatus`](../type-aliases/DepositStatus.md)\> + +## Parameters + +• **params**: [`WaitForDepositTxParams`](../type-aliases/WaitForDepositTxParams.md) + +## Returns + +`Promise`\<[`DepositStatus`](../type-aliases/DepositStatus.md)\> + +## Defined in + +[packages/sdk/src/actions/waitForDepositTx.ts:11](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/waitForDepositTx.ts#L11) diff --git a/packages/sdk/docs/functions/waitForFillTx.md b/packages/sdk/docs/functions/waitForFillTx.md new file mode 100644 index 0000000..51cde36 --- /dev/null +++ b/packages/sdk/docs/functions/waitForFillTx.md @@ -0,0 +1,17 @@ +[@across-protocol/integrator-sdk](../globals.md) / waitForFillTx + +# Function: waitForFillTx() + +> **waitForFillTx**(`params`): `Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +## Parameters + +• **params**: [`WaitForFillTxParams`](../type-aliases/WaitForFillTxParams.md) + +## Returns + +`Promise`\<[`FillStatus`](../type-aliases/FillStatus.md)\> + +## Defined in + +[packages/sdk/src/actions/waitForFillTx.ts:13](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/waitForFillTx.ts#L13) diff --git a/packages/sdk/docs/globals.md b/packages/sdk/docs/globals.md new file mode 100644 index 0000000..76ba077 --- /dev/null +++ b/packages/sdk/docs/globals.md @@ -0,0 +1,93 @@ +# @across-protocol/integrator-sdk + +## Classes + +- [AcrossApiError](classes/AcrossApiError.md) +- [AcrossApiSimulationError](classes/AcrossApiSimulationError.md) +- [AcrossClient](classes/AcrossClient.md) +- [ConfigError](classes/ConfigError.md) +- [DefaultLogger](classes/DefaultLogger.md) +- [DepositRevert](classes/DepositRevert.md) +- [HttpError](classes/HttpError.md) +- [IndexerError](classes/IndexerError.md) +- [NoDepositLogError](classes/NoDepositLogError.md) +- [NoFillLogError](classes/NoFillLogError.md) +- [SimulationError](classes/SimulationError.md) + +## Type Aliases + +- [AcrossChain](type-aliases/AcrossChain.md) +- [AcrossClientOptions](type-aliases/AcrossClientOptions.md) +- [AcrossErrorCodeType](type-aliases/AcrossErrorCodeType.md) +- [Amount](type-aliases/Amount.md) +- [BuildMessageParams](type-aliases/BuildMessageParams.md) +- [ChainsQueryParams](type-aliases/ChainsQueryParams.md) +- [ChainsQueryResponse](type-aliases/ChainsQueryResponse.md) +- [ConfiguredPublicClient](type-aliases/ConfiguredPublicClient.md) +- [ConfiguredPublicClientMap](type-aliases/ConfiguredPublicClientMap.md) +- [ConfiguredWalletClient](type-aliases/ConfiguredWalletClient.md) +- [CrossChainAction](type-aliases/CrossChainAction.md) +- [DepositStatus](type-aliases/DepositStatus.md) +- [ExecuteQuoteParams](type-aliases/ExecuteQuoteParams.md) +- [ExecutionProgress](type-aliases/ExecutionProgress.md) +- [FillStatus](type-aliases/FillStatus.md) +- [GetAvailableRoutesParams](type-aliases/GetAvailableRoutesParams.md) +- [GetAvailableRoutesReturnType](type-aliases/GetAvailableRoutesReturnType.md) +- [GetDepositLogsParams](type-aliases/GetDepositLogsParams.md) +- [GetDepositLogsReturnType](type-aliases/GetDepositLogsReturnType.md) +- [GetFillByDepositTxParams](type-aliases/GetFillByDepositTxParams.md) +- [GetLimitsParams](type-aliases/GetLimitsParams.md) +- [GetLimitsReturnType](type-aliases/GetLimitsReturnType.md) +- [GetQuoteParams](type-aliases/GetQuoteParams.md) +- [GetSuggestedFeesParams](type-aliases/GetSuggestedFeesParams.md) +- [GetSuggestedFeesReturnType](type-aliases/GetSuggestedFeesReturnType.md) +- [GetSupportedChainsParams](type-aliases/GetSupportedChainsParams.md) +- [IndexerStatusResponse](type-aliases/IndexerStatusResponse.md) +- [LoggerT](type-aliases/LoggerT.md) +- [LogLevel](type-aliases/LogLevel.md) +- [Quote](type-aliases/Quote.md) +- [Route](type-aliases/Route.md) +- [RoutesQueryParams](type-aliases/RoutesQueryParams.md) +- [SimulateApproveTxParams](type-aliases/SimulateApproveTxParams.md) +- [SimulateDepositTxParams](type-aliases/SimulateDepositTxParams.md) +- [Status](type-aliases/Status.md) +- [SuggestedFeesQueryParams](type-aliases/SuggestedFeesQueryParams.md) +- [SuggestedFeesResponse](type-aliases/SuggestedFeesResponse.md) +- [TenderlySimulateTxParams](type-aliases/TenderlySimulateTxParams.md) +- [TokenInfo](type-aliases/TokenInfo.md) +- [TransactionProgress](type-aliases/TransactionProgress.md) +- [WaitForDepositTxParams](type-aliases/WaitForDepositTxParams.md) +- [WaitForFillTxParams](type-aliases/WaitForFillTxParams.md) + +## Variables + +- [DOMAIN\_CALLDATA\_DELIMITER](variables/DOMAIN_CALLDATA_DELIMITER.md) +- [LogLevels](variables/LogLevels.md) + +## Functions + +- [buildMulticallHandlerMessage](functions/buildMulticallHandlerMessage.md) +- [buildSearchParams](functions/buildSearchParams.md) +- [configurePublicClients](functions/configurePublicClients.md) +- [createAcrossClient](functions/createAcrossClient.md) +- [executeQuote](functions/executeQuote.md) +- [fetchAcrossApi](functions/fetchAcrossApi.md) +- [fetchIndexerApi](functions/fetchIndexerApi.md) +- [getAcrossClient](functions/getAcrossClient.md) +- [getAvailableRoutes](functions/getAvailableRoutes.md) +- [getCurrentTimeSeconds](functions/getCurrentTimeSeconds.md) +- [getDepositLogs](functions/getDepositLogs.md) +- [getFillByDepositTx](functions/getFillByDepositTx.md) +- [getIntegratorDataSuffix](functions/getIntegratorDataSuffix.md) +- [getLimits](functions/getLimits.md) +- [getMultiCallHandlerAddress](functions/getMultiCallHandlerAddress.md) +- [getQuote](functions/getQuote.md) +- [getSuggestedFees](functions/getSuggestedFees.md) +- [getSupportedChains](functions/getSupportedChains.md) +- [isOk](functions/isOk.md) +- [simulateApproveTx](functions/simulateApproveTx.md) +- [simulateDepositTx](functions/simulateDepositTx.md) +- [simulateTxOnTenderly](functions/simulateTxOnTenderly.md) +- [tagIntegratorId](functions/tagIntegratorId.md) +- [waitForDepositTx](functions/waitForDepositTx.md) +- [waitForFillTx](functions/waitForFillTx.md) diff --git a/packages/sdk/docs/type-aliases/AcrossChain.md b/packages/sdk/docs/type-aliases/AcrossChain.md new file mode 100644 index 0000000..4706e4c --- /dev/null +++ b/packages/sdk/docs/type-aliases/AcrossChain.md @@ -0,0 +1,43 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossChain + +# Type Alias: AcrossChain + +> **AcrossChain**: `object` + +## Type declaration + +### chainId + +> **chainId**: `number` + +### explorerUrl + +> **explorerUrl**: `string` + +### inputTokens + +> **inputTokens**: [`TokenInfo`](TokenInfo.md)[] + +### logoUrl + +> **logoUrl**: `string` + +### name + +> **name**: `string` + +### outputTokens + +> **outputTokens**: [`TokenInfo`](TokenInfo.md)[] + +### publicRpcUrl + +> **publicRpcUrl**: `string` + +### spokePool + +> **spokePool**: `string` + +## Defined in + +[packages/sdk/src/utils/getSupportedChains.ts:30](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/getSupportedChains.ts#L30) diff --git a/packages/sdk/docs/type-aliases/AcrossClientOptions.md b/packages/sdk/docs/type-aliases/AcrossClientOptions.md new file mode 100644 index 0000000..2fe1f83 --- /dev/null +++ b/packages/sdk/docs/type-aliases/AcrossClientOptions.md @@ -0,0 +1,115 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossClientOptions + +# Type Alias: AcrossClientOptions + +> **AcrossClientOptions**: `object` + +Options for [AcrossClient.create](../classes/AcrossClient.md#create) + +## Type declaration + +### chains + +> **chains**: `Chain`[] + +The chains to use for the Across API. Should be imported from `viem/chains`. + +### integratorId + +> **integratorId**: `string` + +An identifier representing the integrator. + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +A custom logger to use for the Across API. Defaults to a console logger. + +### logLevel? + +> `optional` **logLevel**: [`LogLevel`](LogLevel.md) + +The log level to use. Defaults to `"ERROR"`. + +### pollingInterval? + +> `optional` **pollingInterval**: `number` + +The polling interval in milliseconds to use for the Across API. +Defaults to `3_000` milliseconds. + +### rpcUrls? + +> `optional` **rpcUrls**: `object` + +The RPC URLs to use for the Across API. Will fall back to the default public RPC URL +for the chain if not specified. + +#### Index Signature + + \[`chainId`: `number`\]: `string` + +### tenderly? + +> `optional` **tenderly**: `object` + +Tenderly related options. Can be used for additional debugging support on Tenderly. + +#### See + +https://tenderly.co/transaction-simulator + +### tenderly.accessKey + +> **accessKey**: `string` + +The Tenderly API access key. + +#### See + +https://docs.tenderly.co/account/projects/how-to-generate-api-access-token + +### tenderly.accountSlug + +> **accountSlug**: `string` + +The Tenderly account slug. + +#### See + +https://docs.tenderly.co/account/projects/account-project-slug + +### tenderly.projectSlug + +> **projectSlug**: `string` + +The Tenderly project slug. + +#### See + +https://docs.tenderly.co/account/projects/account-project-slug + +### tenderly.simOnError? + +> `optional` **simOnError**: `boolean` + +Whether to automatically simulate transactions on Tenderly when an error occurs. +Defaults to `true` if credentials `tenderly.accessKey`, `tenderly.accountSlug`, +and `tenderly.projectSlug` are provided. + +### useTestnet? + +> `optional` **useTestnet**: `boolean` + +Whether to use the testnet API. Defaults to `false`. + +### walletClient? + +> `optional` **walletClient**: [`ConfiguredWalletClient`](ConfiguredWalletClient.md) + +A wallet client to use for the Across API. + +## Defined in + +[packages/sdk/src/client.ts:65](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/client.ts#L65) diff --git a/packages/sdk/docs/type-aliases/AcrossErrorCodeType.md b/packages/sdk/docs/type-aliases/AcrossErrorCodeType.md new file mode 100644 index 0000000..0852f38 --- /dev/null +++ b/packages/sdk/docs/type-aliases/AcrossErrorCodeType.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / AcrossErrorCodeType + +# Type Alias: AcrossErrorCodeType + +> **AcrossErrorCodeType**: keyof *typeof* `AcrossErrorCode` + +## Defined in + +[packages/sdk/src/errors/acrossApi.ts:1](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/errors/acrossApi.ts#L1) diff --git a/packages/sdk/docs/type-aliases/Amount.md b/packages/sdk/docs/type-aliases/Amount.md new file mode 100644 index 0000000..d260a35 --- /dev/null +++ b/packages/sdk/docs/type-aliases/Amount.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / Amount + +# Type Alias: Amount + +> **Amount**: `string` \| `bigint` + +## Defined in + +[packages/sdk/src/types/index.ts:15](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L15) diff --git a/packages/sdk/docs/type-aliases/BuildMessageParams.md b/packages/sdk/docs/type-aliases/BuildMessageParams.md new file mode 100644 index 0000000..87a23c3 --- /dev/null +++ b/packages/sdk/docs/type-aliases/BuildMessageParams.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / BuildMessageParams + +# Type Alias: BuildMessageParams + +> **BuildMessageParams**: `object` + +## Type declaration + +### actions + +> **actions**: [`CrossChainAction`](CrossChainAction.md)[] + +### fallbackRecipient + +> **fallbackRecipient**: `Address` + +## Defined in + +[packages/sdk/src/utils/multicallHandler.ts:5](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/multicallHandler.ts#L5) diff --git a/packages/sdk/docs/type-aliases/ChainsQueryParams.md b/packages/sdk/docs/type-aliases/ChainsQueryParams.md new file mode 100644 index 0000000..771ce7c --- /dev/null +++ b/packages/sdk/docs/type-aliases/ChainsQueryParams.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / ChainsQueryParams + +# Type Alias: ChainsQueryParams + +> **ChainsQueryParams**: `Partial`\<`object`\> + +## Type declaration + +### chainId + +> **chainId**: `number` + +### inputTokenSymbol + +> **inputTokenSymbol**: `string` + +### omitTokens + +> **omitTokens**: `boolean` + +### outputTokenSymbol + +> **outputTokenSymbol**: `string` + +## Defined in + +[packages/sdk/src/utils/getSupportedChains.ts:5](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/getSupportedChains.ts#L5) diff --git a/packages/sdk/docs/type-aliases/ChainsQueryResponse.md b/packages/sdk/docs/type-aliases/ChainsQueryResponse.md new file mode 100644 index 0000000..3e80808 --- /dev/null +++ b/packages/sdk/docs/type-aliases/ChainsQueryResponse.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / ChainsQueryResponse + +# Type Alias: ChainsQueryResponse + +> **ChainsQueryResponse**: [`AcrossChain`](AcrossChain.md)[] + +## Defined in + +[packages/sdk/src/utils/getSupportedChains.ts:41](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/getSupportedChains.ts#L41) diff --git a/packages/sdk/docs/type-aliases/ConfiguredPublicClient.md b/packages/sdk/docs/type-aliases/ConfiguredPublicClient.md new file mode 100644 index 0000000..eac74ee --- /dev/null +++ b/packages/sdk/docs/type-aliases/ConfiguredPublicClient.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / ConfiguredPublicClient + +# Type Alias: ConfiguredPublicClient + +> **ConfiguredPublicClient**: `PublicClient`\<`Transport`, `Chain`\> + +## Defined in + +[packages/sdk/src/types/index.ts:18](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L18) diff --git a/packages/sdk/docs/type-aliases/ConfiguredPublicClientMap.md b/packages/sdk/docs/type-aliases/ConfiguredPublicClientMap.md new file mode 100644 index 0000000..808c456 --- /dev/null +++ b/packages/sdk/docs/type-aliases/ConfiguredPublicClientMap.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / ConfiguredPublicClientMap + +# Type Alias: ConfiguredPublicClientMap + +> **ConfiguredPublicClientMap**: `Map`\<`number`, [`ConfiguredPublicClient`](ConfiguredPublicClient.md)\> + +## Defined in + +[packages/sdk/src/types/index.ts:20](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L20) diff --git a/packages/sdk/docs/type-aliases/ConfiguredWalletClient.md b/packages/sdk/docs/type-aliases/ConfiguredWalletClient.md new file mode 100644 index 0000000..d3a5fef --- /dev/null +++ b/packages/sdk/docs/type-aliases/ConfiguredWalletClient.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / ConfiguredWalletClient + +# Type Alias: ConfiguredWalletClient + +> **ConfiguredWalletClient**: `WalletClient`\<`Transport`, `Chain`, `Account`\> + +## Defined in + +[packages/sdk/src/types/index.ts:17](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L17) diff --git a/packages/sdk/docs/type-aliases/CrossChainAction.md b/packages/sdk/docs/type-aliases/CrossChainAction.md new file mode 100644 index 0000000..ad2fc26 --- /dev/null +++ b/packages/sdk/docs/type-aliases/CrossChainAction.md @@ -0,0 +1,35 @@ +[@across-protocol/integrator-sdk](../globals.md) / CrossChainAction + +# Type Alias: CrossChainAction + +> **CrossChainAction**: `object` + +## Type declaration + +### callData + +> **callData**: `Hex` + +### target + +> **target**: `Address` + +### updateCallData()? + +> `optional` **updateCallData**: (`outputAmount`) => `Hex` + +#### Parameters + +• **outputAmount**: `bigint` + +#### Returns + +`Hex` + +### value + +> **value**: [`Amount`](Amount.md) + +## Defined in + +[packages/sdk/src/types/index.ts:22](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L22) diff --git a/packages/sdk/docs/type-aliases/DepositStatus.md b/packages/sdk/docs/type-aliases/DepositStatus.md new file mode 100644 index 0000000..5e0f843 --- /dev/null +++ b/packages/sdk/docs/type-aliases/DepositStatus.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / DepositStatus + +# Type Alias: DepositStatus + +> **DepositStatus**: `object` + +## Type declaration + +### depositId + +> **depositId**: `number` + +### depositTxReceipt + +> **depositTxReceipt**: `TransactionReceipt` + +## Defined in + +[packages/sdk/src/actions/waitForDepositTx.ts:34](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/waitForDepositTx.ts#L34) diff --git a/packages/sdk/docs/type-aliases/ExecuteQuoteParams.md b/packages/sdk/docs/type-aliases/ExecuteQuoteParams.md new file mode 100644 index 0000000..d0a473c --- /dev/null +++ b/packages/sdk/docs/type-aliases/ExecuteQuoteParams.md @@ -0,0 +1,87 @@ +[@across-protocol/integrator-sdk](../globals.md) / ExecuteQuoteParams + +# Type Alias: ExecuteQuoteParams + +> **ExecuteQuoteParams**: `object` + +Params for [executeQuote](../functions/executeQuote.md). + +## Type declaration + +### deposit + +> **deposit**: [`Quote`](Quote.md)\[`"deposit"`\] + +The deposit to execute. Should be taken from return value of [getQuote](../functions/getQuote.md). + +### destinationClient + +> **destinationClient**: [`ConfiguredPublicClient`](ConfiguredPublicClient.md) + +The public client for the destination chain. + +### forceOriginChain? + +> `optional` **forceOriginChain**: `boolean` + +Whether to force the origin chain by switching to it if necessary. + +### infiniteApproval? + +> `optional` **infiniteApproval**: `boolean` + +Whether to use an infinite approval for the SpokePool contract. + +### integratorId + +> **integratorId**: `string` + +An identifier for the integrator. + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +The logger to use. + +### onProgress()? + +> `optional` **onProgress**: (`progress`) => `void` + +A handler for the execution progress. See [ExecutionProgress](ExecutionProgress.md) for steps. + +#### Parameters + +• **progress**: [`ExecutionProgress`](ExecutionProgress.md) + +#### Returns + +`void` + +### originClient + +> **originClient**: [`ConfiguredPublicClient`](ConfiguredPublicClient.md) + +The public client for the origin chain. + +### skipAllowanceCheck? + +> `optional` **skipAllowanceCheck**: `boolean` + +Whether to skip the allowance check. + +### throwOnError? + +> `optional` **throwOnError**: `boolean` + +Whether to throw if an error occurs. + +### walletClient + +> **walletClient**: [`ConfiguredWalletClient`](ConfiguredWalletClient.md) + +The wallet client to use for the deposit. + +## Defined in + +[packages/sdk/src/actions/executeQuote.ts:111](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/executeQuote.ts#L111) diff --git a/packages/sdk/docs/type-aliases/ExecutionProgress.md b/packages/sdk/docs/type-aliases/ExecutionProgress.md new file mode 100644 index 0000000..2dc20d9 --- /dev/null +++ b/packages/sdk/docs/type-aliases/ExecutionProgress.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / ExecutionProgress + +# Type Alias: ExecutionProgress + +> **ExecutionProgress**: [`TransactionProgress`](TransactionProgress.md) + +## Defined in + +[packages/sdk/src/actions/executeQuote.ts:16](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/executeQuote.ts#L16) diff --git a/packages/sdk/docs/type-aliases/FillStatus.md b/packages/sdk/docs/type-aliases/FillStatus.md new file mode 100644 index 0000000..cdefa85 --- /dev/null +++ b/packages/sdk/docs/type-aliases/FillStatus.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / FillStatus + +# Type Alias: FillStatus + +> **FillStatus**: `object` + +## Type declaration + +### actionSuccess? + +> `optional` **actionSuccess**: `boolean` + +### fillTxReceipt + +> **fillTxReceipt**: `TransactionReceipt` + +### fillTxTimestamp + +> **fillTxTimestamp**: `bigint` + +## Defined in + +[packages/sdk/src/actions/getFillByDepositTx.ts:137](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getFillByDepositTx.ts#L137) diff --git a/packages/sdk/docs/type-aliases/GetAvailableRoutesParams.md b/packages/sdk/docs/type-aliases/GetAvailableRoutesParams.md new file mode 100644 index 0000000..3a8e632 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetAvailableRoutesParams.md @@ -0,0 +1,11 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetAvailableRoutesParams + +# Type Alias: GetAvailableRoutesParams + +> **GetAvailableRoutesParams**: [`RoutesQueryParams`](RoutesQueryParams.md) & `Partial`\<`object`\> + +Params for [getAvailableRoutes](../functions/getAvailableRoutes.md). + +## Defined in + +[packages/sdk/src/actions/getAvailableRoutes.ts:30](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getAvailableRoutes.ts#L30) diff --git a/packages/sdk/docs/type-aliases/GetAvailableRoutesReturnType.md b/packages/sdk/docs/type-aliases/GetAvailableRoutesReturnType.md new file mode 100644 index 0000000..1e3cac9 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetAvailableRoutesReturnType.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetAvailableRoutesReturnType + +# Type Alias: GetAvailableRoutesReturnType + +> **GetAvailableRoutesReturnType**: [`Route`](Route.md)[] + +## Defined in + +[packages/sdk/src/actions/getAvailableRoutes.ts:36](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getAvailableRoutes.ts#L36) diff --git a/packages/sdk/docs/type-aliases/GetDepositLogsParams.md b/packages/sdk/docs/type-aliases/GetDepositLogsParams.md new file mode 100644 index 0000000..078ff54 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetDepositLogsParams.md @@ -0,0 +1,15 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetDepositLogsParams + +# Type Alias: GetDepositLogsParams + +> **GetDepositLogsParams**: `object` + +## Type declaration + +### receipt + +> **receipt**: `TransactionReceipt` + +## Defined in + +[packages/sdk/src/actions/getDepositLogs.ts:4](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getDepositLogs.ts#L4) diff --git a/packages/sdk/docs/type-aliases/GetDepositLogsReturnType.md b/packages/sdk/docs/type-aliases/GetDepositLogsReturnType.md new file mode 100644 index 0000000..578298b --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetDepositLogsReturnType.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetDepositLogsReturnType + +# Type Alias: GetDepositLogsReturnType + +> **GetDepositLogsReturnType**: `ReturnType`\<*typeof* [`getDepositLogs`](../functions/getDepositLogs.md)\> + +## Defined in + +[packages/sdk/src/actions/getDepositLogs.ts:8](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getDepositLogs.ts#L8) diff --git a/packages/sdk/docs/type-aliases/GetFillByDepositTxParams.md b/packages/sdk/docs/type-aliases/GetFillByDepositTxParams.md new file mode 100644 index 0000000..3f3fce2 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetFillByDepositTxParams.md @@ -0,0 +1,31 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetFillByDepositTxParams + +# Type Alias: GetFillByDepositTxParams + +> **GetFillByDepositTxParams**: `Pick`\<[`Quote`](Quote.md), `"deposit"`\> & `object` + +## Type declaration + +### depositId + +> **depositId**: [`DepositStatus`](DepositStatus.md)\[`"depositId"`\] + +### depositTransactionHash + +> **depositTransactionHash**: `Hash` + +### destinationChainClient + +> **destinationChainClient**: `PublicClient` + +### fromBlock + +> **fromBlock**: `bigint` + +### indexerUrl? + +> `optional` **indexerUrl**: `string` + +## Defined in + +[packages/sdk/src/actions/getFillByDepositTx.ts:16](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getFillByDepositTx.ts#L16) diff --git a/packages/sdk/docs/type-aliases/GetLimitsParams.md b/packages/sdk/docs/type-aliases/GetLimitsParams.md new file mode 100644 index 0000000..afd3a19 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetLimitsParams.md @@ -0,0 +1,25 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetLimitsParams + +# Type Alias: GetLimitsParams + +> **GetLimitsParams**: `LimitsQueryParams` & `object` + +Params for [getLimits](../functions/getLimits.md). + +## Type declaration + +### apiUrl? + +> `optional` **apiUrl**: `string` + +[Optional] The Across API URL to use. Defaults to the mainnet API URL. + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +[Optional] The logger to use. + +## Defined in + +[packages/sdk/src/actions/getLimits.ts:38](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getLimits.ts#L38) diff --git a/packages/sdk/docs/type-aliases/GetLimitsReturnType.md b/packages/sdk/docs/type-aliases/GetLimitsReturnType.md new file mode 100644 index 0000000..32fc849 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetLimitsReturnType.md @@ -0,0 +1,29 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetLimitsReturnType + +# Type Alias: GetLimitsReturnType + +> **GetLimitsReturnType**: `object` + +## Type declaration + +### maxDeposit + +> **maxDeposit**: `bigint` + +The maximum deposit amount for the route. + +### maxDepositInstant + +> **maxDepositInstant**: `bigint` + +The maximum deposit amount for the route that can be executed instantly. + +### minDeposit + +> **minDeposit**: `bigint` + +The minimum deposit amount for the route. + +## Defined in + +[packages/sdk/src/actions/getLimits.ts:49](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getLimits.ts#L49) diff --git a/packages/sdk/docs/type-aliases/GetQuoteParams.md b/packages/sdk/docs/type-aliases/GetQuoteParams.md new file mode 100644 index 0000000..f6e935a --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetQuoteParams.md @@ -0,0 +1,83 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetQuoteParams + +# Type Alias: GetQuoteParams + +> **GetQuoteParams**: `object` + +Params for [getQuote](../functions/getQuote.md). + +## Type declaration + +### apiUrl? + +> `optional` **apiUrl**: `string` + +[Optional] The Across API URL to use. Defaults to the mainnet API URL. + +### crossChainMessage? + +> `optional` **crossChainMessage**: `object` \| `Hex` + +A cross-chain message to be executed on the destination chain. Can either +be a pre-constructed hex string or an object containing the actions to be +executed and the fallback recipient. + +### inputAmount + +> **inputAmount**: [`Amount`](Amount.md) + +The input amount for deposit route. + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +[Optional] The logger to use. + +### recipient? + +> `optional` **recipient**: `Address` + +[Optional] The recipient address. Should in most cases be omitted but is required +when using Across+, i.e. when a cross-chain message is attached to the deposit. +This needs to be the address of the handler contract on the destination chain. + +### route + +> **route**: `object` + +### route.destinationChainId + +> **destinationChainId**: `number` + +The destination chain id for deposit route. + +### route.inputToken + +> **inputToken**: `Address` + +The input token for deposit route. + +### route.isNative? + +> `optional` **isNative**: `boolean` + +Whether the input token is a native token on the origin chain. +Defaults to `false`. Should be set to `true` for ETH only if origin chain is not +Polygon. + +### route.originChainId + +> **originChainId**: `number` + +The origin chain id for deposit route. + +### route.outputToken + +> **outputToken**: `Address` + +The output token for deposit route. + +## Defined in + +[packages/sdk/src/actions/getQuote.ts:13](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getQuote.ts#L13) diff --git a/packages/sdk/docs/type-aliases/GetSuggestedFeesParams.md b/packages/sdk/docs/type-aliases/GetSuggestedFeesParams.md new file mode 100644 index 0000000..febc04c --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetSuggestedFeesParams.md @@ -0,0 +1,25 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetSuggestedFeesParams + +# Type Alias: GetSuggestedFeesParams + +> **GetSuggestedFeesParams**: [`SuggestedFeesQueryParams`](SuggestedFeesQueryParams.md) & `object` + +Params for [getSuggestedFees](../functions/getSuggestedFees.md). + +## Type declaration + +### apiUrl? + +> `optional` **apiUrl**: `string` + +[Optional] The Across API URL to use. Defaults to the mainnet API URL. + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +[Optional] The logger to use. + +## Defined in + +[packages/sdk/src/actions/getSuggestedFees.ts:52](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getSuggestedFees.ts#L52) diff --git a/packages/sdk/docs/type-aliases/GetSuggestedFeesReturnType.md b/packages/sdk/docs/type-aliases/GetSuggestedFeesReturnType.md new file mode 100644 index 0000000..8e7bf43 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetSuggestedFeesReturnType.md @@ -0,0 +1,141 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetSuggestedFeesReturnType + +# Type Alias: GetSuggestedFeesReturnType + +> **GetSuggestedFeesReturnType**: `object` + +## Type declaration + +### destinationSpokePoolAddress + +> **destinationSpokePoolAddress**: `Address` + +The spoke pool address on the destination chain. + +### estimatedFillTimeSec + +> **estimatedFillTimeSec**: `number` + +The estimated fill time in seconds. + +### exclusiveRelayer + +> **exclusiveRelayer**: `string` + +The exclusive relayer address. Will be the zero address if no exclusivity is +determined. + +### exclusivityDeadline + +> **exclusivityDeadline**: `number` + +The exclusivity deadline. Will be 0 if no exclusivity is determined. + +### isAmountTooLow + +> **isAmountTooLow**: `boolean` + +Whether the deposit amount is too low. + +### limits + +> **limits**: `object` + +The deposit limits. + +### limits.maxDeposit + +> **maxDeposit**: `bigint` + +### limits.maxDepositInstant + +> **maxDepositInstant**: `bigint` + +### limits.minDeposit + +> **minDeposit**: `bigint` + +### lpFee + +> **lpFee**: `object` + +The lp fee. + +### lpFee.pct + +> **pct**: `bigint` + +### lpFee.total + +> **total**: `bigint` + +### outputAmount + +> **outputAmount**: `bigint` + +The output amount that will be received after deducting the fees. + +### quoteBlock + +> **quoteBlock**: `number` + +The quote block. + +### relayerCapitalFee + +> **relayerCapitalFee**: `object` + +The relayer capital fee. + +### relayerCapitalFee.pct + +> **pct**: `bigint` + +### relayerCapitalFee.total + +> **total**: `bigint` + +### relayerGasFee + +> **relayerGasFee**: `object` + +The relayer gas fee. + +### relayerGasFee.pct + +> **pct**: `bigint` + +### relayerGasFee.total + +> **total**: `bigint` + +### spokePoolAddress + +> **spokePoolAddress**: `Address` + +The spoke pool address on the origin chain. + +### timestamp + +> **timestamp**: `number` + +The timestamp of the quote. + +### totalRelayFee + +> **totalRelayFee**: `object` + +The total relay fee, i.e. the sum of the relayer capital fee, the relayer gas fee, +and the lp fee. + +### totalRelayFee.pct + +> **pct**: `bigint` + +### totalRelayFee.total + +> **total**: `bigint` + +## Defined in + +[packages/sdk/src/actions/getSuggestedFees.ts:63](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getSuggestedFees.ts#L63) diff --git a/packages/sdk/docs/type-aliases/GetSupportedChainsParams.md b/packages/sdk/docs/type-aliases/GetSupportedChainsParams.md new file mode 100644 index 0000000..c78de68 --- /dev/null +++ b/packages/sdk/docs/type-aliases/GetSupportedChainsParams.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / GetSupportedChainsParams + +# Type Alias: GetSupportedChainsParams + +> **GetSupportedChainsParams**: [`ChainsQueryParams`](ChainsQueryParams.md) & `object` + +## Type declaration + +### apiUrl? + +> `optional` **apiUrl**: `string` + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +## Defined in + +[packages/sdk/src/utils/getSupportedChains.ts:12](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/getSupportedChains.ts#L12) diff --git a/packages/sdk/docs/type-aliases/IndexerStatusResponse.md b/packages/sdk/docs/type-aliases/IndexerStatusResponse.md new file mode 100644 index 0000000..5f0b1fd --- /dev/null +++ b/packages/sdk/docs/type-aliases/IndexerStatusResponse.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / IndexerStatusResponse + +# Type Alias: IndexerStatusResponse + +> **IndexerStatusResponse**: `object` + +## Type declaration + +### error? + +> `optional` **error**: `string` + +### fillTx + +> **fillTx**: `null` \| `Hash` + +### message? + +> `optional` **message**: `string` + +### status + +> **status**: `"pending"` \| `"filled"` + +## Defined in + +[packages/sdk/src/types/index.ts:29](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L29) diff --git a/packages/sdk/docs/type-aliases/LogLevel.md b/packages/sdk/docs/type-aliases/LogLevel.md new file mode 100644 index 0000000..9cae523 --- /dev/null +++ b/packages/sdk/docs/type-aliases/LogLevel.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / LogLevel + +# Type Alias: LogLevel + +> **LogLevel**: keyof *typeof* [`LogLevels`](../variables/LogLevels.md) + +## Defined in + +[packages/sdk/src/utils/logger.ts:9](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L9) diff --git a/packages/sdk/docs/type-aliases/LoggerT.md b/packages/sdk/docs/type-aliases/LoggerT.md new file mode 100644 index 0000000..735a59a --- /dev/null +++ b/packages/sdk/docs/type-aliases/LoggerT.md @@ -0,0 +1,51 @@ +[@across-protocol/integrator-sdk](../globals.md) / LoggerT + +# Type Alias: LoggerT + +> **LoggerT**: `object` + +## Type declaration + +### debug() + +#### Parameters + +• ...**args**: [`any`, `...optionalParams: any[]`] + +#### Returns + +`void` + +### error() + +#### Parameters + +• ...**args**: [`any`, `...optionalParams: any[]`] + +#### Returns + +`void` + +### info() + +#### Parameters + +• ...**args**: [`any`, `...optionalParams: any[]`] + +#### Returns + +`void` + +### warn() + +#### Parameters + +• ...**args**: [`any`, `...optionalParams: any[]`] + +#### Returns + +`void` + +## Defined in + +[packages/sdk/src/utils/logger.ts:115](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L115) diff --git a/packages/sdk/docs/type-aliases/Quote.md b/packages/sdk/docs/type-aliases/Quote.md new file mode 100644 index 0000000..651d8c9 --- /dev/null +++ b/packages/sdk/docs/type-aliases/Quote.md @@ -0,0 +1,147 @@ +[@across-protocol/integrator-sdk](../globals.md) / Quote + +# Type Alias: Quote + +> **Quote**: `object` + +## Type declaration + +### deposit + +> **deposit**: `object` + +### deposit.destinationChainId + +> **destinationChainId**: `number` + +### deposit.destinationSpokePoolAddress + +> **destinationSpokePoolAddress**: `Address` + +### deposit.exclusiveRelayer + +> **exclusiveRelayer**: `Address` + +### deposit.exclusivityDeadline + +> **exclusivityDeadline**: `number` + +### deposit.inputAmount + +> **inputAmount**: `bigint` + +### deposit.inputToken + +> **inputToken**: `Address` + +### deposit.isNative? + +> `optional` **isNative**: `boolean` + +### deposit.message + +> **message**: `Hex` + +### deposit.originChainId + +> **originChainId**: `number` + +### deposit.outputAmount + +> **outputAmount**: `bigint` + +### deposit.outputToken + +> **outputToken**: `Address` + +### deposit.quoteTimestamp + +> **quoteTimestamp**: `number` + +### deposit.recipient + +> **recipient**: `Address` + +### deposit.spokePoolAddress + +> **spokePoolAddress**: `Address` + +### estimatedFillTimeSec + +> **estimatedFillTimeSec**: `number` + +### fees + +> **fees**: `object` + +### fees.lpFee + +> **lpFee**: `object` + +### fees.lpFee.pct + +> **pct**: `bigint` + +### fees.lpFee.total + +> **total**: `bigint` + +### fees.relayerCapitalFee + +> **relayerCapitalFee**: `object` + +### fees.relayerCapitalFee.pct + +> **pct**: `bigint` + +### fees.relayerCapitalFee.total + +> **total**: `bigint` + +### fees.relayerGasFee + +> **relayerGasFee**: `object` + +### fees.relayerGasFee.pct + +> **pct**: `bigint` + +### fees.relayerGasFee.total + +> **total**: `bigint` + +### fees.totalRelayFee + +> **totalRelayFee**: `object` + +### fees.totalRelayFee.pct + +> **pct**: `bigint` + +### fees.totalRelayFee.total + +> **total**: `bigint` + +### isAmountTooLow + +> **isAmountTooLow**: `boolean` + +### limits + +> **limits**: `object` + +### limits.maxDeposit + +> **maxDeposit**: `bigint` + +### limits.maxDepositInstant + +> **maxDepositInstant**: `bigint` + +### limits.minDeposit + +> **minDeposit**: `bigint` + +## Defined in + +[packages/sdk/src/actions/getQuote.ts:69](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getQuote.ts#L69) diff --git a/packages/sdk/docs/type-aliases/Route.md b/packages/sdk/docs/type-aliases/Route.md new file mode 100644 index 0000000..335127a --- /dev/null +++ b/packages/sdk/docs/type-aliases/Route.md @@ -0,0 +1,39 @@ +[@across-protocol/integrator-sdk](../globals.md) / Route + +# Type Alias: Route + +> **Route**: `object` + +## Type declaration + +### destinationChainId + +> **destinationChainId**: `number` + +### inputToken + +> **inputToken**: `Address` + +### inputTokenSymbol + +> **inputTokenSymbol**: `string` + +### isNative + +> **isNative**: `boolean` + +### originChainId + +> **originChainId**: `number` + +### outputToken + +> **outputToken**: `Address` + +### outputTokenSymbol + +> **outputTokenSymbol**: `string` + +## Defined in + +[packages/sdk/src/types/index.ts:36](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L36) diff --git a/packages/sdk/docs/type-aliases/RoutesQueryParams.md b/packages/sdk/docs/type-aliases/RoutesQueryParams.md new file mode 100644 index 0000000..963618b --- /dev/null +++ b/packages/sdk/docs/type-aliases/RoutesQueryParams.md @@ -0,0 +1,37 @@ +[@across-protocol/integrator-sdk](../globals.md) / RoutesQueryParams + +# Type Alias: RoutesQueryParams + +> **RoutesQueryParams**: `Partial`\<`object`\> + +## Type declaration + +### destinationChainId + +> **destinationChainId**: `number` + +The destination chain id. If set only routes with this chain id as destination +are returned. + +### destinationToken + +> **destinationToken**: `Address` + +The destination token address. If set only routes with this token as destination +are returned. + +### originChainId + +> **originChainId**: `number` + +The origin chain id. If set only routes with this chain id as origin are returned. + +### originToken + +> **originToken**: `Address` + +The origin token address. If set only routes with this token as origin are returned. + +## Defined in + +[packages/sdk/src/actions/getAvailableRoutes.ts:6](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getAvailableRoutes.ts#L6) diff --git a/packages/sdk/docs/type-aliases/SimulateApproveTxParams.md b/packages/sdk/docs/type-aliases/SimulateApproveTxParams.md new file mode 100644 index 0000000..5c8040f --- /dev/null +++ b/packages/sdk/docs/type-aliases/SimulateApproveTxParams.md @@ -0,0 +1,31 @@ +[@across-protocol/integrator-sdk](../globals.md) / SimulateApproveTxParams + +# Type Alias: SimulateApproveTxParams + +> **SimulateApproveTxParams**: `object` + +## Type declaration + +### approvalAmount + +> **approvalAmount**: `bigint` + +### publicClient + +> **publicClient**: `PublicClient` + +### spender + +> **spender**: `Address` + +### tokenAddress + +> **tokenAddress**: `Address` + +### walletClient + +> **walletClient**: `WalletClient` + +## Defined in + +[packages/sdk/src/actions/simulateApproveTx.ts:9](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/simulateApproveTx.ts#L9) diff --git a/packages/sdk/docs/type-aliases/SimulateDepositTxParams.md b/packages/sdk/docs/type-aliases/SimulateDepositTxParams.md new file mode 100644 index 0000000..1a2fcc4 --- /dev/null +++ b/packages/sdk/docs/type-aliases/SimulateDepositTxParams.md @@ -0,0 +1,37 @@ +[@across-protocol/integrator-sdk](../globals.md) / SimulateDepositTxParams + +# Type Alias: SimulateDepositTxParams + +> **SimulateDepositTxParams**: `object` + +## Type declaration + +### deposit + +> **deposit**: [`Quote`](Quote.md)\[`"deposit"`\] & `object` + +#### Type declaration + +##### fillDeadline? + +> `optional` **fillDeadline**: `number` + +### integratorId + +> **integratorId**: `string` + +### logger? + +> `optional` **logger**: [`LoggerT`](LoggerT.md) + +### publicClient + +> **publicClient**: `PublicClient` + +### walletClient + +> **walletClient**: `WalletClient` + +## Defined in + +[packages/sdk/src/actions/simulateDepositTx.ts:15](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/simulateDepositTx.ts#L15) diff --git a/packages/sdk/docs/type-aliases/Status.md b/packages/sdk/docs/type-aliases/Status.md new file mode 100644 index 0000000..c1c9c5d --- /dev/null +++ b/packages/sdk/docs/type-aliases/Status.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / Status + +# Type Alias: Status + +> **Status**: keyof *typeof* `STATUS` + +## Defined in + +[packages/sdk/src/types/index.ts:13](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L13) diff --git a/packages/sdk/docs/type-aliases/SuggestedFeesQueryParams.md b/packages/sdk/docs/type-aliases/SuggestedFeesQueryParams.md new file mode 100644 index 0000000..2951eef --- /dev/null +++ b/packages/sdk/docs/type-aliases/SuggestedFeesQueryParams.md @@ -0,0 +1,73 @@ +[@across-protocol/integrator-sdk](../globals.md) / SuggestedFeesQueryParams + +# Type Alias: SuggestedFeesQueryParams + +> **SuggestedFeesQueryParams**: `object` + +## Type declaration + +### amount + +> **amount**: [`Amount`](Amount.md) + +The amount of input tokens to deposit. + +### destinationChainId + +> **destinationChainId**: `number` + +### inputToken + +> **inputToken**: `Address` + +The input token address on origin chain. + +### isNative? + +> `optional` **isNative**: `boolean` + +[Optional] Whether the input token is a native token on the origin chain. +Defaults to `false`. Should be set to `true` for ETH only if origin chain is not +Polygon. + +### message? + +> `optional` **message**: `string` + +[Optional] The cross-chain message of the deposit when using Across+ that should +be executed on the destination chain. Note that `amount` is required when using +Across+. + +### originChainId + +> **originChainId**: `number` + +### outputToken + +> **outputToken**: `Address` + +The output token address on destination chain. + +### recipient? + +> `optional` **recipient**: `Address` + +[Optional] The recipient address. Should in most cases be omitted but is required +when using Across+, i.e. when a cross-chain message is attached to the deposit. +This needs to be the address of the handler contract on the destination chain. + +### relayer? + +> `optional` **relayer**: `Address` + +[Optional] The relayer address to simulate fill with. Defaults to the Across relayer. + +### skipAmountLimit? + +> `optional` **skipAmountLimit**: `boolean` + +[Optional] Whether to skip the amount limit check. Defaults to `false`. + +## Defined in + +[packages/sdk/src/actions/getSuggestedFees.ts:6](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getSuggestedFees.ts#L6) diff --git a/packages/sdk/docs/type-aliases/SuggestedFeesResponse.md b/packages/sdk/docs/type-aliases/SuggestedFeesResponse.md new file mode 100644 index 0000000..c7a3690 --- /dev/null +++ b/packages/sdk/docs/type-aliases/SuggestedFeesResponse.md @@ -0,0 +1,143 @@ +[@across-protocol/integrator-sdk](../globals.md) / SuggestedFeesResponse + +# Type Alias: SuggestedFeesResponse + +> **SuggestedFeesResponse**: `object` + +## Type declaration + +### capitalFeePct + +> **capitalFeePct**: `string` + +### capitalFeeTotal + +> **capitalFeeTotal**: `string` + +### destinationSpokePoolAddress + +> **destinationSpokePoolAddress**: `Address` + +### estimatedFillTimeSec + +> **estimatedFillTimeSec**: `number` + +### exclusiveRelayer + +> **exclusiveRelayer**: `string` + +### exclusivityDeadline + +> **exclusivityDeadline**: `number` + +### isAmountTooLow + +> **isAmountTooLow**: `boolean` + +### limits + +> **limits**: `object` + +### limits.maxDeposit + +> **maxDeposit**: `string` + +### limits.maxDepositInstant + +> **maxDepositInstant**: `string` + +### limits.maxDepositShortDelay + +> **maxDepositShortDelay**: `string` + +### limits.minDeposit + +> **minDeposit**: `string` + +### limits.recommendedDepositInstant + +> **recommendedDepositInstant**: `string` + +### lpFee + +> **lpFee**: `object` + +### lpFee.pct + +> **pct**: `string` + +### lpFee.total + +> **total**: `string` + +### lpFeePct + +> **lpFeePct**: `string` + +### quoteBlock + +> **quoteBlock**: `string` + +### relayerCapitalFee + +> **relayerCapitalFee**: `object` + +### relayerCapitalFee.pct + +> **pct**: `string` + +### relayerCapitalFee.total + +> **total**: `string` + +### relayerGasFee + +> **relayerGasFee**: `object` + +### relayerGasFee.pct + +> **pct**: `string` + +### relayerGasFee.total + +> **total**: `string` + +### relayFeePct + +> **relayFeePct**: `string` + +### relayFeeTotal + +> **relayFeeTotal**: `string` + +### relayGasFeePct + +> **relayGasFeePct**: `string` + +### relayGasFeeTotal + +> **relayGasFeeTotal**: `string` + +### spokePoolAddress + +> **spokePoolAddress**: `Address` + +### timestamp + +> **timestamp**: `string` + +### totalRelayFee + +> **totalRelayFee**: `object` + +### totalRelayFee.pct + +> **pct**: `string` + +### totalRelayFee.total + +> **total**: `string` + +## Defined in + +[packages/sdk/src/actions/getSuggestedFees.ts:194](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/getSuggestedFees.ts#L194) diff --git a/packages/sdk/docs/type-aliases/TenderlySimulateTxParams.md b/packages/sdk/docs/type-aliases/TenderlySimulateTxParams.md new file mode 100644 index 0000000..070b184 --- /dev/null +++ b/packages/sdk/docs/type-aliases/TenderlySimulateTxParams.md @@ -0,0 +1,55 @@ +[@across-protocol/integrator-sdk](../globals.md) / TenderlySimulateTxParams + +# Type Alias: TenderlySimulateTxParams + +> **TenderlySimulateTxParams**: `object` + +## Type declaration + +### accessKey + +> **accessKey**: `string` + +### accountSlug + +> **accountSlug**: `string` + +### blockNumber? + +> `optional` **blockNumber**: `"latest"` \| `number` + +### data + +> **data**: `string` + +### enableShare? + +> `optional` **enableShare**: `boolean` + +### from + +> **from**: `string` + +### gas? + +> `optional` **gas**: `bigint` + +### networkId + +> **networkId**: `string` + +### projectSlug + +> **projectSlug**: `string` + +### to + +> **to**: `string` + +### value + +> **value**: `string` + +## Defined in + +[packages/sdk/src/utils/tenderly.ts:4](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/tenderly.ts#L4) diff --git a/packages/sdk/docs/type-aliases/TokenInfo.md b/packages/sdk/docs/type-aliases/TokenInfo.md new file mode 100644 index 0000000..beb8cf3 --- /dev/null +++ b/packages/sdk/docs/type-aliases/TokenInfo.md @@ -0,0 +1,31 @@ +[@across-protocol/integrator-sdk](../globals.md) / TokenInfo + +# Type Alias: TokenInfo + +> **TokenInfo**: `object` + +## Type declaration + +### address + +> **address**: `Address` + +### decimals + +> **decimals**: `number` + +### logoUrl + +> **logoUrl**: `string` + +### name + +> **name**: `string` + +### symbol + +> **symbol**: `string` + +## Defined in + +[packages/sdk/src/types/index.ts:46](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/types/index.ts#L46) diff --git a/packages/sdk/docs/type-aliases/TransactionProgress.md b/packages/sdk/docs/type-aliases/TransactionProgress.md new file mode 100644 index 0000000..4acd1cd --- /dev/null +++ b/packages/sdk/docs/type-aliases/TransactionProgress.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / TransactionProgress + +# Type Alias: TransactionProgress + +> **TransactionProgress**: `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` \| `object` + +## Defined in + +[packages/sdk/src/actions/executeQuote.ts:34](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/executeQuote.ts#L34) diff --git a/packages/sdk/docs/type-aliases/WaitForDepositTxParams.md b/packages/sdk/docs/type-aliases/WaitForDepositTxParams.md new file mode 100644 index 0000000..6c2d130 --- /dev/null +++ b/packages/sdk/docs/type-aliases/WaitForDepositTxParams.md @@ -0,0 +1,19 @@ +[@across-protocol/integrator-sdk](../globals.md) / WaitForDepositTxParams + +# Type Alias: WaitForDepositTxParams + +> **WaitForDepositTxParams**: `object` + +## Type declaration + +### publicClient + +> **publicClient**: [`ConfiguredPublicClient`](ConfiguredPublicClient.md) + +### transactionHash + +> **transactionHash**: `Hash` + +## Defined in + +[packages/sdk/src/actions/waitForDepositTx.ts:6](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/waitForDepositTx.ts#L6) diff --git a/packages/sdk/docs/type-aliases/WaitForFillTxParams.md b/packages/sdk/docs/type-aliases/WaitForFillTxParams.md new file mode 100644 index 0000000..882e479 --- /dev/null +++ b/packages/sdk/docs/type-aliases/WaitForFillTxParams.md @@ -0,0 +1,23 @@ +[@across-protocol/integrator-sdk](../globals.md) / WaitForFillTxParams + +# Type Alias: WaitForFillTxParams + +> **WaitForFillTxParams**: `Pick`\<[`Quote`](Quote.md), `"deposit"`\> & `object` + +## Type declaration + +### depositId + +> **depositId**: `number` + +### destinationPublicClient + +> **destinationPublicClient**: [`ConfiguredPublicClient`](ConfiguredPublicClient.md) + +### fromBlock + +> **fromBlock**: `bigint` + +## Defined in + +[packages/sdk/src/actions/waitForFillTx.ts:7](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/actions/waitForFillTx.ts#L7) diff --git a/packages/sdk/docs/variables/DOMAIN_CALLDATA_DELIMITER.md b/packages/sdk/docs/variables/DOMAIN_CALLDATA_DELIMITER.md new file mode 100644 index 0000000..7f53407 --- /dev/null +++ b/packages/sdk/docs/variables/DOMAIN_CALLDATA_DELIMITER.md @@ -0,0 +1,9 @@ +[@across-protocol/integrator-sdk](../globals.md) / DOMAIN\_CALLDATA\_DELIMITER + +# Variable: DOMAIN\_CALLDATA\_DELIMITER + +> `const` **DOMAIN\_CALLDATA\_DELIMITER**: `"0x1dc0de"` = `"0x1dc0de"` + +## Defined in + +[packages/sdk/src/utils/hex.ts:3](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/hex.ts#L3) diff --git a/packages/sdk/docs/variables/LogLevels.md b/packages/sdk/docs/variables/LogLevels.md new file mode 100644 index 0000000..3e16afc --- /dev/null +++ b/packages/sdk/docs/variables/LogLevels.md @@ -0,0 +1,27 @@ +[@across-protocol/integrator-sdk](../globals.md) / LogLevels + +# Variable: LogLevels + +> `const` **LogLevels**: `object` + +## Type declaration + +### DEBUG + +> `readonly` **DEBUG**: `3` = `3` + +### ERROR + +> `readonly` **ERROR**: `0` = `0` + +### INFO + +> `readonly` **INFO**: `2` = `2` + +### WARN + +> `readonly` **WARN**: `1` = `1` + +## Defined in + +[packages/sdk/src/utils/logger.ts:2](https://github.com/across-protocol/toolkit/blob/eee89a253938d54aa640eb34f40c2d714b9d031f/packages/sdk/src/utils/logger.ts#L2) diff --git a/packages/sdk/package.json b/packages/sdk/package.json index b4b5ce1..9334dbd 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -38,7 +38,8 @@ "type-check": "tsc", "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm", "test": "vitest run", - "ci": "pnpm run build && pnpm run check-exports pnpm npm run lint && pnpm run test" + "ci": "pnpm run build && pnpm run check-exports pnpm npm run lint && pnpm run test", + "typedoc": "typedoc --out docs src/index.ts" }, "devDependencies": { "@across-toolkit/eslint-config": "workspace:*", @@ -49,6 +50,8 @@ "eslint": "^8.57.0", "prettier": "^3.2.5", "tsup": "^8.0.2", + "typedoc": "^0.26.7", + "typedoc-plugin-markdown": "^4.2.8", "typescript": "^5.3.3", "viem": "^2.20.1", "vitest": "^2.0.5" diff --git a/packages/sdk/src/actions/getDepositLogs.ts b/packages/sdk/src/actions/getDepositLogs.ts index 5b80ec7..d9edf31 100644 --- a/packages/sdk/src/actions/getDepositLogs.ts +++ b/packages/sdk/src/actions/getDepositLogs.ts @@ -5,6 +5,8 @@ export type GetDepositLogsParams = { receipt: TransactionReceipt; }; +export type GetDepositLogsReturnType = ReturnType; + export function getDepositLogs({ receipt }: GetDepositLogsParams) { const parsedLogs = parseEventLogs({ abi: spokePoolAbi, diff --git a/packages/sdk/src/client.ts b/packages/sdk/src/client.ts index 5d12544..5c1a144 100644 --- a/packages/sdk/src/client.ts +++ b/packages/sdk/src/client.ts @@ -25,6 +25,7 @@ import { WaitForFillTxParams, GetQuoteParams, GetDepositLogsParams, + GetDepositLogsReturnType, ExecuteQuoteParams, executeQuote, } from "./actions"; @@ -133,15 +134,15 @@ export type AcrossClientOptions = { export class AcrossClient { private static instance: AcrossClient | null = null; - integratorId: string; - publicClients: ConfiguredPublicClientMap; - walletClient?: ConfiguredWalletClient; - apiUrl: string; - indexerUrl: string; + private integratorId: string; + private publicClients: ConfiguredPublicClientMap; + private walletClient?: ConfiguredWalletClient; + private apiUrl: string; + private indexerUrl: string; logger: LoggerT; // Tenderly related options - tenderly?: { + private tenderly?: { simOnError?: boolean; accessKey: string; accountSlug: string; @@ -156,9 +157,6 @@ export class AcrossClient { ); } - /** - * @internal - */ private constructor(args: AcrossClientOptions) { this.integratorId = args.integratorId; this.walletClient = args?.walletClient; @@ -241,7 +239,6 @@ export class AcrossClient { * * @param params - See {@link ExecuteQuoteParams}. * @returns The deposit ID and receipts for the deposit and fill transactions. - * @public */ async executeQuote( params: Omit< @@ -318,7 +315,6 @@ export class AcrossClient { * Get the available routes for a given set of parameters. See {@link getAvailableRoutes}. * @param params - See {@link GetAvailableRoutesParams}. * @returns See {@link GetAvailableRoutesReturnType}. - * @public */ async getAvailableRoutes( params: Omit, @@ -334,7 +330,6 @@ export class AcrossClient { * Get the suggested fees for a given route. See {@link getSuggestedFees}. * @param params - See {@link GetSuggestedFeesParams}. * @returns See {@link GetSuggestedFeesReturnType}. - * @public */ async getSuggestedFees( params: Omit, @@ -412,7 +407,6 @@ export class AcrossClient { * Get a quote for a given set of parameters. See {@link getQuote}. * @param params - See {@link GetQuoteParams}. * @returns See {@link Quote}. - * @public */ async getQuote(params: Omit) { try { @@ -445,7 +439,14 @@ export class AcrossClient { } } - async getDepositLogs(params: GetDepositLogsParams) { + /** + * Get the deposit logs for a given deposit. See {@link getDepositLogs}. + * @param params - See {@link GetDepositLogsParams}. + * @returns See {@link GetDepositLogsReturnType}. + */ + async getDepositLogs( + params: GetDepositLogsParams, + ): Promise { return getDepositLogs(params); } diff --git a/packages/sdk/typedoc.json b/packages/sdk/typedoc.json new file mode 100644 index 0000000..73be96a --- /dev/null +++ b/packages/sdk/typedoc.json @@ -0,0 +1,6 @@ +{ + "entryPoints": ["src/index.ts"], + "plugin": ["typedoc-plugin-markdown"], + "out": "./docs", + "hidePageHeader": true +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 918d8b8..08df2ba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -193,6 +193,12 @@ importers: tsup: specifier: ^8.0.2 version: 8.0.2(postcss@8.4.45)(typescript@5.3.3) + typedoc: + specifier: ^0.26.7 + version: 0.26.7(typescript@5.3.3) + typedoc-plugin-markdown: + specifier: ^4.2.8 + version: 4.2.8(typedoc@0.26.7(typescript@5.3.3)) typescript: specifier: ^5.3.3 version: 5.3.3 @@ -2566,6 +2572,21 @@ packages: '@scure/bip39@1.3.0': resolution: {integrity: sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==} + '@shikijs/core@1.21.0': + resolution: {integrity: sha512-zAPMJdiGuqXpZQ+pWNezQAk5xhzRXBNiECFPcJLtUdsFM3f//G95Z15EHTnHchYycU8kIIysqGgxp8OVSj1SPQ==} + + '@shikijs/engine-javascript@1.21.0': + resolution: {integrity: sha512-jxQHNtVP17edFW4/0vICqAVLDAxmyV31MQJL4U/Kg+heQALeKYVOWo0sMmEZ18FqBt+9UCdyqGKYE7bLRtk9mg==} + + '@shikijs/engine-oniguruma@1.21.0': + resolution: {integrity: sha512-AIZ76XocENCrtYzVU7S4GY/HL+tgHGbVU+qhiDyNw1qgCA5OSi4B4+HY4BtAoJSMGuD/L5hfTzoRVbzEm2WTvg==} + + '@shikijs/types@1.21.0': + resolution: {integrity: sha512-tzndANDhi5DUndBtpojEq/42+dpUF2wS7wdCDQaFtIXm3Rd1QkrcVgSSRLOvEwexekihOXfbYJINW37g96tJRw==} + + '@shikijs/vscode-textmate@9.2.2': + resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==} + '@sideway/address@4.1.5': resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} @@ -2671,6 +2692,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + '@types/istanbul-lib-coverage@2.0.6': resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} @@ -2686,6 +2710,9 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} + '@types/minimist@1.2.5': resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} @@ -2725,6 +2752,9 @@ packages: '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -3375,6 +3405,9 @@ packages: caniuse-lite@1.0.30001653: resolution: {integrity: sha512-XGWQVB8wFQ2+9NZwZ10GxTYC5hk0Fa+q8cSkr0tgvMhYhMHP/QC+WTgrePMDBWiWc/pV+1ik82Al20XOK25Gcw==} + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + chai@5.1.1: resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} engines: {node: '>=12'} @@ -3395,6 +3428,12 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} @@ -3509,6 +3548,9 @@ packages: colorette@1.4.0: resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + command-exists@1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} @@ -3760,6 +3802,9 @@ packages: detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} + didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -3840,6 +3885,10 @@ packages: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -4449,6 +4498,12 @@ packages: resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} engines: {node: '>= 0.4'} + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + hermes-estree@0.22.0: resolution: {integrity: sha512-FLBt5X9OfA8BERUdc6aZS36Xz3rRuB0Y/mfocSADWEJfomc1xfene33GdyAmtTkKTBXTN/EgAy+rjTKkkZJHlw==} @@ -4473,6 +4528,9 @@ packages: hosted-git-info@2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} engines: {node: '>= 0.8'} @@ -4933,6 +4991,9 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + listhen@1.7.2: resolution: {integrity: sha512-7/HamOm5YD9Wb7CFgAZkKgVPA96WwhcTQoqtm2VTZGVbVVn3IWKRBTgrU7cchA3Q8k9iCsG8Osoi9GX4JsGM9g==} hasBin: true @@ -5024,6 +5085,9 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + magic-string@0.30.11: resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} @@ -5042,6 +5106,10 @@ packages: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + hasBin: true + marked-terminal@7.1.0: resolution: {integrity: sha512-+pvwa14KZL74MVXjYdPR3nSInhGhNvPce/3mqLVZT2oUvt654sL1XImFuLZ1pkA866IYZ3ikDTOFUIC7XzpZZg==} engines: {node: '>=16.0.0'} @@ -5056,6 +5124,12 @@ packages: marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} + mdast-util-to-hast@13.2.0: + resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} + + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + media-query-parser@2.0.2: resolution: {integrity: sha512-1N4qp+jE0pL5Xv4uEcwVUhIkwdUO3S/9gML90nqKA7v7FcOS5vUtatfzok9S9U1EJU8dHWlcv95WLnKmmxZI9w==} @@ -5134,6 +5208,21 @@ packages: micro-ftch@0.3.1: resolution: {integrity: sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==} + micromark-util-character@2.1.0: + resolution: {integrity: sha512-KvOVV+X1yLBfs9dCBSopq/+G1PcgT3lAK07mC4BzXi5E7ahzMAF8oIupDDJ6mievI6F+lAATkbQQlQixJfT3aQ==} + + micromark-util-encode@2.0.0: + resolution: {integrity: sha512-pS+ROfCXAGLWCOc8egcBvT0kf27GoWMqtdarNfDcjb6YLuV5cM3ioG45Ys2qOVqeqSbjaKg72vU+Wby3eddPsA==} + + micromark-util-sanitize-uri@2.0.0: + resolution: {integrity: sha512-WhYv5UEcZrbAtlsnPuChHUAsu/iBPOVaEVsntLBIdpibO0ddy8OzavZz3iL2xVvBZOpolujSliP65Kq0/7KIYw==} + + micromark-util-symbol@2.0.0: + resolution: {integrity: sha512-8JZt9ElZ5kyTnO94muPxIGS8oyElRJaiJO8EzV6ZSyGQ1Is8xwl4Q45qU5UOg+bGH4AikWziz0iN4sFLWs8PGw==} + + micromark-util-types@2.0.0: + resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -5190,6 +5279,10 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -5442,6 +5535,9 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} + oniguruma-to-js@0.4.3: + resolution: {integrity: sha512-X0jWUcAlxORhOqqBREgPMgnshB7ZGYszBNspP+tS9hPD3l13CdaXcHbgImoHUHlrvGx/7AvFEkTRhAGYh+jzjQ==} + open@6.4.0: resolution: {integrity: sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg==} engines: {node: '>=8'} @@ -5735,6 +5831,9 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + property-information@6.5.0: + resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + proxy-compare@2.5.1: resolution: {integrity: sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA==} @@ -5744,6 +5843,10 @@ packages: pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -5925,6 +6028,9 @@ packages: regenerator-transform@0.15.2: resolution: {integrity: sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==} + regex@4.3.2: + resolution: {integrity: sha512-kK/AA3A9K6q2js89+VMymcboLOlF5lZRCYJv3gzszXFHBr6kO6qLGzbm+UIugBEV8SMMKCTR59txoY6ctRHYVw==} + regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -6122,6 +6228,9 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + shiki@1.21.0: + resolution: {integrity: sha512-apCH5BoWTrmHDPGgg3RF8+HAAbEL/CdbYr8rMw7eIrdhCkZHdVGat5mMNlRtd1erNG01VPMIKHNQ0Pj2HMAiog==} + side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -6206,6 +6315,9 @@ packages: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + spawndamnit@2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} @@ -6298,6 +6410,9 @@ packages: string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + strip-ansi@5.2.0: resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} engines: {node: '>=6'} @@ -6482,6 +6597,9 @@ packages: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -6619,6 +6737,19 @@ packages: typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + typedoc-plugin-markdown@4.2.8: + resolution: {integrity: sha512-1EDsc66jaCjZtxdYy+Rl0KDU1WY/iyuCOOPaeFzcYFZ81FNXV8CmgUDOHri20WGmYnkEM5nQ+ooxj1vyuQo0Lg==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.26.x + + typedoc@0.26.7: + resolution: {integrity: sha512-gUeI/Wk99vjXXMi8kanwzyhmeFEGv1LTdTQsiyIsmSYsBebvFxhbcyAx7Zjo4cMbpLGxM4Uz3jVIjksu/I2v6Q==} + engines: {node: '>= 18'} + hasBin: true + peerDependencies: + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x + typescript@5.3.3: resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} @@ -6627,6 +6758,9 @@ packages: ua-parser-js@1.0.38: resolution: {integrity: sha512-Aq5ppTOfvrCMgAPneW1HfWj66Xi7XL+/mIy996R1/CLS/rcyJQm6QZdsKrUeivDFQ+Oc9Wyuwor8Ze8peEoUoQ==} + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.5.4: resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} @@ -6665,6 +6799,21 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unist-util-is@6.0.0: + resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-parents@6.0.1: + resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==} + + unist-util-visit@5.0.0: + resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -6809,6 +6958,12 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + vfile-message@4.0.2: + resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + viem@2.20.1: resolution: {integrity: sha512-a/BSe25TSfkc423GTSKYl1O0ON2J5huoQeOLkylHT1WS8wh3JFqb8nfAq7vg+aZ+W06BCTn36bbi47yp4D92Cg==} peerDependencies: @@ -7050,6 +7205,11 @@ packages: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -7093,6 +7253,9 @@ packages: react: optional: true + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} @@ -9623,7 +9786,7 @@ snapshots: semver: 7.5.4 strip-ansi: 5.2.0 wcwidth: 1.0.1 - yaml: 2.3.4 + yaml: 2.5.1 transitivePeerDependencies: - typescript @@ -9999,6 +10162,33 @@ snapshots: '@noble/hashes': 1.4.0 '@scure/base': 1.1.7 + '@shikijs/core@1.21.0': + dependencies: + '@shikijs/engine-javascript': 1.21.0 + '@shikijs/engine-oniguruma': 1.21.0 + '@shikijs/types': 1.21.0 + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.3 + + '@shikijs/engine-javascript@1.21.0': + dependencies: + '@shikijs/types': 1.21.0 + '@shikijs/vscode-textmate': 9.2.2 + oniguruma-to-js: 0.4.3 + + '@shikijs/engine-oniguruma@1.21.0': + dependencies: + '@shikijs/types': 1.21.0 + '@shikijs/vscode-textmate': 9.2.2 + + '@shikijs/types@1.21.0': + dependencies: + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@9.2.2': {} + '@sideway/address@4.1.5': dependencies: '@hapi/hoek': 9.3.0 @@ -10125,6 +10315,10 @@ snapshots: '@types/estree@1.0.5': {} + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + '@types/istanbul-lib-coverage@2.0.6': {} '@types/istanbul-lib-report@3.0.3': @@ -10139,6 +10333,10 @@ snapshots: '@types/json5@0.0.29': {} + '@types/mdast@4.0.4': + dependencies: + '@types/unist': 3.0.3 + '@types/minimist@1.2.5': {} '@types/ms@0.7.34': {} @@ -10176,6 +10374,8 @@ snapshots: '@types/trusted-types@2.0.7': {} + '@types/unist@3.0.3': {} + '@types/yargs-parser@21.0.3': {} '@types/yargs@15.0.19': @@ -11201,6 +11401,8 @@ snapshots: caniuse-lite@1.0.30001653: {} + ccount@2.0.1: {} + chai@5.1.1: dependencies: assertion-error: 2.0.1 @@ -11224,6 +11426,10 @@ snapshots: char-regex@1.0.2: {} + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + chardet@0.7.0: {} check-error@2.1.1: {} @@ -11365,6 +11571,8 @@ snapshots: colorette@1.4.0: {} + comma-separated-tokens@2.0.3: {} + command-exists@1.2.9: {} commander@10.0.1: {} @@ -11566,6 +11774,10 @@ snapshots: detect-node-es@1.1.0: {} + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + didyoumean@1.2.2: {} dijkstrajs@1.0.3: {} @@ -11663,6 +11875,8 @@ snapshots: ansi-colors: 4.1.3 strip-ansi: 6.0.1 + entities@4.5.0: {} + env-paths@2.2.1: {} envinfo@7.13.0: {} @@ -11855,7 +12069,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) @@ -11909,7 +12123,7 @@ snapshots: enhanced-resolve: 5.12.0 eslint: 8.57.0 eslint-module-utils: 2.8.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -11948,7 +12162,7 @@ snapshots: eslint: 8.57.0 ignore: 5.3.1 - eslint-plugin-import@2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.0(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + eslint-plugin-import@2.29.0(@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -12611,6 +12825,24 @@ snapshots: dependencies: function-bind: 1.1.2 + hast-util-to-html@9.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + hermes-estree@0.22.0: {} hermes-estree@0.23.0: {} @@ -12635,6 +12867,8 @@ snapshots: hosted-git-info@2.8.9: {} + html-void-elements@3.0.0: {} + http-errors@2.0.0: dependencies: depd: 2.0.0 @@ -13082,6 +13316,10 @@ snapshots: lines-and-columns@1.2.4: {} + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + listhen@1.7.2: dependencies: '@parcel/watcher': 2.4.1 @@ -13197,6 +13435,8 @@ snapshots: dependencies: react: 18.3.1 + lunr@2.3.9: {} + magic-string@0.30.11: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 @@ -13214,6 +13454,15 @@ snapshots: map-obj@4.3.0: {} + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + marked-terminal@7.1.0(marked@9.1.6): dependencies: ansi-escapes: 7.0.0 @@ -13228,6 +13477,20 @@ snapshots: marky@1.2.5: {} + mdast-util-to-hast@13.2.0: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + + mdurl@2.0.0: {} + media-query-parser@2.0.2: dependencies: '@babel/runtime': 7.23.7 @@ -13436,6 +13699,23 @@ snapshots: micro-ftch@0.3.1: {} + micromark-util-character@2.1.0: + dependencies: + micromark-util-symbol: 2.0.0 + micromark-util-types: 2.0.0 + + micromark-util-encode@2.0.0: {} + + micromark-util-sanitize-uri@2.0.0: + dependencies: + micromark-util-character: 2.1.0 + micromark-util-encode: 2.0.0 + micromark-util-symbol: 2.0.0 + + micromark-util-symbol@2.0.0: {} + + micromark-util-types@2.0.0: {} + micromatch@4.0.5: dependencies: braces: 3.0.2 @@ -13473,6 +13753,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + minimist-options@4.1.0: dependencies: arrify: 1.0.1 @@ -13712,6 +13996,10 @@ snapshots: dependencies: mimic-fn: 4.0.0 + oniguruma-to-js@0.4.3: + dependencies: + regex: 4.3.2 + open@6.4.0: dependencies: is-wsl: 1.1.0 @@ -14000,6 +14288,8 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + property-information@6.5.0: {} + proxy-compare@2.5.1: {} pseudomap@1.0.2: {} @@ -14009,6 +14299,8 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 + punycode.js@2.3.1: {} + punycode@2.3.1: {} qr-code-styling@1.6.0-rc.1: @@ -14245,6 +14537,8 @@ snapshots: dependencies: '@babel/runtime': 7.23.7 + regex@4.3.2: {} + regexp-tree@0.1.27: {} regexp.prototype.flags@1.5.1: @@ -14484,6 +14778,15 @@ snapshots: shell-quote@1.8.1: {} + shiki@1.21.0: + dependencies: + '@shikijs/core': 1.21.0 + '@shikijs/engine-javascript': 1.21.0 + '@shikijs/engine-oniguruma': 1.21.0 + '@shikijs/types': 1.21.0 + '@shikijs/vscode-textmate': 9.2.2 + '@types/hast': 3.0.4 + side-channel@1.0.4: dependencies: call-bind: 1.0.5 @@ -14577,6 +14880,8 @@ snapshots: dependencies: whatwg-url: 7.1.0 + space-separated-tokens@2.0.2: {} + spawndamnit@2.0.0: dependencies: cross-spawn: 5.1.0 @@ -14679,6 +14984,11 @@ snapshots: dependencies: safe-buffer: 5.2.1 + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + strip-ansi@5.2.0: dependencies: ansi-regex: 4.1.1 @@ -14856,6 +15166,8 @@ snapshots: tree-kill@1.2.2: {} + trim-lines@3.0.1: {} + trim-newlines@3.0.1: {} ts-api-utils@1.0.3(typescript@5.3.3): @@ -14992,10 +15304,25 @@ snapshots: for-each: 0.3.3 is-typed-array: 1.1.12 + typedoc-plugin-markdown@4.2.8(typedoc@0.26.7(typescript@5.3.3)): + dependencies: + typedoc: 0.26.7(typescript@5.3.3) + + typedoc@0.26.7(typescript@5.3.3): + dependencies: + lunr: 2.3.9 + markdown-it: 14.1.0 + minimatch: 9.0.5 + shiki: 1.21.0 + typescript: 5.3.3 + yaml: 2.5.1 + typescript@5.3.3: {} ua-parser-js@1.0.38: {} + uc.micro@2.1.0: {} + ufo@1.5.4: {} uint8arrays@3.1.0: @@ -15034,6 +15361,29 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} + unist-util-is@6.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.0.1: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.0 + + unist-util-visit@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.0 + unist-util-visit-parents: 6.0.1 + universalify@0.1.2: {} unpipe@1.0.0: {} @@ -15134,6 +15484,16 @@ snapshots: vary@1.1.2: {} + vfile-message@4.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.2 + viem@2.20.1(bufferutil@4.0.8)(typescript@5.3.3)(utf-8-validate@5.0.10): dependencies: '@adraffy/ens-normalize': 1.10.0 @@ -15412,6 +15772,8 @@ snapshots: yaml@2.3.4: {} + yaml@2.5.1: {} + yargs-parser@18.1.3: dependencies: camelcase: 5.3.1 @@ -15463,3 +15825,5 @@ snapshots: optionalDependencies: '@types/react': 18.3.4 react: 18.3.1 + + zwitch@2.0.4: {}