From a21f7a77ef96cfed636854747c65834365eb8cd0 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 21 Nov 2024 16:34:43 -0600 Subject: [PATCH 01/11] Fix direct-listings/get-all example and add descriptions to status enum --- .gitignore | 3 + package.json | 6 +- sdk/src/Engine.ts | 1 - sdk/src/services/AccessTokensService.ts | 98 +- sdk/src/services/AccountFactoryService.ts | 188 +- sdk/src/services/AccountService.ts | 544 +-- sdk/src/services/BackendWalletService.ts | 1118 +++--- sdk/src/services/ChainService.ts | 174 +- sdk/src/services/ConfigurationService.ts | 605 ++-- sdk/src/services/ContractEventsService.ts | 50 +- sdk/src/services/ContractMetadataService.ts | 210 +- sdk/src/services/ContractRolesService.ts | 254 +- sdk/src/services/ContractRoyaltiesService.ts | 280 +- sdk/src/services/ContractService.ts | 174 +- .../services/ContractSubscriptionsService.ts | 229 +- sdk/src/services/DefaultService.ts | 11 + sdk/src/services/DeployService.ts | 1742 +++++----- sdk/src/services/Erc1155Service.ts | 3038 +++++++++-------- sdk/src/services/Erc20Service.ts | 1808 +++++----- sdk/src/services/Erc721Service.ts | 2982 ++++++++-------- sdk/src/services/KeypairService.ts | 150 +- .../MarketplaceDirectListingsService.ts | 1232 +++---- .../MarketplaceEnglishAuctionsService.ts | 950 +++--- sdk/src/services/MarketplaceOffersService.ts | 672 ++-- sdk/src/services/PermissionsService.ts | 70 +- sdk/src/services/RelayerService.ts | 208 +- sdk/src/services/TransactionService.ts | 678 ++-- sdk/src/services/WebhooksService.ts | 114 +- src/scripts/generate-sdk.ts | 10 +- .../directListings/read/getAll.ts | 72 +- .../marketplaceV3/directListing/index.ts | 12 +- 31 files changed, 8870 insertions(+), 8813 deletions(-) diff --git a/.gitignore b/.gitignore index dbb062fa7..22f202da8 100644 --- a/.gitignore +++ b/.gitignore @@ -152,3 +152,6 @@ https # Auto generated OpenAPI file openapi.json .aider* + +# jetbrains +.idea diff --git a/package.json b/package.json index 6d156ac43..6dfbd81e4 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ "dev:infra": "docker compose -f ./docker-compose.yml up -d", "dev:db": "yarn prisma:setup:dev", "dev:run": "npx nodemon --watch 'src/**/*.ts' --exec 'npx tsx ./src/index.ts' --files src/index.ts", - "build": "rm -rf dist && tsc -p ./tsconfig.json --outDir dist", + "prebuild": "rm -r dist", + "build": "tsc -p ./tsconfig.json --outDir dist", "build:docker": "docker build . -f Dockerfile -t prod", "generate:sdk": "npx tsx ./src/scripts/generate-sdk && cd ./sdk && yarn build", "prisma:setup:dev": "npx tsx ./src/scripts/setup-db.ts", @@ -113,5 +114,6 @@ "micromatch": ">=4.0.8", "secp256k1": ">=4.0.4", "ws": ">=8.17.1" - } + }, + "packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" } diff --git a/sdk/src/Engine.ts b/sdk/src/Engine.ts index 8a8e397a2..9e9533dcb 100644 --- a/sdk/src/Engine.ts +++ b/sdk/src/Engine.ts @@ -105,7 +105,6 @@ class EngineLogic { } } - export class Engine extends EngineLogic { constructor(config: { url: string; accessToken: string; }) { super({ BASE: config.url, TOKEN: config.accessToken }); diff --git a/sdk/src/services/AccessTokensService.ts b/sdk/src/services/AccessTokensService.ts index 565f90fe6..d37a69d96 100644 --- a/sdk/src/services/AccessTokensService.ts +++ b/sdk/src/services/AccessTokensService.ts @@ -16,18 +16,18 @@ export class AccessTokensService { * @throws ApiError */ public getAll(): CancelablePromise<{ - result: Array<{ - id: string; - tokenMask: string; - /** - * A contract or wallet address - */ - walletAddress: string; - createdAt: string; - expiresAt: string; - label: (string | null); - }>; - }> { +result: Array<{ +id: string; +tokenMask: string; +/** + * A contract or wallet address + */ +walletAddress: string; +createdAt: string; +expiresAt: string; +label: (string | null); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/auth/access-tokens/get-all', @@ -42,28 +42,28 @@ export class AccessTokensService { /** * Create a new access token * Create a new access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public create( - requestBody?: { - label?: string; - }, - ): CancelablePromise<{ - result: { - id: string; - tokenMask: string; - /** - * A contract or wallet address - */ - walletAddress: string; - createdAt: string; - expiresAt: string; - label: (string | null); - accessToken: string; - }; - }> { +requestBody?: { +label?: string; +}, +): CancelablePromise<{ +result: { +id: string; +tokenMask: string; +/** + * A contract or wallet address + */ +walletAddress: string; +createdAt: string; +expiresAt: string; +label: (string | null); +accessToken: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/create', @@ -80,19 +80,19 @@ export class AccessTokensService { /** * Revoke an access token * Revoke an access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public revoke( - requestBody: { - id: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +id: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/revoke', @@ -109,20 +109,20 @@ export class AccessTokensService { /** * Update an access token * Update an access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public update( - requestBody: { - id: string; - label?: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +id: string; +label?: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/update', diff --git a/sdk/src/services/AccountFactoryService.ts b/sdk/src/services/AccountFactoryService.ts index 5d8c45882..2787e8d5d 100644 --- a/sdk/src/services/AccountFactoryService.ts +++ b/sdk/src/services/AccountFactoryService.ts @@ -12,20 +12,20 @@ export class AccountFactoryService { /** * Get all smart accounts * Get all the smart accounts for this account factory. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllAccounts( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * The account addresses of all the accounts in this factory - */ - result: Array; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The account addresses of all the accounts in this factory + */ +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/get-all-accounts', @@ -45,21 +45,21 @@ export class AccountFactoryService { * Get associated smart accounts * Get all the smart accounts for this account factory associated with the specific admin wallet. * @param signerAddress The address of the signer to get associated accounts from - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAssociatedAccounts( - signerAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * The account addresses of all the accounts with a specific signer in this factory - */ - result: Array; - }> { +signerAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The account addresses of all the accounts with a specific signer in this factory + */ +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts', @@ -82,23 +82,23 @@ export class AccountFactoryService { * Check if deployed * Check if a smart account has been deployed to the blockchain. * @param adminAddress The address of the admin to check if the account address is deployed - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param extraData Extra data to use in predicting the account address * @returns any Default Response * @throws ApiError */ public isAccountDeployed( - adminAddress: string, - chain: string, - contractAddress: string, - extraData?: string, - ): CancelablePromise<{ - /** - * Whether or not the account has been deployed - */ - result: boolean; - }> { +adminAddress: string, +chain: string, +contractAddress: string, +extraData?: string, +): CancelablePromise<{ +/** + * Whether or not the account has been deployed + */ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/is-account-deployed', @@ -122,23 +122,23 @@ export class AccountFactoryService { * Predict smart account address * Get the counterfactual address of a smart account. * @param adminAddress The address of the admin to predict the account address for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param extraData Extra data (account salt) to add to use in predicting the account address * @returns any Default Response * @throws ApiError */ public predictAccountAddress( - adminAddress: string, - chain: string, - contractAddress: string, - extraData?: string, - ): CancelablePromise<{ - /** - * New account counter-factual address. - */ - result: string; - }> { +adminAddress: string, +chain: string, +contractAddress: string, +extraData?: string, +): CancelablePromise<{ +/** + * New account counter-factual address. + */ +result: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/predict-account-address', @@ -161,68 +161,68 @@ export class AccountFactoryService { /** * Create smart account * Create a smart account for this account factory. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public createAccount( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The admin address to create an account for - */ - adminAddress: string; - /** - * Extra data to add to use in creating the account address - */ - extraData?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The admin address to create an account for + */ +adminAddress: string; +/** + * Extra data to add to use in creating the account address + */ +extraData?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account-factory/create-account', diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 31a575a90..20fa2213e 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -12,20 +12,20 @@ export class AccountService { /** * Get all admins * Get all admins for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllAdmins( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * The address of the admins on this account - */ - result: Array; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The address of the admins on this account + */ +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account/admins/get-all', @@ -44,26 +44,26 @@ export class AccountService { /** * Get all session keys * Get all session keys for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllSessions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - signerAddress: string; - startDate: string; - expirationDate: string; - nativeTokenLimitPerTransaction: string; - approvedCallTargets: Array; - }>; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +/** + * A contract or wallet address + */ +signerAddress: string; +startDate: string; +expirationDate: string; +nativeTokenLimitPerTransaction: string; +approvedCallTargets: Array; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account/sessions/get-all', @@ -82,63 +82,63 @@ export class AccountService { /** * Grant admin * Grant a smart account's admin permission. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public grantAdmin( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to grant admin permissions to - */ - signerAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to grant admin permissions to + */ +signerAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/admins/grant', @@ -169,63 +169,63 @@ export class AccountService { /** * Revoke admin * Revoke a smart account's admin permission. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeAdmin( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to revoke admin permissions from - */ - walletAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to revoke admin permissions from + */ +walletAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/admins/revoke', @@ -256,67 +256,67 @@ export class AccountService { /** * Create session key * Create a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public grantSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - signerAddress: string; - startDate: string; - expirationDate: string; - nativeTokenLimitPerTransaction: string; - approvedCallTargets: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +signerAddress: string; +startDate: string; +expirationDate: string; +nativeTokenLimitPerTransaction: string; +approvedCallTargets: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/create', @@ -347,63 +347,63 @@ export class AccountService { /** * Revoke session key * Revoke a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to revoke session from - */ - walletAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to revoke session from + */ +walletAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/revoke', @@ -434,67 +434,67 @@ export class AccountService { /** * Update session key * Update a session key for a smart account. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - signerAddress: string; - approvedCallTargets: Array; - startDate?: string; - expirationDate?: string; - nativeTokenLimitPerTransaction?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +signerAddress: string; +approvedCallTargets: Array; +startDate?: string; +expirationDate?: string; +nativeTokenLimitPerTransaction?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/update', diff --git a/sdk/src/services/BackendWalletService.ts b/sdk/src/services/BackendWalletService.ts index b9657572e..1ccad8f2d 100644 --- a/sdk/src/services/BackendWalletService.ts +++ b/sdk/src/services/BackendWalletService.ts @@ -12,28 +12,28 @@ export class BackendWalletService { /** * Create backend wallet * Create a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public create( - requestBody?: { - label?: string; - /** - * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. - */ - type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); - }, - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); - }; - }> { +requestBody?: { +label?: string; +/** + * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. + */ +type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +}, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/create', @@ -55,12 +55,12 @@ export class BackendWalletService { * @throws ApiError */ public removeBackendWallet( - walletAddress: string, - ): CancelablePromise<{ - result: { - status: string; - }; - }> { +walletAddress: string, +): CancelablePromise<{ +result: { +status: string; +}; +}> { return this.httpRequest.request({ method: 'DELETE', url: '/backend-wallet/{walletAddress}', @@ -78,85 +78,85 @@ export class BackendWalletService { /** * Import backend wallet * Import an existing wallet as a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public import( - requestBody?: ({ - /** - * Optional label for the imported wallet - */ - label?: string; - } & ({ - /** - * AWS KMS key ARN - */ - awsKmsArn: string; - /** - * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). - */ - credentials?: { - /** - * AWS Access Key ID - */ - awsAccessKeyId: string; - /** - * AWS Secret Access Key - */ - awsSecretAccessKey: string; - }; - } | { - /** - * GCP KMS key ID - */ - gcpKmsKeyId: string; - /** - * GCP KMS key version ID - */ - gcpKmsKeyVersionId: string; - /** - * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). - */ - credentials?: { - /** - * GCP service account email - */ - email: string; - /** - * GCP service account private key - */ - privateKey: string; - }; - } | { - /** - * The private key of the wallet to import - */ - privateKey: string; - } | { - /** - * The mnemonic phrase of the wallet to import - */ - mnemonic: string; - } | { - /** - * The encrypted JSON of the wallet to import - */ - encryptedJson: string; - /** - * The password used to encrypt the encrypted JSON - */ - password: string; - })), - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - }; - }> { +requestBody?: ({ +/** + * Optional label for the imported wallet + */ +label?: string; +} & ({ +/** + * AWS KMS key ARN + */ +awsKmsArn: string; +/** + * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). + */ +credentials?: { +/** + * AWS Access Key ID + */ +awsAccessKeyId: string; +/** + * AWS Secret Access Key + */ +awsSecretAccessKey: string; +}; +} | { +/** + * GCP KMS key ID + */ +gcpKmsKeyId: string; +/** + * GCP KMS key version ID + */ +gcpKmsKeyVersionId: string; +/** + * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). + */ +credentials?: { +/** + * GCP service account email + */ +email: string; +/** + * GCP service account private key + */ +privateKey: string; +}; +} | { +/** + * The private key of the wallet to import + */ +privateKey: string; +} | { +/** + * The mnemonic phrase of the wallet to import + */ +mnemonic: string; +} | { +/** + * The encrypted JSON of the wallet to import + */ +encryptedJson: string; +/** + * The password used to encrypt the encrypted JSON + */ +password: string; +})), +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/import', @@ -173,27 +173,27 @@ export class BackendWalletService { /** * Update backend wallet * Update a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public update( - requestBody: { - /** - * A contract or wallet address - */ - walletAddress: string; - label?: string; - }, - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - }; - }> { +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +label?: string; +}, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/update', @@ -210,27 +210,27 @@ export class BackendWalletService { /** * Get balance * Get the native balance for a backend wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError */ public getBalance( - chain: string, - walletAddress: string, - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - }> { +chain: string, +walletAddress: string, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-balance', @@ -255,28 +255,28 @@ export class BackendWalletService { * @throws ApiError */ public getAll( - page: number = 1, - limit: number = 10, - ): CancelablePromise<{ - result: Array<{ - /** - * Wallet Address - */ - address: string; - /** - * Wallet Type - */ - type: string; - label: (string | null); - awsKmsKeyId: (string | null); - awsKmsArn: (string | null); - gcpKmsKeyId: (string | null); - gcpKmsKeyRingId: (string | null); - gcpKmsLocationId: (string | null); - gcpKmsKeyVersionId: (string | null); - gcpKmsResourcePath: (string | null); - }>; - }> { +page: number = 1, +limit: number = 10, +): CancelablePromise<{ +result: Array<{ +/** + * Wallet Address + */ +address: string; +/** + * Wallet Type + */ +type: string; +label: (string | null); +awsKmsKeyId: (string | null); +awsKmsArn: (string | null); +gcpKmsKeyId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyVersionId: (string | null); +gcpKmsResourcePath: (string | null); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/get-all', @@ -295,63 +295,63 @@ export class BackendWalletService { /** * Transfer tokens * Transfer native currency or ERC20 tokens to another wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public transfer( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient wallet address. - */ - to: string; - /** - * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). - */ - currencyAddress?: string; - /** - * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient wallet address. + */ +to: string; +/** + * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). + */ +currencyAddress?: string; +/** + * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/transfer', @@ -378,55 +378,55 @@ export class BackendWalletService { /** * Withdraw funds * Withdraw all funds from this wallet to another wallet. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public withdraw( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to withdraw all funds to - */ - toAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - /** - * An amount in native token (decimals allowed). Example: "0.1" - */ - amount: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to withdraw all funds to + */ +toAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +/** + * An amount in native token (decimals allowed). Example: "0.1" + */ +amount: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/withdraw', @@ -453,59 +453,59 @@ export class BackendWalletService { /** * Send a transaction * Send a transaction with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public sendTransaction( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - toAddress?: string; - data: string; - value: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +toAddress?: string; +data: string; +value: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/send-transaction', @@ -535,52 +535,52 @@ export class BackendWalletService { /** * Send a batch of raw transactions * Send a batch of raw transactions with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendTransactionBatch( - chain: string, - xBackendWalletAddress: string, - xIdempotencyKey?: string, - requestBody?: Array<{ - /** - * A contract or wallet address - */ - toAddress?: string; - data: string; - value: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }>, - ): CancelablePromise<{ - result: { - queueIds: Array; - }; - }> { +chain: string, +xBackendWalletAddress: string, +xIdempotencyKey?: string, +requestBody?: Array<{ +/** + * A contract or wallet address + */ +toAddress?: string; +data: string; +value: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}>, +): CancelablePromise<{ +result: { +queueIds: Array; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/send-transaction-batch', @@ -605,35 +605,33 @@ export class BackendWalletService { * Sign a transaction * Sign a transaction * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signTransaction( - xBackendWalletAddress: string, - requestBody: { - transaction: { - to?: string; - from?: string; - nonce?: string; - gasLimit?: string; - gasPrice?: string; - data?: string; - value?: string; - chainId?: number; - type?: number; - accessList?: any; - maxFeePerGas?: string; - maxPriorityFeePerGas?: string; - customData?: Record; - ccipReadEnabled?: boolean; - }; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { +xBackendWalletAddress: string, +requestBody: { +transaction: { +to?: string; +nonce?: string; +gasLimit?: string; +gasPrice?: string; +data?: string; +value?: string; +chainId?: number; +type?: number; +accessList?: any; +maxFeePerGas?: string; +maxPriorityFeePerGas?: string; +ccipReadEnabled?: boolean; +}; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-transaction', @@ -655,22 +653,22 @@ export class BackendWalletService { * Sign a message * Send a message * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signMessage( - xBackendWalletAddress: string, - requestBody: { - message: string; - isBytes?: boolean; - chainId?: number; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { +xBackendWalletAddress: string, +requestBody: { +message: string; +isBytes?: boolean; +chainId?: number; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-message', @@ -692,22 +690,22 @@ export class BackendWalletService { * Sign an EIP-712 message * Send an EIP-712 message ("typed data") * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signTypedData( - xBackendWalletAddress: string, - requestBody: { - domain: Record; - types: Record; - value: Record; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { +xBackendWalletAddress: string, +requestBody: { +domain: Record; +types: Record; +value: Record; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-typed-data', @@ -729,7 +727,7 @@ export class BackendWalletService { * Get recent transactions * Get recent transactions for this backend wallet. * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @param page Specify the page number. * @param limit Specify the number of results to return per page. @@ -737,70 +735,70 @@ export class BackendWalletService { * @throws ApiError */ public getTransactionsForBackendWallet( - status: ('queued' | 'mined' | 'cancelled' | 'errored'), - chain: string, - walletAddress: string, - page: number = 1, - limit: number = 100, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: (string | null); - /** - * The current state of the transaction. - */ - status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); - chainId: (string | null); - fromAddress: (string | null); - toAddress: (string | null); - data: (string | null); - extension: (string | null); - value: (string | null); - nonce: (number | string | null); - gasLimit: (string | null); - gasPrice: (string | null); - maxFeePerGas: (string | null); - maxPriorityFeePerGas: (string | null); - transactionType: (number | null); - transactionHash: (string | null); - queuedAt: (string | null); - sentAt: (string | null); - minedAt: (string | null); - cancelledAt: (string | null); - deployedContractAddress: (string | null); - deployedContractType: (string | null); - errorMessage: (string | null); - sentAtBlockNumber: (number | null); - blockNumber: (number | null); - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: (boolean | null); - retryMaxFeePerGas: (string | null); - retryMaxPriorityFeePerGas: (string | null); - signerAddress: (string | null); - accountAddress: (string | null); - accountSalt: (string | null); - accountFactoryAddress: (string | null); - target: (string | null); - sender: (string | null); - initCode: (string | null); - callData: (string | null); - callGasLimit: (string | null); - verificationGasLimit: (string | null); - preVerificationGas: (string | null); - paymasterAndData: (string | null); - userOpHash: (string | null); - functionName: (string | null); - functionArgs: (string | null); - onChainTxStatus: (number | null); - onchainStatus: ('success' | 'reverted' | null); - effectiveGasPrice: (string | null); - cumulativeGasUsed: (string | null); - }>; - }; - }> { +status: ('queued' | 'mined' | 'cancelled' | 'errored'), +chain: string, +walletAddress: string, +page: number = 1, +limit: number = 100, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-all-transactions', @@ -825,77 +823,77 @@ export class BackendWalletService { * Get recent transactions by nonce * Get recent transactions for this backend wallet, sorted by descending nonce. * @param fromNonce The earliest nonce, inclusive. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. * @returns any Default Response * @throws ApiError */ public getTransactionsForBackendWalletByNonce( - fromNonce: number, - chain: string, - walletAddress: string, - toNonce?: number, - ): CancelablePromise<{ - result: Array<{ - nonce: number; - transaction: ({ - queueId: (string | null); - /** - * The current state of the transaction. - */ - status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); - chainId: (string | null); - fromAddress: (string | null); - toAddress: (string | null); - data: (string | null); - extension: (string | null); - value: (string | null); - nonce: (number | string | null); - gasLimit: (string | null); - gasPrice: (string | null); - maxFeePerGas: (string | null); - maxPriorityFeePerGas: (string | null); - transactionType: (number | null); - transactionHash: (string | null); - queuedAt: (string | null); - sentAt: (string | null); - minedAt: (string | null); - cancelledAt: (string | null); - deployedContractAddress: (string | null); - deployedContractType: (string | null); - errorMessage: (string | null); - sentAtBlockNumber: (number | null); - blockNumber: (number | null); - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: (boolean | null); - retryMaxFeePerGas: (string | null); - retryMaxPriorityFeePerGas: (string | null); - signerAddress: (string | null); - accountAddress: (string | null); - accountSalt: (string | null); - accountFactoryAddress: (string | null); - target: (string | null); - sender: (string | null); - initCode: (string | null); - callData: (string | null); - callGasLimit: (string | null); - verificationGasLimit: (string | null); - preVerificationGas: (string | null); - paymasterAndData: (string | null); - userOpHash: (string | null); - functionName: (string | null); - functionArgs: (string | null); - onChainTxStatus: (number | null); - onchainStatus: ('success' | 'reverted' | null); - effectiveGasPrice: (string | null); - cumulativeGasUsed: (string | null); - } | string); - }>; - }> { +fromNonce: number, +chain: string, +walletAddress: string, +toNonce?: number, +): CancelablePromise<{ +result: Array<{ +nonce: number; +transaction: ({ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +} | string); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce', @@ -922,10 +920,10 @@ export class BackendWalletService { * @throws ApiError */ public resetNonces(): CancelablePromise<{ - result: { - status: string; - }; - }> { +result: { +status: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/reset-nonces', @@ -940,19 +938,19 @@ export class BackendWalletService { /** * Get nonce * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError */ public getNonce( - chain: string, - walletAddress: string, - ): CancelablePromise<{ - result: { - nonce: number; - }; - }> { +chain: string, +walletAddress: string, +): CancelablePromise<{ +result: { +nonce: number; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-nonce', @@ -971,53 +969,53 @@ export class BackendWalletService { /** * Simulate a transaction * Simulate a transaction with transaction parameters - * @param chain Chain ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public simulateTransaction( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The contract address - */ - toAddress: string; - /** - * The amount of native currency in wei - */ - value?: string; - /** - * The function to call on the contract - */ - functionName?: string; - /** - * The arguments to call for this function - */ - args?: Array<(string | number | boolean)>; - /** - * Raw calldata - */ - data?: string; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Simulation Success - */ - success: boolean; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The contract address + */ +toAddress: string; +/** + * The amount of native currency in wei + */ +value?: string; +/** + * The function to call on the contract + */ +functionName?: string; +/** + * The arguments to call for this function + */ +args?: Array<(string | number | boolean)>; +/** + * Raw calldata + */ +data?: string; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Simulation Success + */ +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/simulate-transaction', diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index efa9808fa..dadf90b70 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -12,55 +12,55 @@ export class ChainService { /** * Get chain details * Get details about a chain. - * @param chain Chain name or ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @returns any Default Response * @throws ApiError */ public get( - chain: string, - ): CancelablePromise<{ - result: { - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }; - }> { +chain: string, +): CancelablePromise<{ +result: { +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/chain/get', @@ -82,48 +82,48 @@ export class ChainService { * @throws ApiError */ public getAll(): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/chain/get-all', diff --git a/sdk/src/services/ConfigurationService.ts b/sdk/src/services/ConfigurationService.ts index dc25260be..01e611807 100644 --- a/sdk/src/services/ConfigurationService.ts +++ b/sdk/src/services/ConfigurationService.ts @@ -16,16 +16,16 @@ export class ConfigurationService { * @throws ApiError */ public getWalletsConfiguration(): CancelablePromise<{ - result: { - type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); - awsAccessKeyId: (string | null); - awsRegion: (string | null); - gcpApplicationProjectId: (string | null); - gcpKmsLocationId: (string | null); - gcpKmsKeyRingId: (string | null); - gcpApplicationCredentialEmail: (string | null); - }; - }> { +result: { +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +awsAccessKeyId: (string | null); +awsRegion: (string | null); +gcpApplicationProjectId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpApplicationCredentialEmail: (string | null); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/wallets', @@ -40,33 +40,33 @@ export class ConfigurationService { /** * Update wallets configuration * Update wallets configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateWalletsConfiguration( - requestBody?: ({ - awsAccessKeyId: string; - awsSecretAccessKey: string; - awsRegion: string; - } | { - gcpApplicationProjectId: string; - gcpKmsLocationId: string; - gcpKmsKeyRingId: string; - gcpApplicationCredentialEmail: string; - gcpApplicationCredentialPrivateKey: string; - }), - ): CancelablePromise<{ - result: { - type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); - awsAccessKeyId: (string | null); - awsRegion: (string | null); - gcpApplicationProjectId: (string | null); - gcpKmsLocationId: (string | null); - gcpKmsKeyRingId: (string | null); - gcpApplicationCredentialEmail: (string | null); - }; - }> { +requestBody?: ({ +awsAccessKeyId: string; +awsSecretAccessKey: string; +awsRegion: string; +} | { +gcpApplicationProjectId: string; +gcpKmsLocationId: string; +gcpKmsKeyRingId: string; +gcpApplicationCredentialEmail: string; +gcpApplicationCredentialPrivateKey: string; +}), +): CancelablePromise<{ +result: { +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +awsAccessKeyId: (string | null); +awsRegion: (string | null); +gcpApplicationProjectId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpApplicationCredentialEmail: (string | null); +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/wallets', @@ -87,48 +87,48 @@ export class ConfigurationService { * @throws ApiError */ public getChainsConfiguration(): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/chains', @@ -143,97 +143,97 @@ export class ConfigurationService { /** * Update chain overrides configuration * Update chain overrides configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateChainsConfiguration( - requestBody: { - chainOverrides: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }, - ): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { +requestBody: { +chainOverrides: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}, +): CancelablePromise<{ +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/chains', @@ -254,19 +254,19 @@ export class ConfigurationService { * @throws ApiError */ public getTransactionConfiguration(): CancelablePromise<{ - result: { - minTxsToProcess: number; - maxTxsToProcess: number; - minedTxListenerCronSchedule: (string | null); - maxTxsToUpdate: number; - retryTxListenerCronSchedule: (string | null); - minEllapsedBlocksBeforeRetry: number; - maxFeePerGasForRetries: string; - maxPriorityFeePerGasForRetries: string; - maxRetriesPerTx: number; - clearCacheCronSchedule: (string | null); - }; - }> { +result: { +minTxsToProcess: number; +maxTxsToProcess: number; +minedTxListenerCronSchedule: (string | null); +maxTxsToUpdate: number; +retryTxListenerCronSchedule: (string | null); +minEllapsedBlocksBeforeRetry: number; +maxFeePerGasForRetries: string; +maxPriorityFeePerGasForRetries: string; +maxRetriesPerTx: number; +clearCacheCronSchedule: (string | null); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/transactions', @@ -281,35 +281,33 @@ export class ConfigurationService { /** * Update transaction processing configuration * Update transaction processing configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateTransactionConfiguration( - requestBody?: { - minTxsToProcess?: number; - maxTxsToProcess?: number; - minedTxListenerCronSchedule?: (string | null); - maxTxsToUpdate?: number; - retryTxListenerCronSchedule?: (string | null); - minEllapsedBlocksBeforeRetry?: number; - maxFeePerGasForRetries?: string; - maxPriorityFeePerGasForRetries?: string; - maxRetriesPerTx?: number; - }, - ): CancelablePromise<{ - result: { - minTxsToProcess: number; - maxTxsToProcess: number; - minedTxListenerCronSchedule: (string | null); - maxTxsToUpdate: number; - retryTxListenerCronSchedule: (string | null); - minEllapsedBlocksBeforeRetry: number; - maxFeePerGasForRetries: string; - maxPriorityFeePerGasForRetries: string; - maxRetriesPerTx: number; - }; - }> { +requestBody?: { +maxTxsToProcess?: number; +maxTxsToUpdate?: number; +minedTxListenerCronSchedule?: (string | null); +retryTxListenerCronSchedule?: (string | null); +minEllapsedBlocksBeforeRetry?: number; +maxFeePerGasForRetries?: string; +maxRetriesPerTx?: number; +}, +): CancelablePromise<{ +result: { +minTxsToProcess: number; +maxTxsToProcess: number; +minedTxListenerCronSchedule: (string | null); +maxTxsToUpdate: number; +retryTxListenerCronSchedule: (string | null); +minEllapsedBlocksBeforeRetry: number; +maxFeePerGasForRetries: string; +maxPriorityFeePerGasForRetries: string; +maxRetriesPerTx: number; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/transactions', @@ -330,10 +328,10 @@ export class ConfigurationService { * @throws ApiError */ public getAuthConfiguration(): CancelablePromise<{ - result: { - domain: string; - }; - }> { +result: { +domain: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/auth', @@ -348,19 +346,19 @@ export class ConfigurationService { /** * Update auth configuration * Update auth configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateAuthConfiguration( - requestBody: { - domain: string; - }, - ): CancelablePromise<{ - result: { - domain: string; - }; - }> { +requestBody: { +domain: string; +}, +): CancelablePromise<{ +result: { +domain: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/auth', @@ -381,13 +379,13 @@ export class ConfigurationService { * @throws ApiError */ public getBackendWalletBalanceConfiguration(): CancelablePromise<{ - result: { - /** - * Minimum wallet balance in wei - */ - minWalletBalance: string; - }; - }> { +result: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/backend-wallet-balance', @@ -402,25 +400,25 @@ export class ConfigurationService { /** * Update backend wallet balance configuration * Update backend wallet balance configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateBackendWalletBalanceConfiguration( - requestBody?: { - /** - * Minimum wallet balance in wei - */ - minWalletBalance?: string; - }, - ): CancelablePromise<{ - result: { - /** - * Minimum wallet balance in wei - */ - minWalletBalance: string; - }; - }> { +requestBody?: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance?: string; +}, +): CancelablePromise<{ +result: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/backend-wallet-balance', @@ -441,8 +439,8 @@ export class ConfigurationService { * @throws ApiError */ public getCorsConfiguration(): CancelablePromise<{ - result: Array; - }> { +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/cors', @@ -457,17 +455,17 @@ export class ConfigurationService { /** * Add a CORS URL * Add a URL to allow client-side calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public addUrlToCorsConfiguration( - requestBody: { - urlsToAdd: Array; - }, - ): CancelablePromise<{ - result: Array; - }> { +requestBody: { +urlsToAdd: Array; +}, +): CancelablePromise<{ +result: Array; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/cors', @@ -484,17 +482,17 @@ export class ConfigurationService { /** * Remove CORS URLs * Remove URLs from CORS configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public removeUrlToCorsConfiguration( - requestBody: { - urlsToRemove: Array; - }, - ): CancelablePromise<{ - result: Array; - }> { +requestBody: { +urlsToRemove: Array; +}, +): CancelablePromise<{ +result: Array; +}> { return this.httpRequest.request({ method: 'DELETE', url: '/configuration/cors', @@ -511,17 +509,17 @@ export class ConfigurationService { /** * Set CORS URLs * Replaces the CORS URLs to allow client-side calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public setUrlsToCorsConfiguration( - requestBody: { - urls: Array; - }, - ): CancelablePromise<{ - result: Array; - }> { +requestBody: { +urls: Array; +}, +): CancelablePromise<{ +result: Array; +}> { return this.httpRequest.request({ method: 'PUT', url: '/configuration/cors', @@ -542,10 +540,10 @@ export class ConfigurationService { * @throws ApiError */ public getCacheConfiguration(): CancelablePromise<{ - result: { - clearCacheCronSchedule: string; - }; - }> { +result: { +clearCacheCronSchedule: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/cache', @@ -560,22 +558,22 @@ export class ConfigurationService { /** * Update cache configuration * Update cache configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateCacheConfiguration( - requestBody: { - /** - * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 - */ - clearCacheCronSchedule: string; - }, - ): CancelablePromise<{ - result: { - clearCacheCronSchedule: string; - }; - }> { +requestBody: { +/** + * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 + */ +clearCacheCronSchedule: string; +}, +): CancelablePromise<{ +result: { +clearCacheCronSchedule: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/cache', @@ -596,11 +594,11 @@ export class ConfigurationService { * @throws ApiError */ public getContractSubscriptionsConfiguration(): CancelablePromise<{ - result: { - maxBlocksToIndex: number; - contractSubscriptionsRequeryDelaySeconds: string; - }; - }> { +result: { +maxBlocksToIndex: number; +contractSubscriptionsRequeryDelaySeconds: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/contract-subscriptions', @@ -615,21 +613,24 @@ export class ConfigurationService { /** * Update Contract Subscriptions configuration * Update the configuration for Contract Subscriptions - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateContractSubscriptionsConfiguration( - requestBody?: { - maxBlocksToIndex?: number; - contractSubscriptionsRequeryDelaySeconds?: string; - }, - ): CancelablePromise<{ - result: { - maxBlocksToIndex: number; - contractSubscriptionsRequeryDelaySeconds: string; - }; - }> { +requestBody?: { +maxBlocksToIndex?: number; +/** + * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after 2s and 10s. + */ +contractSubscriptionsRequeryDelaySeconds?: string; +}, +): CancelablePromise<{ +result: { +maxBlocksToIndex: number; +contractSubscriptionsRequeryDelaySeconds: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/configuration/contract-subscriptions', @@ -650,8 +651,8 @@ export class ConfigurationService { * @throws ApiError */ public getIpAllowlist(): CancelablePromise<{ - result: Array; - }> { +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/configuration/ip-allowlist', @@ -666,20 +667,20 @@ export class ConfigurationService { /** * Set IP Allowlist * Replaces the IP Allowlist array to allow calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public setIpAllowlist( - requestBody: { - /** - * Array of IP addresses to allowlist - */ - ips: Array; - }, - ): CancelablePromise<{ - result: Array; - }> { +requestBody: { +/** + * Array of IP addresses to allowlist + */ +ips: Array; +}, +): CancelablePromise<{ +result: Array; +}> { return this.httpRequest.request({ method: 'PUT', url: '/configuration/ip-allowlist', diff --git a/sdk/src/services/ContractEventsService.ts b/sdk/src/services/ContractEventsService.ts index 276932408..1cc310498 100644 --- a/sdk/src/services/ContractEventsService.ts +++ b/sdk/src/services/ContractEventsService.ts @@ -12,23 +12,23 @@ export class ContractEventsService { /** * Get all events * Get a list of all blockchain events for this contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param fromBlock - * @param toBlock - * @param order + * @param fromBlock + * @param toBlock + * @param order * @returns any Default Response * @throws ApiError */ public getAllEvents( - chain: string, - contractAddress: string, - fromBlock?: (number | string), - toBlock?: (number | string), - order?: ('asc' | 'desc'), - ): CancelablePromise<{ - result: Array>; - }> { +chain: string, +contractAddress: string, +fromBlock?: (number | string), +toBlock?: (number | string), +order?: ('asc' | 'desc'), +): CancelablePromise<{ +result: Array>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/events/get-all', @@ -52,25 +52,25 @@ export class ContractEventsService { /** * Get events * Get a list of specific blockchain events emitted from this contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks * @returns any Default Response * @throws ApiError */ public getEvents( - chain: string, - contractAddress: string, - requestBody: { - eventName: string; - fromBlock?: (number | string); - toBlock?: (number | string); - order?: ('asc' | 'desc'); - filters?: any; - }, - ): CancelablePromise<{ - result: Array>; - }> { +chain: string, +contractAddress: string, +requestBody: { +eventName: string; +fromBlock?: (number | string); +toBlock?: (number | string); +order?: ('asc' | 'desc'); +filters?: any; +}, +): CancelablePromise<{ +result: Array>; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/events/get', diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index 4fd15e17b..b614050ee 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -12,43 +12,43 @@ export class ContractMetadataService { /** * Get ABI * Get the ABI of a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAbi( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - type: string; - name?: string; - inputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - stateMutability?: string; - }>; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +type: string; +name?: string; +inputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +stateMutability?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/abi', @@ -67,42 +67,42 @@ export class ContractMetadataService { /** * Get events * Get details of all events implemented by a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getEvents( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - name: string; - inputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - comment?: string; - }>; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +name: string; +inputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +comment?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/events', @@ -121,20 +121,20 @@ export class ContractMetadataService { /** * Get extensions * Get all detected extensions for a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getExtensions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * Array of detected extension names - */ - result: Array; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * Array of detected extension names + */ +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/extensions', @@ -153,44 +153,44 @@ export class ContractMetadataService { /** * Get functions * Get details of all functions implemented by the contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getFunctions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - name: string; - inputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - comment?: string; - signature: string; - stateMutability: string; - }>; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +name: string; +inputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +comment?: string; +signature: string; +stateMutability: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/functions', diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index e840a305a..8a141e947 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -13,18 +13,18 @@ export class ContractRolesService { * Get wallets for role * Get all wallets with a specific role for a contract. * @param role The role to list wallet members - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getRole( - role: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array; - }> { +role: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/roles/get', @@ -46,27 +46,27 @@ export class ContractRolesService { /** * Get wallets for all roles * Get all wallets in each role for a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - admin: Array; - transfer: Array; - minter: Array; - pauser: Array; - lister: Array; - asset: Array; - unwrap: Array; - factory: Array; - signer: Array; - }; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +admin: Array; +transfer: Array; +minter: Array; +pauser: Array; +lister: Array; +asset: Array; +unwrap: Array; +factory: Array; +signer: Array; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/roles/get-all', @@ -85,67 +85,67 @@ export class ContractRolesService { /** * Grant role * Grant a role to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public grant( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The role to grant - */ - role: string; - /** - * The address to grant the role to - */ - address: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The role to grant + */ +role: string; +/** + * The address to grant the role to + */ +address: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/roles/grant', @@ -176,67 +176,67 @@ export class ContractRolesService { /** * Revoke role * Revoke a role from a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revoke( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The role to revoke - */ - role: string; - /** - * The address to revoke the role from - */ - address: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The role to revoke + */ +role: string; +/** + * The address to revoke the role from + */ +address: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/roles/revoke', diff --git a/sdk/src/services/ContractRoyaltiesService.ts b/sdk/src/services/ContractRoyaltiesService.ts index f60c24986..e7f8ec92f 100644 --- a/sdk/src/services/ContractRoyaltiesService.ts +++ b/sdk/src/services/ContractRoyaltiesService.ts @@ -12,26 +12,26 @@ export class ContractRoyaltiesService { /** * Get royalty details * Gets the royalty recipient and BPS (basis points) of the smart contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getDefaultRoyaltyInfo( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - }; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info', @@ -50,28 +50,28 @@ export class ContractRoyaltiesService { /** * Get token royalty details * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. - * @param tokenId - * @param chain Chain ID or name + * @param tokenId + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getTokenRoyaltyInfo( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - }; - }> { +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}', @@ -91,67 +91,67 @@ export class ContractRoyaltiesService { /** * Set royalty details * Set the royalty recipient and fee for the smart contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setDefaultRoyaltyInfo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info', @@ -182,71 +182,71 @@ export class ContractRoyaltiesService { /** * Set token royalty details * Set the royalty recipient and fee for a particular token in the contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setTokenRoyaltyInfo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - /** - * The token ID to set the royalty info for. - */ - token_id: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +/** + * The token ID to set the royalty info for. + */ +token_id: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info', diff --git a/sdk/src/services/ContractService.ts b/sdk/src/services/ContractService.ts index a7109ef70..da8876320 100644 --- a/sdk/src/services/ContractService.ts +++ b/sdk/src/services/ContractService.ts @@ -13,20 +13,20 @@ export class ContractService { * Read from contract * Call a read function on a contract. * @param functionName Name of the function to call on Contract - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param args Arguments for the function. Comma Separated * @returns any Default Response * @throws ApiError */ public read( - functionName: string, - chain: string, - contractAddress: string, - args?: string, - ): CancelablePromise<{ - result: any; - }> { +functionName: string, +chain: string, +contractAddress: string, +args?: string, +): CancelablePromise<{ +result: any; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/read', @@ -49,94 +49,94 @@ export class ContractService { /** * Write to contract * Call a write function on a contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public write( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The function to call on the contract - */ - functionName: string; - /** - * The arguments to call on the function - */ - args: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - abi?: Array<{ - type: string; - name?: string; - inputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - stateMutability?: string; - }>; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The function to call on the contract. It is highly recommended to provide a full function signature, such as "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. + */ +functionName: string; +/** + * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects + */ +args: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +abi?: Array<{ +type: string; +name?: string; +inputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +stateMutability?: string; +}>; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/write', diff --git a/sdk/src/services/ContractSubscriptionsService.ts b/sdk/src/services/ContractSubscriptionsService.ts index cfa357f5b..93120f56d 100644 --- a/sdk/src/services/ContractSubscriptionsService.ts +++ b/sdk/src/services/ContractSubscriptionsService.ts @@ -16,29 +16,29 @@ export class ContractSubscriptionsService { * @throws ApiError */ public getContractSubscriptions(): CancelablePromise<{ - result: Array<{ - id: string; - chainId: number; - /** - * A contract or wallet address - */ - contractAddress: string; - webhook?: { - url: string; - name: (string | null); - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - id: number; - }; - processEventLogs: boolean; - filterEvents: Array; - processTransactionReceipts: boolean; - filterFunctions: Array; - createdAt: string; - }>; - }> { +result: Array<{ +id: string; +chainId: number; +/** + * A contract or wallet address + */ +contractAddress: string; +webhook?: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +processEventLogs: boolean; +filterEvents: Array; +processTransactionReceipts: boolean; +filterFunctions: Array; +createdAt: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract-subscriptions/get-all', @@ -53,65 +53,65 @@ export class ContractSubscriptionsService { /** * Add contract subscription * Subscribe to event logs and transaction receipts for a contract. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public addContractSubscription( - requestBody: { - /** - * The chain for the contract. - */ - chain: string; - /** - * The address for the contract. - */ - contractAddress: string; - /** - * Webhook URL - */ - webhookUrl?: string; - /** - * If true, parse event logs for this contract. - */ - processEventLogs: boolean; - /** - * A case-sensitive list of event names to filter event logs. Parses all event logs by default. - */ - filterEvents?: Array; - /** - * If true, parse transaction receipts for this contract. - */ - processTransactionReceipts: boolean; - /** - * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. - */ - filterFunctions?: Array; - }, - ): CancelablePromise<{ - result: { - id: string; - chainId: number; - /** - * A contract or wallet address - */ - contractAddress: string; - webhook?: { - url: string; - name: (string | null); - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - id: number; - }; - processEventLogs: boolean; - filterEvents: Array; - processTransactionReceipts: boolean; - filterFunctions: Array; - createdAt: string; - }; - }> { +requestBody: { +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * The address for the contract. + */ +contractAddress: string; +/** + * Webhook URL + */ +webhookUrl?: string; +/** + * If true, parse event logs for this contract. + */ +processEventLogs: boolean; +/** + * A case-sensitive list of event names to filter event logs. Parses all event logs by default. + */ +filterEvents?: Array; +/** + * If true, parse transaction receipts for this contract. + */ +processTransactionReceipts: boolean; +/** + * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. + */ +filterFunctions?: Array; +}, +): CancelablePromise<{ +result: { +id: string; +chainId: number; +/** + * A contract or wallet address + */ +contractAddress: string; +webhook?: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +processEventLogs: boolean; +filterEvents: Array; +processTransactionReceipts: boolean; +filterFunctions: Array; +createdAt: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract-subscriptions/add', @@ -128,22 +128,22 @@ export class ContractSubscriptionsService { /** * Remove contract subscription * Remove an existing contract subscription - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public removeContractSubscription( - requestBody: { - /** - * The ID for an existing contract subscription. - */ - contractSubscriptionId: string; - }, - ): CancelablePromise<{ - result: { - status: string; - }; - }> { +requestBody: { +/** + * The ID for an existing contract subscription. + */ +contractSubscriptionId: string; +}, +): CancelablePromise<{ +result: { +status: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract-subscriptions/remove', @@ -160,26 +160,29 @@ export class ContractSubscriptionsService { /** * Get subscribed contract indexed block range * Gets the subscribed contract's indexed block range - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getContractIndexedBlockRange( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - chain: string; - /** - * A contract or wallet address - */ - contractAddress: string; - fromBlock: number; - toBlock: number; - status: string; - }; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * A contract or wallet address + */ +contractAddress: string; +fromBlock: number; +toBlock: number; +status: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks', @@ -198,18 +201,18 @@ export class ContractSubscriptionsService { /** * Get last processed block * Get the last processed block for a chain. - * @param chain Chain name or ID + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @returns any Default Response * @throws ApiError */ public getLatestBlock( - chain: string, - ): CancelablePromise<{ - result: { - lastBlock: number; - status: string; - }; - }> { +chain: string, +): CancelablePromise<{ +result: { +lastBlock: number; +status: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract-subscriptions/last-block', diff --git a/sdk/src/services/DefaultService.ts b/sdk/src/services/DefaultService.ts index 1f2aac2a7..54389d7a7 100644 --- a/sdk/src/services/DefaultService.ts +++ b/sdk/src/services/DefaultService.ts @@ -31,4 +31,15 @@ export class DefaultService { }); } + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson1(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/json/', + }); + } + } diff --git a/sdk/src/services/DeployService.ts b/sdk/src/services/DeployService.ts index 19ac25673..f343f5a31 100644 --- a/sdk/src/services/DeployService.ts +++ b/sdk/src/services/DeployService.ts @@ -12,82 +12,82 @@ export class DeployService { /** * Deploy Edition * Deploy an Edition contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployEdition( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/edition', @@ -114,83 +114,83 @@ export class DeployService { /** * Deploy Edition Drop * Deploy an Edition Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployEditionDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/edition-drop', @@ -217,78 +217,78 @@ export class DeployService { /** * Deploy Marketplace * Deploy a Marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployMarketplaceV3( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/marketplace-v3', @@ -315,79 +315,79 @@ export class DeployService { /** * Deploy Multiwrap * Deploy a Multiwrap contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployMultiwrap( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/multiwrap', @@ -414,82 +414,82 @@ export class DeployService { /** * Deploy NFT Collection * Deploy an NFT Collection contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployNftCollection( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/nft-collection', @@ -516,83 +516,83 @@ export class DeployService { /** * Deploy NFT Drop * Deploy an NFT Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployNftDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/nft-drop', @@ -619,81 +619,81 @@ export class DeployService { /** * Deploy Pack * Deploy a Pack contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployPack( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/pack', @@ -720,83 +720,83 @@ export class DeployService { /** * Deploy Signature Drop * Deploy a Signature Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deploySignatureDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/signature-drop', @@ -823,83 +823,83 @@ export class DeployService { /** * Deploy Split * Deploy a Split contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deploySplit( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - recipients: Array<{ - /** - * A contract or wallet address - */ - address: string; - sharesBps: number; - }>; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +recipients: Array<{ +/** + * A contract or wallet address + */ +address: string; +sharesBps: number; +}>; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/split', @@ -926,80 +926,80 @@ export class DeployService { /** * Deploy Token * Deploy a Token contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployToken( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/token', @@ -1026,81 +1026,81 @@ export class DeployService { /** * Deploy Token Drop * Deploy a Token Drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployTokenDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/token-drop', @@ -1127,84 +1127,84 @@ export class DeployService { /** * Deploy Vote * Deploy a Vote contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployVote( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - voting_delay_in_blocks: number; - voting_period_in_blocks: number; - /** - * A contract or wallet address - */ - voting_token_address: string; - voting_quorum_fraction: number; - proposal_token_threshold: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +voting_delay_in_blocks: number; +voting_period_in_blocks: number; +/** + * A contract or wallet address + */ +voting_token_address: string; +voting_quorum_fraction: number; +proposal_token_threshold: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/vote', @@ -1231,74 +1231,74 @@ export class DeployService { /** * Deploy published contract * Deploy a published contract to the blockchain. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param publisher Address or ENS of the publisher of the contract * @param contractName Name of the published contract to deploy * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployPublished( - chain: string, - publisher: string, - contractName: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: 'zksolc'; - compilerVersion?: string; - evmVersion?: string; - }; - /** - * Constructor arguments for the deployment. - */ - constructorParams: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - queueId?: string; - /** - * Not all contracts return a deployed address. - */ - deployedAddress?: string; - message?: string; - }> { +chain: string, +publisher: string, +contractName: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +/** + * Constructor arguments for the deployment. + */ +constructorParams: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +queueId?: string; +/** + * Not all contracts return a deployed address. + */ +deployedAddress?: string; +message?: string; +}> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/{publisher}/{contractName}', @@ -1331,8 +1331,8 @@ export class DeployService { * @throws ApiError */ public contractTypes(): CancelablePromise<{ - result: Array; - }> { +result: Array; +}> { return this.httpRequest.request({ method: 'GET', url: '/deploy/contract-types', diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index b9e834913..03d8196af 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -13,24 +13,24 @@ export class Erc1155Service { * Get details * Get the details for a token in an ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public get( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }; - }> { +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get', @@ -52,7 +52,7 @@ export class Erc1155Service { /** * Get all details * Get details for all tokens in an ERC-1155 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param start The start token ID for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. @@ -60,19 +60,19 @@ export class Erc1155Service { * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - start?: number, - count?: number, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }>; - }> { +chain: string, +contractAddress: string, +start?: number, +count?: number, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get-all', @@ -96,24 +96,24 @@ export class Erc1155Service { * Get owned tokens * Get all tokens in an ERC-1155 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public getOwned( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }>; - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get-owned', @@ -137,19 +137,19 @@ export class Erc1155Service { * Get the balance of a specific wallet address for this ERC-1155 contract. * @param walletAddress Address of the wallet to check NFT balance * @param tokenId The tokenId of the NFT to check balance of - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public balanceOf( - walletAddress: string, - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +walletAddress: string, +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/balance-of', @@ -174,19 +174,19 @@ export class Erc1155Service { * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public isApproved( - ownerWallet: string, - operator: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: boolean; - }> { +ownerWallet: string, +operator: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/is-approved', @@ -209,17 +209,17 @@ export class Erc1155Service { /** * Get total supply * Get the total supply in circulation for this ERC-1155 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public totalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/total-count', @@ -239,18 +239,18 @@ export class Erc1155Service { * Get total supply * Get the total supply in circulation for this ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ public totalSupply( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/total-supply', @@ -272,255 +272,261 @@ export class Erc1155Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public signatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: ({ - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps?: number; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: (string | number); - mintEndTime?: (string | number); - } | ({ - contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); - to: string; - quantity: string; - royaltyRecipient?: string; - royaltyBps?: number; - primarySaleRecipient?: string; - pricePerToken?: string; - pricePerTokenWei?: string; - currency?: string; - validityStartTimestamp: number; - validityEndTimestamp?: number; - uid?: string; - } & ({ - metadata: ({ - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - } | string); - } | { - tokenId: string; - }))), - ): CancelablePromise<{ - result: ({ - payload: { - uri: string; - tokenId: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } | { - payload: { - to: string; - royaltyRecipient: string; - royaltyBps: string; - primarySaleRecipient: string; - tokenId: string; - uri: string; - quantity: string; - pricePerToken: string; - currency: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }); - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps?: number; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | ({ +contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); +to: string; +quantity: string; +royaltyRecipient?: string; +royaltyBps?: number; +primarySaleRecipient?: string; +/** + * An amount in native token (decimals allowed). Example: "0.1" + */ +pricePerToken?: string; +/** + * An amount in wei (no decimals). Example: "50000000000" + */ +pricePerTokenWei?: string; +currency?: string; +validityStartTimestamp: number; +validityEndTimestamp?: number; +uid?: string; +} & ({ +metadata: ({ +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +} | string); +} | { +tokenId: string; +}))), +): CancelablePromise<{ +result: ({ +payload: { +uri: string; +tokenId: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +to: string; +royaltyRecipient: string; +royaltyBps: string; +primarySaleRecipient: string; +tokenId: string; +uri: string; +quantity: string; +pricePerToken: string; +currency: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/signature/generate', @@ -551,21 +557,21 @@ export class Erc1155Service { * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. * @param tokenId The token ID of the NFT you want to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ public canClaim( - quantity: string, - tokenId: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { +quantity: string, +tokenId: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim', @@ -590,47 +596,47 @@ export class Erc1155Service { * Get currently active claim phase for a specific token ID. * Retrieve the currently active claim phase for a specific token ID, if any. * @param tokenId The token ID of the NFT you want to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getActiveClaimConditions( - tokenId: (string | number), - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }; - }> { +tokenId: (string | number), +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active', @@ -654,47 +660,47 @@ export class Erc1155Service { * Get all the claim phases configured for a specific token ID. * Get all the claim phases configured for a specific token ID. * @param tokenId The token ID of the NFT you want to get the claim conditions for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getAllClaimConditions( - tokenId: (string | number), - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }>; - }> { +tokenId: (string | number), +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all', @@ -719,31 +725,31 @@ export class Erc1155Service { * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param tokenId The token ID of the NFT you want to get the claimer proofs for. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getClaimerProofs( - tokenId: (string | number), - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: (null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }); - }> { +tokenId: (string | number), +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs', @@ -768,21 +774,21 @@ export class Erc1155Service { * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ public getClaimIneligibilityReasons( - tokenId: (string | number), - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; - }> { +tokenId: (string | number), +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons', @@ -806,73 +812,73 @@ export class Erc1155Service { /** * Airdrop tokens * Airdrop ERC-1155 tokens to specific wallets. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public airdrop( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID of the NFT to airdrop - */ - tokenId: string; - /** - * Addresses and quantities to airdrop to - */ - addresses: Array<{ - /** - * A contract or wallet address - */ - address: string; - quantity: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID of the NFT to airdrop + */ +tokenId: string; +/** + * Addresses and quantities to airdrop to + */ +addresses: Array<{ +/** + * A contract or wallet address + */ +address: string; +quantity: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/airdrop', @@ -903,67 +909,67 @@ export class Erc1155Service { /** * Burn token * Burn ERC-1155 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The token ID to burn - */ - tokenId: string; - /** - * The amount of tokens to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The token ID to burn + */ +tokenId: string; +/** + * The amount of tokens to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/burn', @@ -994,61 +1000,61 @@ export class Erc1155Service { /** * Burn tokens (batch) * Burn a batch of ERC-1155 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public burnBatch( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - tokenIds: Array; - amounts: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +tokenIds: Array; +amounts: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/burn-batch', @@ -1079,71 +1085,71 @@ export class Erc1155Service { /** * Claim tokens to wallet * Claim ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public claimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to claim the NFT to - */ - receiver: string; - /** - * Token ID of the NFT to claim - */ - tokenId: string; - /** - * Quantity of NFTs to mint - */ - quantity: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to claim the NFT to + */ +receiver: string; +/** + * Token ID of the NFT to claim + */ +tokenId: string; +/** + * Quantity of NFTs to mint + */ +quantity: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-to', @@ -1174,93 +1180,93 @@ export class Erc1155Service { /** * Lazy mint * Lazy mint ERC-1155 tokens to be claimed in the future. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public lazyMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - metadatas: Array<({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string)>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/lazy-mint', @@ -1291,71 +1297,71 @@ export class Erc1155Service { /** * Mint additional supply * Mint additional supply of ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintAdditionalSupplyTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - /** - * Token ID to mint additional supply to - */ - tokenId: string; - /** - * The amount of supply to mint - */ - additionalSupply: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +/** + * Token ID to mint additional supply to + */ +tokenId: string; +/** + * The amount of supply to mint + */ +additionalSupply: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to', @@ -1386,100 +1392,100 @@ export class Erc1155Service { /** * Mint tokens (batch) * Mint ERC-1155 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadataWithSupply: Array<{ - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - supply: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadataWithSupply: Array<{ +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +supply: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-batch-to', @@ -1510,100 +1516,100 @@ export class Erc1155Service { /** * Mint tokens * Mint ERC-1155 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadataWithSupply: { - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - supply: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadataWithSupply: { +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +supply: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-to', @@ -1634,67 +1640,67 @@ export class Erc1155Service { /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setApprovalForAll( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * whether to approve or revoke approval - */ - approved: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * whether to approve or revoke approval + */ +approved: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all', @@ -1725,75 +1731,75 @@ export class Erc1155Service { /** * Transfer token * Transfer an ERC-1155 token from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - /** - * A valid hex string - */ - data?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +/** + * A valid hex string + */ +data?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/transfer', @@ -1824,79 +1830,79 @@ export class Erc1155Service { /** * Transfer token from wallet * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - from: string; - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - /** - * A valid hex string - */ - data?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +from: string; +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +/** + * A valid hex string + */ +data?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/transfer-from', @@ -1927,141 +1933,141 @@ export class Erc1155Service { /** * Signature mint * Mint ERC-1155 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public signatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: { - uri: string; - tokenId: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: { +uri: string; +tokenId: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/signature/mint', @@ -2092,80 +2098,80 @@ export class Erc1155Service { /** * Overwrite the claim conditions for a specific token ID.. * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * ID of the token to set the claim conditions for - */ - tokenId: (string | number); - claimConditionInputs: Array<{ - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * ID of the token to set the claim conditions for + */ +tokenId: (string | number); +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set', @@ -2196,82 +2202,82 @@ export class Erc1155Service { /** * Overwrite the claim conditions for a specific token ID.. * Allows you to set claim conditions for multiple token IDs in a single transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public claimConditionsUpdate( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionsForToken: Array<{ - /** - * ID of the token to set the claim conditions for - */ - tokenId: (string | number); - claimConditions: Array<{ - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }>; - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionsForToken: Array<{ +/** + * ID of the token to set the claim conditions for + */ +tokenId: (string | number); +claimConditions: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch', @@ -2302,83 +2308,83 @@ export class Erc1155Service { /** * Update a single claim phase. * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update claim phase for - */ - tokenId: (string | number); - claimConditionInput: { - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update claim phase for + */ +tokenId: (string | number); +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update', @@ -2409,97 +2415,97 @@ export class Erc1155Service { /** * Update token metadata * Update the metadata for an ERC1155 token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateTokenMetadata( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update metadata - */ - tokenId: string; - metadata: { - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update metadata + */ +tokenId: string; +metadata: { +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/token/update', diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index 7e3fdd9f3..b6cdca558 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -14,31 +14,31 @@ export class Erc20Service { * Get the allowance of a specific wallet for an ERC-20 contract. * @param ownerWallet Address of the wallet who owns the funds * @param spenderWallet Address of the wallet to check token allowance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ public allowanceOf( - ownerWallet: string, - spenderWallet: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { +ownerWallet: string, +spenderWallet: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/allowance-of', @@ -62,30 +62,30 @@ export class Erc20Service { * Get token balance * Get the balance of a specific wallet address for this ERC-20 contract. * @param walletAddress Address of the wallet to check token balance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ public balanceOf( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/balance-of', @@ -107,21 +107,21 @@ export class Erc20Service { /** * Get token details * Get details for this ERC-20 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ public get( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - }; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/get', @@ -140,29 +140,29 @@ export class Erc20Service { /** * Get total supply * Get the total supply in circulation for this ERC-20 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ public totalSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/total-supply', @@ -181,125 +181,125 @@ export class Erc20Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public signatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: ({ - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: (string | number); - mintEndTime?: (string | number); - } | ({ - to: string; - primarySaleRecipient?: string; - price?: string; - priceInWei?: string; - currency?: string; - validityStartTimestamp: number; - validityEndTimestamp?: number; - uid?: string; - } & ({ - quantity: string; - } | { - quantityWei: string; - }))), - ): CancelablePromise<{ - result: ({ - payload: { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } | { - payload: { - to: string; - primarySaleRecipient: string; - quantity: string; - price: string; - currency: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }); - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | ({ +to: string; +primarySaleRecipient?: string; +price?: string; +priceInWei?: string; +currency?: string; +validityStartTimestamp: number; +validityEndTimestamp?: number; +uid?: string; +} & ({ +quantity: string; +} | { +quantityWei: string; +}))), +): CancelablePromise<{ +result: ({ +payload: { +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +to: string; +primarySaleRecipient: string; +quantity: string; +price: string; +currency: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/signature/generate', @@ -329,20 +329,20 @@ export class Erc20Service { * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ public canClaim( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim', @@ -365,46 +365,46 @@ export class Erc20Service { /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getActiveClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }; - }> { +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active', @@ -426,46 +426,46 @@ export class Erc20Service { /** * Get all the claim phases configured. * Get all the claim phases configured on the drop contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getAllClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }>; - }> { +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all', @@ -488,20 +488,20 @@ export class Erc20Service { * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ public claimConditionsGetClaimIneligibilityReasons( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; - }> { +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons', @@ -525,30 +525,30 @@ export class Erc20Service { * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public claimConditionsGetClaimerProofs( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: (null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }); - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs', @@ -570,67 +570,67 @@ export class Erc20Service { /** * Set allowance * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setAllowance( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to allow transfers from - */ - spenderAddress: string; - /** - * The number of tokens to give as allowance - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to allow transfers from + */ +spenderAddress: string; +/** + * The number of tokens to give as allowance + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/set-allowance', @@ -661,67 +661,67 @@ export class Erc20Service { /** * Transfer tokens * Transfer ERC-20 tokens from the caller wallet to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - toAddress: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +toAddress: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/transfer', @@ -752,71 +752,71 @@ export class Erc20Service { /** * Transfer tokens from wallet * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - fromAddress: string; - /** - * The recipient address. - */ - toAddress: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +fromAddress: string; +/** + * The recipient address. + */ +toAddress: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/transfer-from', @@ -847,63 +847,63 @@ export class Erc20Service { /** * Burn token * Burn ERC-20 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The amount of tokens you want to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The amount of tokens you want to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/burn', @@ -934,67 +934,67 @@ export class Erc20Service { /** * Burn token from wallet * Burn ERC-20 tokens in a specific wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public burnFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet sending the tokens - */ - holderAddress: string; - /** - * The amount of this token you want to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet sending the tokens + */ +holderAddress: string; +/** + * The amount of this token you want to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/burn-from', @@ -1025,67 +1025,67 @@ export class Erc20Service { /** * Claim tokens to wallet * Claim ERC-20 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public claimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The wallet address to receive the claimed tokens. - */ - recipient: string; - /** - * The amount of tokens to claim. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The wallet address to receive the claimed tokens. + */ +recipient: string; +/** + * The amount of tokens to claim. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-to', @@ -1116,69 +1116,69 @@ export class Erc20Service { /** * Mint tokens (batch) * Mint ERC-20 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - data: Array<{ - /** - * The address to mint tokens to - */ - toAddress: string; - /** - * The number of tokens to mint to the specific address. - */ - amount: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +data: Array<{ +/** + * The address to mint tokens to + */ +toAddress: string; +/** + * The number of tokens to mint to the specific address. + */ +amount: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/mint-batch-to', @@ -1209,67 +1209,67 @@ export class Erc20Service { /** * Mint tokens * Mint ERC-20 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint tokens to - */ - toAddress: string; - /** - * The amount of tokens you want to send - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint tokens to + */ +toAddress: string; +/** + * The amount of tokens you want to send + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/mint-to', @@ -1300,97 +1300,97 @@ export class Erc20Service { /** * Signature mint * Mint ERC-20 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public signatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: { +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/signature/mint', @@ -1421,76 +1421,76 @@ export class Erc20Service { /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInputs: Array<{ - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/set', @@ -1521,79 +1521,79 @@ export class Erc20Service { /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInput: { - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/update', diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 3fcf716dd..9c91c9b67 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -13,24 +13,24 @@ export class Erc721Service { * Get details * Get the details for a token in an ERC-721 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public get( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }; - }> { +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get', @@ -52,7 +52,7 @@ export class Erc721Service { /** * Get all details * Get details for all tokens in an ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param start The start token id for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. @@ -60,19 +60,19 @@ export class Erc721Service { * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - start?: number, - count?: number, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }>; - }> { +chain: string, +contractAddress: string, +start?: number, +count?: number, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get-all', @@ -96,24 +96,24 @@ export class Erc721Service { * Get owned tokens * Get all tokens in an ERC-721 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getOwned( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: ('ERC1155' | 'ERC721' | 'metaplex'); - supply: string; - quantityOwned?: string; - }>; - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get-owned', @@ -136,18 +136,18 @@ export class Erc721Service { * Get token balance * Get the balance of a specific wallet address for this ERC-721 contract. * @param walletAddress Address of the wallet to check NFT balance - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address * @returns any Default Response * @throws ApiError */ public balanceOf( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/balance-of', @@ -171,19 +171,19 @@ export class Erc721Service { * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public isApproved( - ownerWallet: string, - operator: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: boolean; - }> { +ownerWallet: string, +operator: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/is-approved', @@ -206,17 +206,17 @@ export class Erc721Service { /** * Get total supply * Get the total supply in circulation for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public totalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-count', @@ -235,17 +235,17 @@ export class Erc721Service { /** * Get claimed supply * Get the claimed supply for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public totalClaimedSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-claimed-supply', @@ -264,17 +264,17 @@ export class Erc721Service { /** * Get unclaimed supply * Get the unclaimed supply for this ERC-721 contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public totalUnclaimedSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply', @@ -294,20 +294,20 @@ export class Erc721Service { * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ public canClaim( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim', @@ -330,46 +330,46 @@ export class Erc721Service { /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getActiveClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }; - }> { +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active', @@ -391,46 +391,46 @@ export class Erc721Service { /** * Get all the claim phases configured for the drop. * Get all the claim phases configured for the drop. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ public getAllClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: (string | number); - startTime: string; - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash: (string | Array); - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: (null | Array); - }>; - }> { +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all', @@ -453,20 +453,20 @@ export class Erc721Service { * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ public getClaimIneligibilityReasons( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; - }> { +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons', @@ -490,30 +490,30 @@ export class Erc721Service { * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getClaimerProofs( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: (null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }); - }> { +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs', @@ -535,67 +535,67 @@ export class Erc721Service { /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setApprovalForAll( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * whether to approve or revoke approval - */ - approved: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * whether to approve or revoke approval + */ +approved: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-all', @@ -626,67 +626,67 @@ export class Erc721Service { /** * Set approval for token * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setApprovalForToken( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * the tokenId to give approval for - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * the tokenId to give approval for + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-token', @@ -717,67 +717,67 @@ export class Erc721Service { /** * Transfer token * Transfer an ERC-721 token from the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/transfer', @@ -808,71 +808,71 @@ export class Erc721Service { /** * Transfer token from wallet * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public transferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - from: string; - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +from: string; +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/transfer-from', @@ -903,97 +903,97 @@ export class Erc721Service { /** * Mint tokens * Mint ERC-721 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/mint-to', @@ -1024,97 +1024,97 @@ export class Erc721Service { /** * Mint tokens (batch) * Mint ERC-721 tokens to multiple wallets in one transaction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public mintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadatas: Array<({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string)>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/mint-batch-to', @@ -1145,63 +1145,63 @@ export class Erc721Service { /** * Burn token * Burn ERC-721 tokens in the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The token ID to burn - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The token ID to burn + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/burn', @@ -1232,93 +1232,93 @@ export class Erc721Service { /** * Lazy mint * Lazy mint ERC-721 tokens to be claimed in the future. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public lazyMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - metadatas: Array<({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string)>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/lazy-mint', @@ -1349,67 +1349,67 @@ export class Erc721Service { /** * Claim tokens to wallet * Claim ERC-721 tokens to a specific wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public claimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to claim the NFT to - */ - receiver: string; - /** - * Quantity of NFTs to mint - */ - quantity: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to claim the NFT to + */ +receiver: string; +/** + * Quantity of NFTs to mint + */ +quantity: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-to', @@ -1440,280 +1440,280 @@ export class Erc721Service { /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public signatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: ({ - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient?: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps?: number; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: (string | number); - mintEndTime?: (string | number); - } | { - metadata: (string | { - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - }); - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The amount of the "currency" token this token costs. Example: "0.1" - */ - price?: string; - /** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ - priceInWei?: string; - /** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ - currency?: string; - /** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ - primarySaleRecipient?: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ - royaltyBps?: number; - /** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ - validityStartTimestamp?: number; - /** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ - validityEndTimestamp?: number; - /** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ - uid?: string; - }), - ): CancelablePromise<{ - result: ({ - payload: { - uri: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } | { - payload: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }); - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient?: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps?: number; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | { +metadata: (string | { +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +}); +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The amount of the "currency" token this token costs. Example: "0.1" + */ +price?: string; +/** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ +priceInWei?: string; +/** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ +currency?: string; +/** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ +primarySaleRecipient?: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ +royaltyBps?: number; +/** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ +validityStartTimestamp?: number; +/** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ +validityEndTimestamp?: number; +/** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ +uid?: string; +}), +): CancelablePromise<{ +result: ({ +payload: { +uri: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/generate', @@ -1742,154 +1742,154 @@ export class Erc721Service { /** * Signature mint * Mint ERC-721 tokens from a generated signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public signatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: ({ - uri: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: ({ - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - } | string); - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - } | { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }); - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: ({ +uri: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +} | { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}); +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/mint', @@ -1920,76 +1920,76 @@ export class Erc721Service { /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInputs: Array<{ - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/set', @@ -2020,79 +2020,79 @@ export class Erc721Service { /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInput: { - maxClaimableSupply?: (string | number); - startTime?: (string | number); - price?: (number | string); - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: (number | string); - waitInSeconds?: (number | string); - merkleRootHash?: (string | Array); - metadata?: { - name?: string; - }; - snapshot?: (Array | null); - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/update', @@ -2123,162 +2123,162 @@ export class Erc721Service { /** * Prepare signature * Prepares a payload for a wallet to generate a signature. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress ERC721 contract address - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public signaturePrepare( - chain: string, - contractAddress: string, - requestBody: { - metadata: (string | { - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - }); - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The amount of the "currency" token this token costs. Example: "0.1" - */ - price?: string; - /** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ - priceInWei?: string; - /** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ - currency?: string; - /** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ - primarySaleRecipient?: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ - royaltyBps?: number; - /** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ - validityStartTimestamp?: number; - /** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ - validityEndTimestamp?: number; - /** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ - uid?: string; - }, - ): CancelablePromise<{ - result: { - mintPayload: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - /** - * The payload to sign with a wallet's `signTypedData` method. - */ - typedDataPayload: { - /** - * Specifies the contextual information used to prevent signature reuse across different contexts. - */ - domain: { - name: string; - version: string; - chainId: number; - verifyingContract: string; - }; - /** - * Defines the structure of the data types used in the message. - */ - types: { - EIP712Domain: Array<{ - name: string; - type: string; - }>; - MintRequest: Array<{ - name: string; - type: string; - }>; - }; - /** - * The structured data to be signed. - */ - message: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - /** - * The main type of the data in the message corresponding to a defined type in the `types` field. - */ - primaryType: 'MintRequest'; - }; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +metadata: (string | { +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +}); +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The amount of the "currency" token this token costs. Example: "0.1" + */ +price?: string; +/** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ +priceInWei?: string; +/** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ +currency?: string; +/** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ +primarySaleRecipient?: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ +royaltyBps?: number; +/** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ +validityStartTimestamp?: number; +/** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ +validityEndTimestamp?: number; +/** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ +uid?: string; +}, +): CancelablePromise<{ +result: { +mintPayload: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +/** + * The payload to sign with a wallet's `signTypedData` method. + */ +typedDataPayload: { +/** + * Specifies the contextual information used to prevent signature reuse across different contexts. + */ +domain: { +name: string; +version: string; +chainId: number; +verifyingContract: string; +}; +/** + * Defines the structure of the data types used in the message. + */ +types: { +EIP712Domain: Array<{ +name: string; +type: string; +}>; +MintRequest: Array<{ +name: string; +type: string; +}>; +}; +/** + * The structured data to be signed. + */ +message: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +/** + * The main type of the data in the message corresponding to a defined type in the `types` field. + */ +primaryType: 'MintRequest'; +}; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/prepare', @@ -2299,97 +2299,97 @@ export class Erc721Service { /** * Update token metadata * Update the metadata for an ERC721 token. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateTokenMetadata( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update metadata - */ - tokenId: string; - metadata: { - /** - * The name of the NFT - */ - name?: (string | number | null); - /** - * The description of the NFT - */ - description?: (string | null); - /** - * The image of the NFT - */ - image?: (string | null); - /** - * The external url of the NFT - */ - external_url?: (string | null); - /** - * The animation url of the NFT - */ - animation_url?: (string | null); - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: (string | null); - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update metadata + */ +tokenId: string; +metadata: { +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/token/update', diff --git a/sdk/src/services/KeypairService.ts b/sdk/src/services/KeypairService.ts index 24ff24862..27094c3b7 100644 --- a/sdk/src/services/KeypairService.ts +++ b/sdk/src/services/KeypairService.ts @@ -16,33 +16,33 @@ export class KeypairService { * @throws ApiError */ public list(): CancelablePromise<{ - result: Array<{ - /** - * A unique identifier for the keypair - */ - hash: string; - /** - * The public key - */ - publicKey: string; - /** - * The keypair algorithm. - */ - algorithm: string; - /** - * A description for the keypair. - */ - label?: string; - /** - * When the keypair was added - */ - createdAt: string; - /** - * When the keypair was updated - */ - updatedAt: string; - }>; - }> { +result: Array<{ +/** + * A unique identifier for the keypair + */ +hash: string; +/** + * The public key + */ +publicKey: string; +/** + * The keypair algorithm. + */ +algorithm: string; +/** + * A description for the keypair. + */ +label?: string; +/** + * When the keypair was added + */ +createdAt: string; +/** + * When the keypair was updated + */ +updatedAt: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/auth/keypair/get-all', @@ -57,49 +57,49 @@ export class KeypairService { /** * Add public key * Add the public key for a keypair - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public add( - requestBody: { - /** - * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. - */ - publicKey: string; - algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); - label?: string; - }, - ): CancelablePromise<{ - result: { - keypair: { - /** - * A unique identifier for the keypair - */ - hash: string; - /** - * The public key - */ - publicKey: string; - /** - * The keypair algorithm. - */ - algorithm: string; - /** - * A description for the keypair. - */ - label?: string; - /** - * When the keypair was added - */ - createdAt: string; - /** - * When the keypair was updated - */ - updatedAt: string; - }; - }; - }> { +requestBody: { +/** + * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. + */ +publicKey: string; +algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); +label?: string; +}, +): CancelablePromise<{ +result: { +keypair: { +/** + * A unique identifier for the keypair + */ +hash: string; +/** + * The public key + */ +publicKey: string; +/** + * The keypair algorithm. + */ +algorithm: string; +/** + * A description for the keypair. + */ +label?: string; +/** + * When the keypair was added + */ +createdAt: string; +/** + * When the keypair was updated + */ +updatedAt: string; +}; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/keypair/add', @@ -116,19 +116,19 @@ export class KeypairService { /** * Remove public key * Remove the public key for a keypair - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public remove( - requestBody: { - hash: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +hash: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/keypair/remove', diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index 647a0de13..2993855f1 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -12,76 +12,76 @@ export class MarketplaceDirectListingsService { /** * Get all listings * Get all direct listings for this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all', @@ -107,76 +107,76 @@ export class MarketplaceDirectListingsService { /** * Get all valid listings * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAllValid( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid', @@ -203,67 +203,67 @@ export class MarketplaceDirectListingsService { * Get direct listing * Gets a direct listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getListing( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-listing', @@ -287,19 +287,19 @@ export class MarketplaceDirectListingsService { * Check if a buyer is approved to purchase a specific direct listing. * @param listingId The id of the listing to retrieve. * @param walletAddress The wallet address of the buyer to check. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public isBuyerApprovedForListing( - listingId: string, - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { +listingId: string, +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing', @@ -324,19 +324,19 @@ export class MarketplaceDirectListingsService { * Check if a currency is approved for a specific direct listing. * @param listingId The id of the listing to retrieve. * @param currencyContractAddress The smart contract address of the ERC20 token to check. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public isCurrencyApprovedForListing( - listingId: string, - currencyContractAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { +listingId: string, +currencyContractAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing', @@ -359,17 +359,17 @@ export class MarketplaceDirectListingsService { /** * Transfer token from wallet * Get the total number of direct listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count', @@ -388,91 +388,91 @@ export class MarketplaceDirectListingsService { /** * Create direct listing * Create a direct listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public createListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/create-listing', @@ -503,95 +503,95 @@ export class MarketplaceDirectListingsService { /** * Update direct listing * Update a direct listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public updateListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to update. - */ - listingId: string; - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to update. + */ +listingId: string; +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/update-listing', @@ -622,71 +622,71 @@ export class MarketplaceDirectListingsService { /** * Buy from direct listing * Buy from a specific direct listing from this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public buyFromListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The number of tokens to buy (default is 1 for ERC721 NFTs). - */ - quantity: string; - /** - * The wallet address of the buyer. - */ - buyer: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The number of tokens to buy (default is 1 for ERC721 NFTs). + */ +quantity: string; +/** + * The wallet address of the buyer. + */ +buyer: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing', @@ -717,67 +717,67 @@ export class MarketplaceDirectListingsService { /** * Approve buyer for reserved listing * Approve a wallet address to buy from a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public approveBuyerForReservedListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - buyer: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +buyer: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing', @@ -808,67 +808,67 @@ export class MarketplaceDirectListingsService { /** * Revoke approval for reserved listings * Revoke approval for a buyer to purchase a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeBuyerApprovalForReservedListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - buyerAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +buyerAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing', @@ -899,67 +899,67 @@ export class MarketplaceDirectListingsService { /** * Revoke currency approval for reserved listing * Revoke approval of a currency for a reserved listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeCurrencyApprovalForListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - currencyContractAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +currencyContractAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing', @@ -990,63 +990,63 @@ export class MarketplaceDirectListingsService { /** * Cancel direct listing * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public cancelListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to cancel. - */ - listingId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to cancel. + */ +listingId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing', diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index ff9fc197a..60125f1aa 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -12,84 +12,84 @@ export class MarketplaceEnglishAuctionsService { /** * Get all English auctions * Get all English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all', @@ -115,84 +115,84 @@ export class MarketplaceEnglishAuctionsService { /** * Get all valid English auctions * Get all valid English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAllValid( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid', @@ -219,75 +219,75 @@ export class MarketplaceEnglishAuctionsService { * Get English auction * Get a specific English auction listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAuction( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-auction', @@ -309,25 +309,25 @@ export class MarketplaceEnglishAuctionsService { /** * Get bid buffer BPS * Get the basis points of the bid buffer. - * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. - * If there is no current bid, the bid must be at least the minimum bid amount. - * Returns the value in percentage format, e.g. 100 = 1%. + * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. + * If there is no current bid, the bid must be at least the minimum bid amount. + * Returns the value in percentage format, e.g. 100 = 1%. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getBidBufferBps( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * Returns a number representing the basis points of the bid buffer. - */ - result: number; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * Returns a number representing the basis points of the bid buffer. + */ +result: number; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps', @@ -349,30 +349,30 @@ export class MarketplaceEnglishAuctionsService { /** * Get minimum next bid * Helper function to calculate the value that the next bid must be in order to be accepted. - * If there is no current bid, the bid must be at least the minimum bid amount. - * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. + * If there is no current bid, the bid must be at least the minimum bid amount. + * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. * @param listingId The id of the listing to retrieve. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getMinimumNextBid( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - result: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +result: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid', @@ -395,45 +395,45 @@ export class MarketplaceEnglishAuctionsService { * Get winning bid * Get the current highest bid of an active auction. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getWinningBid( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: { - /** - * The id of the auction. - */ - auctionId?: string; - /** - * The address of the buyer who made the offer. - */ - bidderAddress?: string; - /** - * The currency contract address of the offer token. - */ - currencyContractAddress?: string; - /** - * The amount of coins offered per token. - */ - bidAmount?: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - bidAmountCurrencyValue?: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - }; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: { +/** + * The id of the auction. + */ +auctionId?: string; +/** + * The address of the buyer who made the offer. + */ +bidderAddress?: string; +/** + * The currency contract address of the offer token. + */ +currencyContractAddress?: string; +/** + * The amount of coins offered per token. + */ +bidAmount?: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +bidAmountCurrencyValue?: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid', @@ -455,17 +455,17 @@ export class MarketplaceEnglishAuctionsService { /** * Get total listings * Get the count of English auction listings on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count', @@ -486,19 +486,19 @@ export class MarketplaceEnglishAuctionsService { * Check if a bid is or will be the winning bid for an auction. * @param listingId The ID of the listing to retrieve the winner for. * @param bidAmount The amount of the bid to check if it is the winning bid. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public isWinningBid( - listingId: string, - bidAmount: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { +listingId: string, +bidAmount: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid', @@ -522,18 +522,18 @@ export class MarketplaceEnglishAuctionsService { * Get winner * Get the winner of an English auction. Can only be called after the auction has ended. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getWinner( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winner', @@ -555,31 +555,31 @@ export class MarketplaceEnglishAuctionsService { /** * Buyout English auction * Buyout the listing for this auction. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public buyoutAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to buy NFT(s) from. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to buy NFT(s) from. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction', @@ -603,31 +603,31 @@ export class MarketplaceEnglishAuctionsService { /** * Cancel English auction * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public cancelAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to cancel auction. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to cancel auction. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction', @@ -651,67 +651,67 @@ export class MarketplaceEnglishAuctionsService { /** * Create English auction * Create an English auction listing on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public createAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - /** - * amount to buy the NFT and close the listing. - */ - buyoutBidAmount: string; - /** - * Minimum amount that bids must be to placed - */ - minimumBidAmount: string; - /** - * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) - */ - bidBufferBps?: string; - /** - * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) - */ - timeBufferInSeconds?: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +/** + * amount to buy the NFT and close the listing. + */ +buyoutBidAmount: string; +/** + * Minimum amount that bids must be to placed + */ +minimumBidAmount: string; +/** + * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) + */ +bidBufferBps?: string; +/** + * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) + */ +timeBufferInSeconds?: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/create-auction', @@ -735,34 +735,34 @@ export class MarketplaceEnglishAuctionsService { /** * Close English auction for bidder * After an auction has concluded (and a buyout did not occur), - * execute the sale for the buyer, meaning the buyer receives the NFT(s). - * You must also call closeAuctionForSeller to execute the sale for the seller, - * meaning the seller receives the payment from the highest bid. - * @param chain Chain ID or name + * execute the sale for the buyer, meaning the buyer receives the NFT(s). + * You must also call closeAuctionForSeller to execute the sale for the seller, + * meaning the seller receives the payment from the highest bid. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public closeAuctionForBidder( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder', @@ -786,33 +786,33 @@ export class MarketplaceEnglishAuctionsService { /** * Close English auction for seller * After an auction has concluded (and a buyout did not occur), - * execute the sale for the seller, meaning the seller receives the payment from the highest bid. - * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). - * @param chain Chain ID or name + * execute the sale for the seller, meaning the seller receives the payment from the highest bid. + * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public closeAuctionForSeller( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller', @@ -836,33 +836,33 @@ export class MarketplaceEnglishAuctionsService { /** * Execute sale * Close the auction for both buyer and seller. - * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. - * This function can only be called after the auction has ended. - * @param chain Chain ID or name + * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. + * This function can only be called after the auction has ended. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public executeSale( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale', @@ -886,35 +886,35 @@ export class MarketplaceEnglishAuctionsService { /** * Make bid * Place a bid on an English auction listing. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @returns any Default Response * @throws ApiError */ public makeBid( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to place a bid on. - */ - listingId: string; - /** - * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. - */ - bidAmount: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to place a bid on. + */ +listingId: string; +/** + * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. + */ +bidAmount: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/make-bid', diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index 3d25ebf17..ddf3a4ae9 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -12,72 +12,72 @@ export class MarketplaceOffersService { /** * Get all offers * Get all offers on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAll( - chain: string, - contractAddress: string, - count?: number, - offeror?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +offeror?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-all', @@ -103,72 +103,72 @@ export class MarketplaceOffersService { /** * Get all valid offers * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Satrt from this index (pagination) + * @param start Start from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ public getAllValid( - chain: string, - contractAddress: string, - count?: number, - offeror?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }>; - }> { +chain: string, +contractAddress: string, +count?: number, +offeror?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-all-valid', @@ -195,63 +195,63 @@ export class MarketplaceOffersService { * Get offer * Get details about an offer. * @param offerId The ID of the offer to get information about. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getOffer( - offerId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: (0 | 1 | 2 | 3 | 4 | 5); - }; - }> { +offerId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-offer', @@ -273,17 +273,17 @@ export class MarketplaceOffersService { /** * Get total count * Get the total number of offers on this marketplace contract. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-total-count', @@ -302,83 +302,83 @@ export class MarketplaceOffersService { /** * Make offer * Make an offer on a token. A valid listing is not required. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public makeOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * the price to offer in the currency specified - */ - totalPrice: string; - /** - * Defaults to 10 years from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * the price to offer in the currency specified + */ +totalPrice: string; +/** + * Defaults to 10 years from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/make-offer', @@ -409,63 +409,63 @@ export class MarketplaceOffersService { /** * Cancel offer * Cancel a valid offer made by the caller wallet. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public cancelOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. - */ - offerId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. + */ +offerId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/cancel-offer', @@ -496,63 +496,63 @@ export class MarketplaceOffersService { /** * Accept offer * Accept a valid offer. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulate the transaction on-chain without executing + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public acceptOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the offer to accept. You can view all offers with getAll or getAllValid. - */ - offerId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the offer to accept. You can view all offers with getAll or getAllValid. + */ +offerId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/accept-offer', diff --git a/sdk/src/services/PermissionsService.ts b/sdk/src/services/PermissionsService.ts index 9d43621f8..e47be1ce4 100644 --- a/sdk/src/services/PermissionsService.ts +++ b/sdk/src/services/PermissionsService.ts @@ -16,15 +16,15 @@ export class PermissionsService { * @throws ApiError */ public getAll(): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - walletAddress: string; - permissions: string; - label: (string | null); - }>; - }> { +result: Array<{ +/** + * A contract or wallet address + */ +walletAddress: string; +permissions: string; +label: (string | null); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/auth/permissions/get-all', @@ -39,24 +39,24 @@ export class PermissionsService { /** * Grant permissions to user * Grant permissions to a user - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public grant( - requestBody: { - /** - * A contract or wallet address - */ - walletAddress: string; - permissions: ('ADMIN' | 'OWNER'); - label?: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +permissions: ('ADMIN' | 'OWNER'); +label?: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/permissions/grant', @@ -73,22 +73,22 @@ export class PermissionsService { /** * Revoke permissions from user * Revoke a user's permissions - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public revoke( - requestBody: { - /** - * A contract or wallet address - */ - walletAddress: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/auth/permissions/revoke', diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 46965f4a4..46d507a3a 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -16,18 +16,18 @@ export class RelayerService { * @throws ApiError */ public getAll(): CancelablePromise<{ - result: Array<{ - id: string; - name: (string | null); - chainId: string; - /** - * A contract or wallet address - */ - backendWalletAddress: string; - allowedContracts: (Array | null); - allowedForwarders: (Array | null); - }>; - }> { +result: Array<{ +id: string; +name: (string | null); +chainId: string; +/** + * A contract or wallet address + */ +backendWalletAddress: string; +allowedContracts: (Array | null); +allowedForwarders: (Array | null); +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/relayer/get-all', @@ -42,26 +42,29 @@ export class RelayerService { /** * Create a new meta-transaction relayer * Create a new meta-transaction relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public create( - requestBody: { - name?: string; - chain: string; - /** - * The address of the backend wallet to use for relaying transactions. - */ - backendWalletAddress: string; - allowedContracts?: Array; - allowedForwarders?: Array; - }, - ): CancelablePromise<{ - result: { - relayerId: string; - }; - }> { +requestBody: { +name?: string; +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * The address of the backend wallet to use for relaying transactions. + */ +backendWalletAddress: string; +allowedContracts?: Array; +allowedForwarders?: Array; +}, +): CancelablePromise<{ +result: { +relayerId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/relayer/create', @@ -78,19 +81,19 @@ export class RelayerService { /** * Revoke a relayer * Revoke a relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public revoke( - requestBody: { - id: string; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +id: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/relayer/revoke', @@ -107,27 +110,30 @@ export class RelayerService { /** * Update a relayer * Update a relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public update( - requestBody: { - id: string; - name?: string; - chain?: string; - /** - * A contract or wallet address - */ - backendWalletAddress?: string; - allowedContracts?: Array; - allowedForwarders?: Array; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +id: string; +name?: string; +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain?: string; +/** + * A contract or wallet address + */ +backendWalletAddress?: string; +allowedContracts?: Array; +allowedForwarders?: Array; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/relayer/update', @@ -144,57 +150,57 @@ export class RelayerService { /** * Relay a meta-transaction * Relay an EIP-2771 meta-transaction - * @param relayerId - * @param requestBody + * @param relayerId + * @param requestBody * @returns any Default Response * @throws ApiError */ public relay( - relayerId: string, - requestBody?: ({ - type: 'forward'; - request: { - from: string; - to: string; - value: string; - gas: string; - nonce: string; - data: string; - chainid?: string; - }; - signature: string; - /** - * A contract or wallet address - */ - forwarderAddress: string; - } | { - type: 'permit'; - request: { - to: string; - owner: string; - spender: string; - value: string; - nonce: string; - deadline: string; - }; - signature: string; - } | { - type: 'execute-meta-transaction'; - request: { - from: string; - to: string; - data: string; - }; - signature: string; - }), - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { +relayerId: string, +requestBody?: ({ +type: 'forward'; +request: { +from: string; +to: string; +value: string; +gas: string; +nonce: string; +data: string; +chainid?: string; +}; +signature: string; +/** + * A contract or wallet address + */ +forwarderAddress: string; +} | { +type: 'permit'; +request: { +to: string; +owner: string; +spender: string; +value: string; +nonce: string; +deadline: string; +}; +signature: string; +} | { +type: 'execute-meta-transaction'; +request: { +from: string; +to: string; +data: string; +}; +signature: string; +}), +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/relayer/{relayerId}', diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index 863cd47c5..1a487ef0d 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -19,69 +19,69 @@ export class TransactionService { * @throws ApiError */ public getAll( - status: ('queued' | 'mined' | 'cancelled' | 'errored'), - page: number = 1, - limit: number = 100, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: (string | null); - /** - * The current state of the transaction. - */ - status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); - chainId: (string | null); - fromAddress: (string | null); - toAddress: (string | null); - data: (string | null); - extension: (string | null); - value: (string | null); - nonce: (number | string | null); - gasLimit: (string | null); - gasPrice: (string | null); - maxFeePerGas: (string | null); - maxPriorityFeePerGas: (string | null); - transactionType: (number | null); - transactionHash: (string | null); - queuedAt: (string | null); - sentAt: (string | null); - minedAt: (string | null); - cancelledAt: (string | null); - deployedContractAddress: (string | null); - deployedContractType: (string | null); - errorMessage: (string | null); - sentAtBlockNumber: (number | null); - blockNumber: (number | null); - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: (boolean | null); - retryMaxFeePerGas: (string | null); - retryMaxPriorityFeePerGas: (string | null); - signerAddress: (string | null); - accountAddress: (string | null); - accountSalt: (string | null); - accountFactoryAddress: (string | null); - target: (string | null); - sender: (string | null); - initCode: (string | null); - callData: (string | null); - callGasLimit: (string | null); - verificationGasLimit: (string | null); - preVerificationGas: (string | null); - paymasterAndData: (string | null); - userOpHash: (string | null); - functionName: (string | null); - functionArgs: (string | null); - onChainTxStatus: (number | null); - onchainStatus: ('success' | 'reverted' | null); - effectiveGasPrice: (string | null); - cumulativeGasUsed: (string | null); - }>; - totalCount: number; - }; - }> { +status: ('queued' | 'mined' | 'cancelled' | 'errored'), +page: number = 1, +limit: number = 100, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +totalCount: number; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/get-all', @@ -106,64 +106,64 @@ export class TransactionService { * @throws ApiError */ public status( - queueId: string, - ): CancelablePromise<{ - result: { - queueId: (string | null); - /** - * The current state of the transaction. - */ - status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); - chainId: (string | null); - fromAddress: (string | null); - toAddress: (string | null); - data: (string | null); - extension: (string | null); - value: (string | null); - nonce: (number | string | null); - gasLimit: (string | null); - gasPrice: (string | null); - maxFeePerGas: (string | null); - maxPriorityFeePerGas: (string | null); - transactionType: (number | null); - transactionHash: (string | null); - queuedAt: (string | null); - sentAt: (string | null); - minedAt: (string | null); - cancelledAt: (string | null); - deployedContractAddress: (string | null); - deployedContractType: (string | null); - errorMessage: (string | null); - sentAtBlockNumber: (number | null); - blockNumber: (number | null); - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: (boolean | null); - retryMaxFeePerGas: (string | null); - retryMaxPriorityFeePerGas: (string | null); - signerAddress: (string | null); - accountAddress: (string | null); - accountSalt: (string | null); - accountFactoryAddress: (string | null); - target: (string | null); - sender: (string | null); - initCode: (string | null); - callData: (string | null); - callGasLimit: (string | null); - verificationGasLimit: (string | null); - preVerificationGas: (string | null); - paymasterAndData: (string | null); - userOpHash: (string | null); - functionName: (string | null); - functionArgs: (string | null); - onChainTxStatus: (number | null); - onchainStatus: ('success' | 'reverted' | null); - effectiveGasPrice: (string | null); - cumulativeGasUsed: (string | null); - }; - }> { +queueId: string, +): CancelablePromise<{ +result: { +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/status/{queueId}', @@ -187,68 +187,68 @@ export class TransactionService { * @throws ApiError */ public getAllDeployedContracts( - page: number = 1, - limit: number = 10, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: (string | null); - /** - * The current state of the transaction. - */ - status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); - chainId: (string | null); - fromAddress: (string | null); - toAddress: (string | null); - data: (string | null); - extension: (string | null); - value: (string | null); - nonce: (number | string | null); - gasLimit: (string | null); - gasPrice: (string | null); - maxFeePerGas: (string | null); - maxPriorityFeePerGas: (string | null); - transactionType: (number | null); - transactionHash: (string | null); - queuedAt: (string | null); - sentAt: (string | null); - minedAt: (string | null); - cancelledAt: (string | null); - deployedContractAddress: (string | null); - deployedContractType: (string | null); - errorMessage: (string | null); - sentAtBlockNumber: (number | null); - blockNumber: (number | null); - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: (boolean | null); - retryMaxFeePerGas: (string | null); - retryMaxPriorityFeePerGas: (string | null); - signerAddress: (string | null); - accountAddress: (string | null); - accountSalt: (string | null); - accountFactoryAddress: (string | null); - target: (string | null); - sender: (string | null); - initCode: (string | null); - callData: (string | null); - callGasLimit: (string | null); - verificationGasLimit: (string | null); - preVerificationGas: (string | null); - paymasterAndData: (string | null); - userOpHash: (string | null); - functionName: (string | null); - functionArgs: (string | null); - onChainTxStatus: (number | null); - onchainStatus: ('success' | 'reverted' | null); - effectiveGasPrice: (string | null); - cumulativeGasUsed: (string | null); - }>; - totalCount: number; - }; - }> { +page: number = 1, +limit: number = 10, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +totalCount: number; +}; +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/get-all-deployed-contracts', @@ -267,27 +267,27 @@ export class TransactionService { /** * Retry transaction (synchronous) * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public syncRetry( - requestBody: { - /** - * Transaction queue ID - */ - queueId: string; - maxFeePerGas?: string; - maxPriorityFeePerGas?: string; - }, - ): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - }; - }> { +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +maxFeePerGas?: string; +maxPriorityFeePerGas?: string; +}, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/transaction/sync-retry', @@ -304,23 +304,23 @@ export class TransactionService { /** * Retry failed transaction * Retry a failed transaction - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public retryFailed( - requestBody: { - /** - * Transaction queue ID - */ - queueId: string; - }, - ): CancelablePromise<{ - result: { - message: string; - status: string; - }; - }> { +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +}, +): CancelablePromise<{ +result: { +message: string; +status: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/transaction/retry-failed', @@ -337,37 +337,37 @@ export class TransactionService { /** * Cancel transaction * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public cancel( - requestBody: { - /** - * Transaction queue ID - */ - queueId: string; - }, - ): CancelablePromise<{ - result: { - /** - * Transaction queue ID - */ - queueId: string; - /** - * Response status - */ - status: string; - /** - * Response message - */ - message: string; - /** - * A transaction hash - */ - transactionHash?: string; - }; - }> { +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +}, +): CancelablePromise<{ +result: { +/** + * Transaction queue ID + */ +queueId: string; +/** + * Response status + */ +status: string; +/** + * Response message + */ +message: string; +/** + * A transaction hash + */ +transactionHash?: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/transaction/cancel', @@ -384,24 +384,24 @@ export class TransactionService { /** * Send a signed transaction * Send a signed transaction - * @param chain Chain ID - * @param requestBody + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendRawTransaction( - chain: string, - requestBody: { - signedTransaction: string; - }, - ): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - }; - }> { +chain: string, +requestBody: { +signedTransaction: string; +}, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/transaction/{chain}/send-signed-transaction', @@ -421,28 +421,28 @@ export class TransactionService { /** * Send a signed user operation * Send a signed user operation - * @param chain Chain ID - * @param requestBody + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendSignedUserOp( - chain: string, - requestBody: { - signedUserOp: any; - }, - ): CancelablePromise<({ - result: { - /** - * A transaction hash - */ - userOpHash: string; - }; - } | { - error: { - message: string; - }; - })> { +chain: string, +requestBody: { +signedUserOp: any; +}, +): CancelablePromise<({ +result: { +/** + * A transaction hash + */ +userOpHash: string; +}; +} | { +error: { +message: string; +}; +})> { return this.httpRequest.request({ method: 'POST', url: '/transaction/{chain}/send-signed-user-op', @@ -462,44 +462,44 @@ export class TransactionService { /** * Get transaction receipt * Get the transaction receipt from a transaction hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param transactionHash Transaction hash - * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public getTransactionReceipt( - transactionHash: string, - chain: string, - ): CancelablePromise<{ - result: ({ - to?: string; - from?: string; - contractAddress?: (string | null); - transactionIndex?: number; - root?: string; - gasUsed?: string; - logsBloom?: string; - blockHash?: string; - /** - * A transaction hash - */ - transactionHash?: string; - logs?: Array; - blockNumber?: number; - confirmations?: number; - cumulativeGasUsed?: string; - effectiveGasPrice?: string; - byzantium?: boolean; - type?: number; - status?: number; - } | null); - }> { +chain: string, +transactionHash: string, +): CancelablePromise<{ +result: ({ +to?: string; +from?: string; +contractAddress?: (string | null); +transactionIndex?: number; +root?: string; +gasUsed?: string; +logsBloom?: string; +blockHash?: string; +/** + * A transaction hash + */ +transactionHash?: string; +logs?: Array; +blockNumber?: number; +confirmations?: number; +cumulativeGasUsed?: string; +effectiveGasPrice?: string; +byzantium?: boolean; +type?: number; +status?: number; +} | null); +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/{chain}/tx-hash/{transactionHash}', path: { - 'transactionHash': transactionHash, 'chain': chain, + 'transactionHash': transactionHash, }, errors: { 400: `Bad Request`, @@ -512,23 +512,23 @@ export class TransactionService { /** * Get transaction receipt from user-op hash * Get the transaction receipt from a user-op hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param userOpHash User operation hash - * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public useropHashReceipt( - userOpHash: string, - chain: string, - ): CancelablePromise<{ - result: any; - }> { +chain: string, +userOpHash: string, +): CancelablePromise<{ +result: any; +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/{chain}/userop-hash/{userOpHash}', path: { - 'userOpHash': userOpHash, 'chain': chain, + 'userOpHash': userOpHash, }, errors: { 400: `Bad Request`, @@ -541,7 +541,7 @@ export class TransactionService { /** * Get transaction logs * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs. - * @param chain Chain ID or name + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param queueId The queue ID for a mined transaction. * @param transactionHash The transaction hash for a mined transaction. * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) @@ -549,37 +549,37 @@ export class TransactionService { * @throws ApiError */ public getTransactionLogs( - chain: string, - queueId?: string, - transactionHash?: string, - parseLogs?: boolean, - ): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - address: string; - topics: Array; - data: string; - blockNumber: string; - /** - * A transaction hash - */ - transactionHash: string; - transactionIndex: number; - blockHash: string; - logIndex: number; - removed: boolean; - /** - * Event name, only returned when `parseLogs` is true - */ - eventName?: string; - /** - * Event arguments. Only returned when `parseLogs` is true - */ - args?: any; - }>; - }> { +chain: string, +queueId?: string, +transactionHash?: string, +parseLogs?: boolean, +): CancelablePromise<{ +result: Array<{ +/** + * A contract or wallet address + */ +address: string; +topics: Array; +data: string; +blockNumber: string; +/** + * A transaction hash + */ +transactionHash: string; +transactionIndex: number; +blockHash: string; +logIndex: number; +removed: boolean; +/** + * Event name, only returned when `parseLogs` is true + */ +eventName?: string; +/** + * Event arguments. Only returned when `parseLogs` is true + */ +args?: any; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/transaction/logs', diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index 9411e4e44..16b8608f5 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -16,16 +16,16 @@ export class WebhooksService { * @throws ApiError */ public getAll(): CancelablePromise<{ - result: Array<{ - url: string; - name: (string | null); - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - id: number; - }>; - }> { +result: Array<{ +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}>; +}> { return this.httpRequest.request({ method: 'GET', url: '/webhooks/get-all', @@ -39,31 +39,31 @@ export class WebhooksService { /** * Create a webhook - * Create a webhook to call when certain blockchain events occur. - * @param requestBody + * Create a webhook to call when a specific Engine event occurs. + * @param requestBody * @returns any Default Response * @throws ApiError */ public create( - requestBody: { - /** - * Webhook URL - */ - url: string; - name?: string; - eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); - }, - ): CancelablePromise<{ - result: { - url: string; - name: (string | null); - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - id: number; - }; - }> { +requestBody: { +/** + * Webhook URL. Non-HTTPS URLs are not supported. + */ +url: string; +name?: string; +eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); +}, +): CancelablePromise<{ +result: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/webhooks/create', @@ -80,19 +80,19 @@ export class WebhooksService { /** * Revoke webhook * Revoke a Webhook - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public revoke( - requestBody: { - id: number; - }, - ): CancelablePromise<{ - result: { - success: boolean; - }; - }> { +requestBody: { +id: number; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { return this.httpRequest.request({ method: 'POST', url: '/webhooks/revoke', @@ -113,8 +113,8 @@ export class WebhooksService { * @throws ApiError */ public getEventTypes(): CancelablePromise<{ - result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; - }> { +result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; +}> { return this.httpRequest.request({ method: 'GET', url: '/webhooks/event-types', @@ -126,4 +126,34 @@ export class WebhooksService { }); } + /** + * Test webhook + * Send a test payload to a webhook. + * @param webhookId + * @returns any Default Response + * @throws ApiError + */ + public testWebhook( +webhookId: string, +): CancelablePromise<{ +result: { +ok: boolean; +status: number; +body: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/webhooks/{webhookId}/test', + path: { + 'webhookId': webhookId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + } diff --git a/src/scripts/generate-sdk.ts b/src/scripts/generate-sdk.ts index f39c377f8..17f6e75c0 100644 --- a/src/scripts/generate-sdk.ts +++ b/src/scripts/generate-sdk.ts @@ -51,7 +51,7 @@ function applyOperationIdMappings( let newCode: string = originalCode; for (const [newId, oldId] of Object.entries(mappings)) { - const regex: RegExp = new RegExp(`public\\s+${newId}\\(`, "g"); + const regex = new RegExp(`public\\s+${newId}\\(`, "g"); const methods = newCode.match(regex); if (methods) { @@ -79,7 +79,7 @@ function processErcServices( const replacementLog: string[] = []; let newCode: string = originalCode; - const regex: RegExp = new RegExp(`public\\s+${tag}(\\w+)\\(`, "g"); + const regex = new RegExp(`public\\s+${tag}(\\w+)\\(`, "g"); const methods = newCode.match(regex); if (methods) { @@ -127,7 +127,7 @@ async function main(): Promise { .readFileSync("./sdk/src/Engine.ts", "utf-8") .replace("export class Engine", "class EngineLogic"); - const newEngineCode: string = `${engineCode} + const newEngineCode = `${engineCode} export class Engine extends EngineLogic { constructor(config: { url: string; accessToken: string; }) { super({ BASE: config.url, TOKEN: config.accessToken }); @@ -136,7 +136,7 @@ export class Engine extends EngineLogic { `; fs.writeFileSync("./sdk/src/Engine.ts", newEngineCode); - const servicesDir: string = "./sdk/src/services"; + const servicesDir = "./sdk/src/services"; const serviceFiles: string[] = fs.readdirSync(servicesDir); const ercServices: string[] = ["erc20", "erc721", "erc1155"]; @@ -176,4 +176,4 @@ export class Engine extends EngineLogic { } } -main(); +main().then(); diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts index 500b976c6..02278ce23 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; @@ -20,44 +20,42 @@ const responseSchema = Type.Object({ result: Type.Array(directListingV3OutputSchema), }); -responseSchema.example = [ - { - result: [ - { - assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", - tokenId: "0", - currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", - quantity: "1", - pricePerToken: "10000000000", - isReservedListing: false, +responseSchema.example = { + result: [ + { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + pricePerToken: "10000000000", + isReservedListing: false, + id: "0", + currencyValuePerToken: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + asset: { id: "0", - currencyValuePerToken: { - name: "MATIC", - symbol: "MATIC", - decimals: 18, - value: "10000000000", - displayValue: "0.00000001", - }, - asset: { - id: "0", - uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", - name: "TJ-Origin", - description: "Origin", - external_url: "", - attributes: [ - { - trait_type: "Mode", - value: "GOD", - }, - ], - }, - status: 1, - startTimeInSeconds: 1686006043, - endTimeInSeconds: 1686610889, + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - ], - }, -]; + status: 1, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, + }, + ], +}; // LOGIC export async function directListingsGetAll(fastify: FastifyInstance) { diff --git a/src/server/schemas/marketplaceV3/directListing/index.ts b/src/server/schemas/marketplaceV3/directListing/index.ts index 317b4c4de..630481abd 100644 --- a/src/server/schemas/marketplaceV3/directListing/index.ts +++ b/src/server/schemas/marketplaceV3/directListing/index.ts @@ -82,12 +82,12 @@ export const directListingV3OutputSchema = Type.Object({ asset: Type.Optional(nftMetadataSchema), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), startTimeInSeconds: Type.Optional( From 549660bc497302ed3883b2fbb746e96980158544 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 21 Nov 2024 20:35:39 -0600 Subject: [PATCH 02/11] fix descriptions, examples, and response types --- .../MarketplaceDirectListingsService.ts | 2 +- .../directListings/read/getListing.ts | 38 +++++++++++++----- .../directListings/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getAuction.ts | 40 ++++++++++++++----- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 8 +++- .../englishAuctions/read/getWinningBid.ts | 14 ++++++- .../marketplaceV3/englishAuction/index.ts | 12 +++--- .../schemas/marketplaceV3/offer/index.ts | 12 +++--- 9 files changed, 93 insertions(+), 37 deletions(-) diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index 2993855f1..5c8de6af2 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -357,7 +357,7 @@ result: boolean; } /** - * Transfer token from wallet + * Get Listing Count * Get the total number of direct listings on this marketplace contract. * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index 73397c27f..c3dee400c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -27,18 +27,36 @@ responseSchema.examples = [ { result: [ { - metadata: { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + pricePerToken: "10000000000", + isReservedListing: false, + id: "0", + currencyValuePerToken: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + asset: { id: "0", - uri: "ipfs://QmdaWX1GEwnFW4NooYRej5BQybKNLdxkWtMwyw8KiWRueS/0", - name: "My Edition NFT", - description: "My Edition NFT description", - image: - "ipfs://QmciR3WLJsf2BgzTSjbG5zCxsrEQ8PqsHK7JWGWsDSNo46/nft.png", + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - owner: "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", - type: "ERC1155", - supply: "100", - quantityOwned: "100", + status: 1, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, }, ], }, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index 1d6228f9c..0eec709b4 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -31,7 +31,7 @@ export async function directListingsGetTotalCount(fastify: FastifyInstance) { method: "GET", url: "/marketplace/:chain/:contractAddress/direct-listings/get-total-count", schema: { - summary: "Transfer token from wallet", + summary: "Get Listing Count", description: "Get the total number of direct listings on this marketplace contract.", tags: ["Marketplace-DirectListings"], diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index 0b0ffc488..c8aeea372 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -27,18 +27,38 @@ responseSchema.examples = [ { result: [ { - metadata: { + assetContractAddress: "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", + tokenId: "0", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + quantity: "1", + id: "0", + minimumBidAmount: "10000000000", + buyoutBidAmount: "10000000000", + buyoutCurrencyValue: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + timeBufferInSeconds: 600, + bidBufferBps: 100, + startTimeInSeconds: 1686006043, + endTimeInSeconds: 1686610889, + asset: { id: "0", - uri: "ipfs://QmdaWX1GEwnFW4NooYRej5BQybKNLdxkWtMwyw8KiWRueS/0", - name: "My Edition NFT", - description: "My Edition NFT description", - image: - "ipfs://QmciR3WLJsf2BgzTSjbG5zCxsrEQ8PqsHK7JWGWsDSNo46/nft.png", + uri: "ipfs://QmPw2Dd1dnB6dQCnqGayCTnxUxHrB7m4YFeyph6PYPMboP/0", + name: "TJ-Origin", + description: "Origin", + external_url: "", + attributes: [ + { + trait_type: "Mode", + value: "GOD", + }, + ], }, - owner: "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", - type: "ERC1155", - supply: "100", - quantityOwned: "100", + status: 1, }, ], }, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index 81193e015..5f3dfc767 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -26,7 +26,7 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "1", + result: 1, }, ]; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index f17418ec2..a8a77c48b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -24,7 +24,13 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "1", + result: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, }, ]; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 9c117f18c..5963326cc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -24,7 +24,19 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: "0x...", + result: { + auctionId: "0", + bidderAddress: "0x...", + currencyContractAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE", + bidAmount: "10000000000", + bidAmountCurrencyValue: { + name: "MATIC", + symbol: "MATIC", + decimals: 18, + value: "10000000000", + displayValue: "0.00000001", + }, + }, }, ]; diff --git a/src/server/schemas/marketplaceV3/englishAuction/index.ts b/src/server/schemas/marketplaceV3/englishAuction/index.ts index e2298d686..87c79bfac 100644 --- a/src/server/schemas/marketplaceV3/englishAuction/index.ts +++ b/src/server/schemas/marketplaceV3/englishAuction/index.ts @@ -119,12 +119,12 @@ export const englishAuctionOutputSchema = Type.Object({ asset: Type.Optional(nftMetadataSchema), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), }); diff --git a/src/server/schemas/marketplaceV3/offer/index.ts b/src/server/schemas/marketplaceV3/offer/index.ts index 7454cad3b..254b26ebc 100644 --- a/src/server/schemas/marketplaceV3/offer/index.ts +++ b/src/server/schemas/marketplaceV3/offer/index.ts @@ -72,12 +72,12 @@ export const OfferV3OutputSchema = Type.Object({ ), status: Type.Optional( Type.Union([ - Type.Literal(Status.UNSET), - Type.Literal(Status.Created), - Type.Literal(Status.Completed), - Type.Literal(Status.Cancelled), - Type.Literal(Status.Active), - Type.Literal(Status.Expired), + Type.Literal(Status.UNSET, { description: "UNSET" }), + Type.Literal(Status.Created, { description: "Created" }), + Type.Literal(Status.Completed, { description: "Completed" }), + Type.Literal(Status.Cancelled, { description: "Cancelled" }), + Type.Literal(Status.Active, { description: "Active" }), + Type.Literal(Status.Expired, { description: "Expired" }), ]), ), }); From 3d43a811b9707a3066af76c93421e63298e29993 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 21 Nov 2024 20:52:50 -0600 Subject: [PATCH 03/11] eslint upgrade + fixes --- eslint.config.mjs | 37 ++ package.json | 8 +- sdk/src/Engine.ts | 8 +- sdk/src/services/AccessTokensService.ts | 8 +- sdk/src/services/AccountService.ts | 10 +- sdk/src/services/ChainService.ts | 4 +- sdk/src/services/ContractMetadataService.ts | 2 +- sdk/src/services/ContractRolesService.ts | 8 +- sdk/src/services/Erc1155Service.ts | 58 +-- sdk/src/services/Erc20Service.ts | 42 +- sdk/src/services/Erc721Service.ts | 56 +-- .../MarketplaceDirectListingsService.ts | 22 +- .../MarketplaceEnglishAuctionsService.ts | 32 +- sdk/src/services/MarketplaceOffersService.ts | 14 +- sdk/src/services/PermissionsService.ts | 6 +- sdk/src/services/RelayerService.ts | 8 +- sdk/src/services/TransactionService.ts | 2 +- sdk/src/services/WebhooksService.ts | 4 +- src/db/client.ts | 2 +- src/lib/chain/chain-capabilities.ts | 3 +- src/server/listeners/updateTxListener.ts | 6 +- src/server/middleware/adminRoutes.ts | 2 +- src/server/middleware/auth.ts | 2 +- src/server/middleware/cors/cors.ts | 3 +- src/server/middleware/rateLimit.ts | 2 +- src/server/middleware/websocket.ts | 4 +- .../routes/backend-wallet/getBalance.ts | 2 +- .../backend-wallet/simulateTransaction.ts | 2 +- .../routes/contract/events/getAllEvents.ts | 2 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 2 +- .../routes/contract/metadata/functions.ts | 2 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../subscriptions/addContractSubscription.ts | 2 +- src/server/routes/relayer/index.ts | 2 + src/server/routes/system/health.ts | 1 + .../blockchain/getUserOpReceipt.ts | 2 +- .../blockchain/sendSignedUserOp.ts | 2 + src/server/routes/transaction/cancel.ts | 2 +- src/server/routes/transaction/status.ts | 2 +- src/server/utils/chain.ts | 2 +- src/server/utils/wallets/getSmartWallet.ts | 4 +- src/server/utils/websocket.ts | 2 +- src/tests/auth.test.ts | 57 +-- src/tests/chain.test.ts | 14 +- src/utils/block.ts | 4 +- src/utils/cache/clearCache.ts | 2 +- src/utils/cache/getContract.ts | 1 + src/utils/cron/isValidCron.ts | 2 +- src/utils/crypto.ts | 2 +- src/worker/listeners/configListener.ts | 4 +- src/worker/listeners/webhookListener.ts | 4 +- src/worker/queues/sendTransactionQueue.ts | 2 +- .../tasks/cancelRecycledNoncesWorker.ts | 2 +- src/worker/tasks/nonceHealthCheckWorker.ts | 2 +- src/worker/tasks/processEventLogsWorker.ts | 2 +- src/worker/tasks/sendTransactionWorker.ts | 1 + yarn.lock | 409 +++++++++--------- 60 files changed, 478 insertions(+), 422 deletions(-) create mode 100644 eslint.config.mjs diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..65fc2c596 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,37 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import tsParser from "@typescript-eslint/parser"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all +}); + +export default [ + ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"), + { + plugins: { + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + parser: tsParser, + }, + + rules: { + "no-console": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-explicit-any": "off", + + "@typescript-eslint/no-unused-vars": ["error", { + argsIgnorePattern: "^_", + }], + }, + }, +]; \ No newline at end of file diff --git a/package.json b/package.json index 6dfbd81e4..96be42a8f 100644 --- a/package.json +++ b/package.json @@ -85,11 +85,11 @@ "@types/pg": "^8.6.6", "@types/uuid": "^9.0.1", "@types/ws": "^8.5.5", - "@typescript-eslint/eslint-plugin": "^5.55.0", - "@typescript-eslint/parser": "^5.55.0", + "@typescript-eslint/eslint-plugin": "^8.15.0", + "@typescript-eslint/parser": "^8.15.0", "@vitest/coverage-v8": "^2.0.3", - "eslint": "^9.3.0", - "eslint-config-prettier": "^8.7.0", + "eslint": "^9.15.0", + "eslint-config-prettier": "^9.1.0", "openapi-typescript-codegen": "^0.25.0", "prettier": "^2.8.7", "typescript": "^5.1.3", diff --git a/sdk/src/Engine.ts b/sdk/src/Engine.ts index 9e9533dcb..72719591c 100644 --- a/sdk/src/Engine.ts +++ b/sdk/src/Engine.ts @@ -34,7 +34,7 @@ import { WebhooksService } from './services/WebhooksService'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; -class EngineLogic { +export class Engine { public readonly accessTokens: AccessTokensService; public readonly account: AccountService; @@ -104,9 +104,3 @@ class EngineLogic { this.webhooks = new WebhooksService(this.request); } } - -export class Engine extends EngineLogic { - constructor(config: { url: string; accessToken: string; }) { - super({ BASE: config.url, TOKEN: config.accessToken }); - } -} diff --git a/sdk/src/services/AccessTokensService.ts b/sdk/src/services/AccessTokensService.ts index d37a69d96..e01ce2764 100644 --- a/sdk/src/services/AccessTokensService.ts +++ b/sdk/src/services/AccessTokensService.ts @@ -15,7 +15,7 @@ export class AccessTokensService { * @returns any Default Response * @throws ApiError */ - public getAll(): CancelablePromise<{ + public listAccessTokens(): CancelablePromise<{ result: Array<{ id: string; tokenMask: string; @@ -46,7 +46,7 @@ label: (string | null); * @returns any Default Response * @throws ApiError */ - public create( + public createAccessToken( requestBody?: { label?: string; }, @@ -84,7 +84,7 @@ accessToken: string; * @returns any Default Response * @throws ApiError */ - public revoke( + public revokeAccessTokens( requestBody: { id: string; }, @@ -113,7 +113,7 @@ success: boolean; * @returns any Default Response * @throws ApiError */ - public update( + public updateAccessTokens( requestBody: { id: string; label?: string; diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 20fa2213e..6369ba214 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -94,7 +94,7 @@ approvedCallTargets: Array; * @returns any Default Response * @throws ApiError */ - public grantAdmin( + public grantAccountAdmin( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -181,7 +181,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public revokeAdmin( + public revokeAccountAdmin( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -268,7 +268,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public grantSession( + public grantAccountSession( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -359,7 +359,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public revokeSession( + public revokeAccountSession( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -446,7 +446,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateSession( + public updateAccountSession( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index dadf90b70..df7913cd6 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -16,7 +16,7 @@ export class ChainService { * @returns any Default Response * @throws ApiError */ - public get( + public getChain( chain: string, ): CancelablePromise<{ result: { @@ -81,7 +81,7 @@ slug?: string; * @returns any Default Response * @throws ApiError */ - public getAll(): CancelablePromise<{ + public listChains(): CancelablePromise<{ result: Array<{ /** * Chain name diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index b614050ee..b0d7df83c 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -72,7 +72,7 @@ stateMutability?: string; * @returns any Default Response * @throws ApiError */ - public getEvents( + public getContractEvents( chain: string, contractAddress: string, ): CancelablePromise<{ diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index 8a141e947..186047017 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -18,7 +18,7 @@ export class ContractRolesService { * @returns any Default Response * @throws ApiError */ - public getRole( + public getContractRole( role: string, chain: string, contractAddress: string, @@ -51,7 +51,7 @@ result: Array; * @returns any Default Response * @throws ApiError */ - public getAll( + public listContractRoles( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -97,7 +97,7 @@ signer: Array; * @returns any Default Response * @throws ApiError */ - public grant( + public grantContractRole( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -188,7 +188,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public revoke( + public revokeContractRole( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index 03d8196af..bb7c7f54e 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -18,7 +18,7 @@ export class Erc1155Service { * @returns any Default Response * @throws ApiError */ - public get( + public erc1155Get( tokenId: string, chain: string, contractAddress: string, @@ -59,7 +59,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public getAll( + public erc1155GetAll( chain: string, contractAddress: string, start?: number, @@ -101,7 +101,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public getOwned( + public erc1155GetOwned( walletAddress: string, chain: string, contractAddress: string, @@ -142,7 +142,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public balanceOf( + public erc1155BalanceOf( walletAddress: string, tokenId: string, chain: string, @@ -179,7 +179,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public isApproved( + public erc1155IsApproved( ownerWallet: string, operator: string, chain: string, @@ -214,7 +214,7 @@ result?: boolean; * @returns any Default Response * @throws ApiError */ - public totalCount( + public erc1155TotalCount( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -244,7 +244,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public totalSupply( + public erc1155TotalSupply( tokenId: string, chain: string, contractAddress: string, @@ -284,7 +284,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public signatureGenerate( + public erc1155SignatureGenerate( chain: string, contractAddress: string, xBackendWalletAddress?: string, @@ -563,7 +563,7 @@ signature: string; * @returns any Default Response * @throws ApiError */ - public canClaim( + public erc1155CanClaim( quantity: string, tokenId: string, chain: string, @@ -602,7 +602,7 @@ result: boolean; * @returns any Default Response * @throws ApiError */ - public getActiveClaimConditions( + public erc1155GetActiveClaimConditions( tokenId: (string | number), chain: string, contractAddress: string, @@ -666,7 +666,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public getAllClaimConditions( + public erc1155GetAllClaimConditions( tokenId: (string | number), chain: string, contractAddress: string, @@ -730,7 +730,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public getClaimerProofs( + public erc1155GetClaimerProofs( tokenId: (string | number), walletAddress: string, chain: string, @@ -780,7 +780,7 @@ proof: Array; * @returns any Default Response * @throws ApiError */ - public getClaimIneligibilityReasons( + public erc1155GetClaimIneligibilityReasons( tokenId: (string | number), quantity: string, chain: string, @@ -824,7 +824,7 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address * @returns any Default Response * @throws ApiError */ - public airdrop( + public erc1155Airdrop( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -921,7 +921,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public burn( + public erc1155Burn( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1012,7 +1012,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public burnBatch( + public erc1155BurnBatch( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1097,7 +1097,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public claimTo( + public erc1155ClaimTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1192,7 +1192,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public lazyMint( + public erc1155LazyMint( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1309,7 +1309,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintAdditionalSupplyTo( + public erc1155MintAdditionalSupplyTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1404,7 +1404,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintBatchTo( + public erc1155MintBatchTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1528,7 +1528,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintTo( + public erc1155MintTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1652,7 +1652,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public setApprovalForAll( + public erc1155SetApprovalForAll( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1743,7 +1743,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transfer( + public erc1155Transfer( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1842,7 +1842,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transferFrom( + public erc1155TransferFrom( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1945,7 +1945,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public signatureMint( + public erc1155SignatureMint( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2110,7 +2110,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public setClaimConditions( + public erc1155SetClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2214,7 +2214,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public claimConditionsUpdate( + public erc1155ClaimConditionsUpdate( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2320,7 +2320,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateClaimConditions( + public erc1155UpdateClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2427,7 +2427,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateTokenMetadata( + public erc1155UpdateTokenMetadata( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index b6cdca558..743d72f2b 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -19,7 +19,7 @@ export class Erc20Service { * @returns any Default Response * @throws ApiError */ - public allowanceOf( + public erc20AllowanceOf( ownerWallet: string, spenderWallet: string, chain: string, @@ -67,7 +67,7 @@ displayValue: string; * @returns any Default Response * @throws ApiError */ - public balanceOf( + public erc20BalanceOf( walletAddress: string, chain: string, contractAddress: string, @@ -112,7 +112,7 @@ displayValue: string; * @returns any Default Response * @throws ApiError */ - public get( + public erc20Get( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -145,7 +145,7 @@ decimals: string; * @returns any Default Response * @throws ApiError */ - public totalSupply( + public erc20TotalSupply( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -193,7 +193,7 @@ displayValue: string; * @returns any Default Response * @throws ApiError */ - public signatureGenerate( + public erc20SignatureGenerate( chain: string, contractAddress: string, xBackendWalletAddress?: string, @@ -335,7 +335,7 @@ signature: string; * @returns any Default Response * @throws ApiError */ - public canClaim( + public erc20CanClaim( quantity: string, chain: string, contractAddress: string, @@ -371,7 +371,7 @@ result: boolean; * @returns any Default Response * @throws ApiError */ - public getActiveClaimConditions( + public erc20GetActiveClaimConditions( chain: string, contractAddress: string, withAllowList?: boolean, @@ -432,7 +432,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public getAllClaimConditions( + public erc20GetAllClaimConditions( chain: string, contractAddress: string, withAllowList?: boolean, @@ -494,7 +494,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public claimConditionsGetClaimIneligibilityReasons( + public erc20ClaimConditionsGetClaimIneligibilityReasons( quantity: string, chain: string, contractAddress: string, @@ -530,7 +530,7 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address * @returns any Default Response * @throws ApiError */ - public claimConditionsGetClaimerProofs( + public erc20ClaimConditionsGetClaimerProofs( walletAddress: string, chain: string, contractAddress: string, @@ -582,7 +582,7 @@ proof: Array; * @returns any Default Response * @throws ApiError */ - public setAllowance( + public erc20SetAllowance( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -673,7 +673,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transfer( + public erc20Transfer( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -764,7 +764,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transferFrom( + public erc20TransferFrom( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -859,7 +859,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public burn( + public erc20Burn( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -946,7 +946,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public burnFrom( + public erc20BurnFrom( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1037,7 +1037,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public claimTo( + public erc20ClaimTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1128,7 +1128,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintBatchTo( + public erc20MintBatchTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1221,7 +1221,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintTo( + public erc20MintTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1312,7 +1312,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public signatureMint( + public erc20SignatureMint( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1433,7 +1433,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public setClaimConditions( + public erc20SetClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1533,7 +1533,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateClaimConditions( + public erc20UpdateClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 9c91c9b67..8ae8559f4 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -18,7 +18,7 @@ export class Erc721Service { * @returns any Default Response * @throws ApiError */ - public get( + public erc721Get( tokenId: string, chain: string, contractAddress: string, @@ -59,7 +59,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public getAll( + public erc721GetAll( chain: string, contractAddress: string, start?: number, @@ -101,7 +101,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public getOwned( + public erc721GetOwned( walletAddress: string, chain: string, contractAddress: string, @@ -141,7 +141,7 @@ quantityOwned?: string; * @returns any Default Response * @throws ApiError */ - public balanceOf( + public erc721BalanceOf( walletAddress: string, chain: string, contractAddress: string, @@ -176,7 +176,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public isApproved( + public erc721IsApproved( ownerWallet: string, operator: string, chain: string, @@ -211,7 +211,7 @@ result?: boolean; * @returns any Default Response * @throws ApiError */ - public totalCount( + public erc721TotalCount( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -240,7 +240,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public totalClaimedSupply( + public erc721TotalClaimedSupply( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -269,7 +269,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public totalUnclaimedSupply( + public erc721TotalUnclaimedSupply( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -300,7 +300,7 @@ result?: string; * @returns any Default Response * @throws ApiError */ - public canClaim( + public erc721CanClaim( quantity: string, chain: string, contractAddress: string, @@ -336,7 +336,7 @@ result: boolean; * @returns any Default Response * @throws ApiError */ - public getActiveClaimConditions( + public erc721GetActiveClaimConditions( chain: string, contractAddress: string, withAllowList?: boolean, @@ -397,7 +397,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public getAllClaimConditions( + public erc721GetAllClaimConditions( chain: string, contractAddress: string, withAllowList?: boolean, @@ -459,7 +459,7 @@ snapshot?: (null | Array); * @returns any Default Response * @throws ApiError */ - public getClaimIneligibilityReasons( + public erc721GetClaimIneligibilityReasons( quantity: string, chain: string, contractAddress: string, @@ -495,7 +495,7 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address * @returns any Default Response * @throws ApiError */ - public getClaimerProofs( + public erc721GetClaimerProofs( walletAddress: string, chain: string, contractAddress: string, @@ -547,7 +547,7 @@ proof: Array; * @returns any Default Response * @throws ApiError */ - public setApprovalForAll( + public erc721SetApprovalForAll( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -638,7 +638,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public setApprovalForToken( + public erc721SetApprovalForToken( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -729,7 +729,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transfer( + public erc721Transfer( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -820,7 +820,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public transferFrom( + public erc721TransferFrom( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -915,7 +915,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintTo( + public erc721MintTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1036,7 +1036,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public mintBatchTo( + public erc721MintBatchTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1157,7 +1157,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public burn( + public erc721Burn( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1244,7 +1244,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public lazyMint( + public erc721LazyMint( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1361,7 +1361,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public claimTo( + public erc721ClaimTo( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1452,7 +1452,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public signatureGenerate( + public erc721SignatureGenerate( chain: string, contractAddress: string, xBackendWalletAddress?: string, @@ -1754,7 +1754,7 @@ signature: string; * @returns any Default Response * @throws ApiError */ - public signatureMint( + public erc721SignatureMint( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1932,7 +1932,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public setClaimConditions( + public erc721SetClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2032,7 +2032,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateClaimConditions( + public erc721UpdateClaimConditions( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -2129,7 +2129,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public signaturePrepare( + public erc721SignaturePrepare( chain: string, contractAddress: string, requestBody: { @@ -2311,7 +2311,7 @@ primaryType: 'MintRequest'; * @returns any Default Response * @throws ApiError */ - public updateTokenMetadata( + public erc721UpdateTokenMetadata( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index 5c8de6af2..a9d72f07f 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -22,7 +22,7 @@ export class MarketplaceDirectListingsService { * @returns any Default Response * @throws ApiError */ - public getAll( + public getAllDirectListings( chain: string, contractAddress: string, count?: number, @@ -117,7 +117,7 @@ endTimeInSeconds?: number; * @returns any Default Response * @throws ApiError */ - public getAllValid( + public getAllValidDirectListings( chain: string, contractAddress: string, count?: number, @@ -208,7 +208,7 @@ endTimeInSeconds?: number; * @returns any Default Response * @throws ApiError */ - public getListing( + public getDirectListing( listingId: string, chain: string, contractAddress: string, @@ -292,7 +292,7 @@ endTimeInSeconds?: number; * @returns any Default Response * @throws ApiError */ - public isBuyerApprovedForListing( + public isBuyerApprovedForDirectListings( listingId: string, walletAddress: string, chain: string, @@ -329,7 +329,7 @@ result: boolean; * @returns any Default Response * @throws ApiError */ - public isCurrencyApprovedForListing( + public isCurrencyApprovedForDirectListings( listingId: string, currencyContractAddress: string, chain: string, @@ -357,14 +357,14 @@ result: boolean; } /** - * Get Listing Count + * Transfer token from wallet * Get the total number of direct listings on this marketplace contract. * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getTotalCount( + public getDirectListingsTotalCount( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -400,7 +400,7 @@ result: string; * @returns any Default Response * @throws ApiError */ - public createListing( + public createDirectListing( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -515,7 +515,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public updateListing( + public updateDirectListing( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -634,7 +634,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public buyFromListing( + public buyFromDirectListing( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -1002,7 +1002,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public cancelListing( + public cancelDirectListing( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index 60125f1aa..4570b18fa 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -22,7 +22,7 @@ export class MarketplaceEnglishAuctionsService { * @returns any Default Response * @throws ApiError */ - public getAll( + public getAllEnglishAuctions( chain: string, contractAddress: string, count?: number, @@ -125,7 +125,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getAllValid( + public getAllValidEnglishAuctions( chain: string, contractAddress: string, count?: number, @@ -224,7 +224,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getAuction( + public getEnglishAuction( listingId: string, chain: string, contractAddress: string, @@ -318,7 +318,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getBidBufferBps( + public getEnglishAuctionsBidBufferBps( listingId: string, chain: string, contractAddress: string, @@ -357,7 +357,7 @@ result: number; * @returns any Default Response * @throws ApiError */ - public getMinimumNextBid( + public getEnglishAuctionsMinimumNextBid( listingId: string, chain: string, contractAddress: string, @@ -400,7 +400,7 @@ displayValue: string; * @returns any Default Response * @throws ApiError */ - public getWinningBid( + public getEnglishAuctionsWinningBid( listingId: string, chain: string, contractAddress: string, @@ -460,7 +460,7 @@ displayValue?: string; * @returns any Default Response * @throws ApiError */ - public getTotalCount( + public getEnglishAuctionsTotalCount( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -491,7 +491,7 @@ result: string; * @returns any Default Response * @throws ApiError */ - public isWinningBid( + public isEnglishAuctionsWinningBid( listingId: string, bidAmount: string, chain: string, @@ -527,7 +527,7 @@ result: boolean; * @returns any Default Response * @throws ApiError */ - public getWinner( + public getEnglishAuctionsWinner( listingId: string, chain: string, contractAddress: string, @@ -562,7 +562,7 @@ result: string; * @returns any Default Response * @throws ApiError */ - public buyoutAuction( + public buyoutEnglishAuction( chain: string, contractAddress: string, requestBody: { @@ -610,7 +610,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public cancelAuction( + public cancelEnglishAuction( chain: string, contractAddress: string, requestBody: { @@ -658,7 +658,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public createAuction( + public createEnglishAuction( chain: string, contractAddress: string, requestBody: { @@ -745,7 +745,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public closeAuctionForBidder( + public closeEnglishAuctionForBidder( chain: string, contractAddress: string, requestBody: { @@ -795,7 +795,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public closeAuctionForSeller( + public closeEnglishAuctionForSeller( chain: string, contractAddress: string, requestBody: { @@ -845,7 +845,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public executeSale( + public executeEnglishAuctionSale( chain: string, contractAddress: string, requestBody: { @@ -893,7 +893,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public makeBid( + public makeEnglishAuctionBid( chain: string, contractAddress: string, requestBody: { diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index ddf3a4ae9..89e3f71f3 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -22,7 +22,7 @@ export class MarketplaceOffersService { * @returns any Default Response * @throws ApiError */ - public getAll( + public getAllMarketplaceOffers( chain: string, contractAddress: string, count?: number, @@ -113,7 +113,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getAllValid( + public getAllValidMarketplaceOffers( chain: string, contractAddress: string, count?: number, @@ -200,7 +200,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getOffer( + public getMarketplaceOffer( offerId: string, chain: string, contractAddress: string, @@ -278,7 +278,7 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * @returns any Default Response * @throws ApiError */ - public getTotalCount( + public getMarketplaceOffersTotalCount( chain: string, contractAddress: string, ): CancelablePromise<{ @@ -314,7 +314,7 @@ result: string; * @returns any Default Response * @throws ApiError */ - public makeOffer( + public makeMarketplaceOffer( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -421,7 +421,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public cancelOffer( + public cancelMarketplaceOffer( chain: string, contractAddress: string, xBackendWalletAddress: string, @@ -508,7 +508,7 @@ queueId: string; * @returns any Default Response * @throws ApiError */ - public acceptOffer( + public acceptMarketplaceOffer( chain: string, contractAddress: string, xBackendWalletAddress: string, diff --git a/sdk/src/services/PermissionsService.ts b/sdk/src/services/PermissionsService.ts index e47be1ce4..dc1348060 100644 --- a/sdk/src/services/PermissionsService.ts +++ b/sdk/src/services/PermissionsService.ts @@ -15,7 +15,7 @@ export class PermissionsService { * @returns any Default Response * @throws ApiError */ - public getAll(): CancelablePromise<{ + public listAdmins(): CancelablePromise<{ result: Array<{ /** * A contract or wallet address @@ -43,7 +43,7 @@ label: (string | null); * @returns any Default Response * @throws ApiError */ - public grant( + public grantAdmin( requestBody: { /** * A contract or wallet address @@ -77,7 +77,7 @@ success: boolean; * @returns any Default Response * @throws ApiError */ - public revoke( + public revokeAdmin( requestBody: { /** * A contract or wallet address diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 46d507a3a..3c91ffe1d 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -15,7 +15,7 @@ export class RelayerService { * @returns any Default Response * @throws ApiError */ - public getAll(): CancelablePromise<{ + public listRelayers(): CancelablePromise<{ result: Array<{ id: string; name: (string | null); @@ -46,7 +46,7 @@ allowedForwarders: (Array | null); * @returns any Default Response * @throws ApiError */ - public create( + public createRelayer( requestBody: { name?: string; /** @@ -85,7 +85,7 @@ relayerId: string; * @returns any Default Response * @throws ApiError */ - public revoke( + public revokeRelayer( requestBody: { id: string; }, @@ -114,7 +114,7 @@ success: boolean; * @returns any Default Response * @throws ApiError */ - public update( + public updateRelayer( requestBody: { id: string; name?: string; diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index 1a487ef0d..f9aede094 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -18,7 +18,7 @@ export class TransactionService { * @returns any Default Response * @throws ApiError */ - public getAll( + public listTransactions( status: ('queued' | 'mined' | 'cancelled' | 'errored'), page: number = 1, limit: number = 100, diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index 16b8608f5..eb025cee8 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -15,7 +15,7 @@ export class WebhooksService { * @returns any Default Response * @throws ApiError */ - public getAll(): CancelablePromise<{ + public listWebhooks(): CancelablePromise<{ result: Array<{ id: number; url: string; @@ -44,7 +44,7 @@ createdAt: string; * @returns any Default Response * @throws ApiError */ - public create( + public createWebhook( requestBody: { /** * Webhook URL. Non-HTTPS URLs are not supported. diff --git a/src/db/client.ts b/src/db/client.ts index bddb0eafe..eb3d84c22 100644 --- a/src/db/client.ts +++ b/src/db/client.ts @@ -26,7 +26,7 @@ export const isDatabaseReachable = async () => { try { await prisma.walletDetails.findFirst(); return true; - } catch (error) { + } catch { return false; } }; diff --git a/src/lib/chain/chain-capabilities.ts b/src/lib/chain/chain-capabilities.ts index 7a584f5c5..622b13053 100644 --- a/src/lib/chain/chain-capabilities.ts +++ b/src/lib/chain/chain-capabilities.ts @@ -1,5 +1,6 @@ import { createSWRCache } from "../cache/swr"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const Services = [ "contracts", "connect-sdk", @@ -11,7 +12,7 @@ const Services = [ "insight", ] as const; -export type Service = (typeof Services)[number]; +export type Service = typeof Services[number]; export type ChainCapabilities = Array<{ service: Service; diff --git a/src/server/listeners/updateTxListener.ts b/src/server/listeners/updateTxListener.ts index d8ff01ebf..94d5ff559 100644 --- a/src/server/listeners/updateTxListener.ts +++ b/src/server/listeners/updateTxListener.ts @@ -28,7 +28,7 @@ export const updateTxListener = async (): Promise => { (sub) => sub.requestId === parsedPayload.id, ); - if (index == -1) { + if (index === -1) { return; } @@ -47,7 +47,9 @@ export const updateTxListener = async (): Promise => { userSubscription.socket.send( await formatSocketMessage(returnData, message), ); - closeConnection ? userSubscription.socket.close() : null; + if (closeConnection) { + userSubscription.socket.close(); + } }, ); diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index 76719a137..ae3becfe3 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -85,7 +85,7 @@ const assertAdminBasicAuth = (username: string, password: string) => { const buf1 = Buffer.from(password.padEnd(100)); const buf2 = Buffer.from(ADMIN_ROUTES_PASSWORD.padEnd(100)); return timingSafeEqual(buf1, buf2); - } catch (e) {} + } catch { /* empty */ } } return false; }; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index 539d36b12..c6ad2dd81 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -383,7 +383,7 @@ const handleAccessToken = async ( try { token = await getAccessToken({ jwt }); - } catch (e) { + } catch { // Missing or invalid signature. This will occur if the JWT not intended for this auth pattern. return { isAuthed: false }; } diff --git a/src/server/middleware/cors/cors.ts b/src/server/middleware/cors/cors.ts index e56238642..e59e24210 100644 --- a/src/server/middleware/cors/cors.ts +++ b/src/server/middleware/cors/cors.ts @@ -16,7 +16,7 @@ declare module "fastify" { } } -interface ArrayOfValueOrArray extends Array> {} +type ArrayOfValueOrArray = Array> type OriginCallback = ( err: Error | null, @@ -155,6 +155,7 @@ export const fastifyCors = async ( let hideOptionsRoute = true; if (opts.hideOptionsRoute !== undefined) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars hideOptionsRoute = opts.hideOptionsRoute; } const corsOptions = normalizeCorsOptions(opts); diff --git a/src/server/middleware/rateLimit.ts b/src/server/middleware/rateLimit.ts index 5d87c9a11..179f1a751 100644 --- a/src/server/middleware/rateLimit.ts +++ b/src/server/middleware/rateLimit.ts @@ -8,7 +8,7 @@ import { OPENAPI_ROUTES } from "./open-api"; const SKIP_RATELIMIT_PATHS = ["/", ...OPENAPI_ROUTES]; export const withRateLimit = async (server: FastifyInstance) => { - server.addHook("onRequest", async (request, reply) => { + server.addHook("onRequest", async (request, _reply) => { if (SKIP_RATELIMIT_PATHS.includes(request.url)) { return; } diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index 2f68cf2f2..ae0994c3f 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -7,8 +7,8 @@ export const withWebSocket = async (server: FastifyInstance) => { errorHandler: function ( error, conn /* SocketStream */, - req /* FastifyRequest */, - reply /* FastifyReply */, + _req /* FastifyRequest */, + _reply /* FastifyReply */, ) { logger({ service: "websocket", diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 45a9987af..43dbd7b54 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -51,7 +51,7 @@ export async function getBalance(fastify: FastifyInstance) { const chainId = await getChainIdFromChain(chain); const sdk = await getSdk({ chainId }); - let balanceData = await sdk.getBalance(walletAddress); + const balanceData = await sdk.getBalance(walletAddress); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index e30e5d662..0b82c6156 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -86,7 +86,7 @@ export async function simulateTransaction(fastify: FastifyInstance) { const chainId = await getChainIdFromChain(chain); - let queuedTransaction: QueuedTransaction = { + const queuedTransaction: QueuedTransaction = { status: "queued", queueId: randomUUID(), queuedAt: new Date(), diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index a28264b45..37aca20be 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -87,7 +87,7 @@ export async function getAllEvents(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.events.getAllEvents({ + const returnData = await contract.events.getAllEvents({ fromBlock, toBlock, order, diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 56cbb5b10..738ca9cf5 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -84,7 +84,7 @@ export async function getABI(fastify: FastifyInstance) { contractAddress, }); - let returnData = contract.abi; + const returnData = contract.abi; reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index 0d3e769fa..2237adc74 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -84,7 +84,7 @@ export async function extractEvents(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.publishedMetadata.extractEvents(); + const returnData = await contract.publishedMetadata.extractEvents(); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 79255c7f8..847e435a5 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -64,7 +64,7 @@ export async function getContractExtensions(fastify: FastifyInstance) { contractAddress, }); - let returnData = getAllDetectedExtensionNames(contract.abi); + const returnData = getAllDetectedExtensionNames(contract.abi); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index 268254418..c9e83f33e 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -81,7 +81,7 @@ export async function extractFunctions(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.publishedMetadata.extractFunctions(); + const returnData = await contract.publishedMetadata.extractFunctions(); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index a10b1e827..6fc8dfb75 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -56,7 +56,7 @@ export async function getRoles(fastify: FastifyInstance) { contractAddress, }); - let returnData = await contract.roles.get(role); + const returnData = await contract.roles.get(role); reply.status(StatusCodes.OK).send({ result: returnData, diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index 175b626df..b29221593 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/getAll.ts @@ -62,7 +62,7 @@ export async function getAllRoles(fastify: FastifyInstance) { contractAddress, }); - let returnData = (await contract.roles.getAll()) as Static< + const returnData = (await contract.roles.getAll()) as Static< typeof responseSchema >["result"]; diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index bddd24fc1..3bbdaa0b3 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -132,7 +132,7 @@ export async function addContractSubscription(fastify: FastifyInstance) { const provider = sdk.getProvider(); const currentBlockNumber = await provider.getBlockNumber(); await upsertChainIndexer({ chainId, currentBlockNumber }); - } catch (error) { + } catch { // this is fine, must be already locked, so don't need to update current block as this will be recent } } diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 866f18ac8..6c63752b4 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -60,6 +60,8 @@ const requestBodySchema = Type.Union([ }), ]); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars const responseBodySchema = Type.Composite([ Type.Object({ result: Type.Optional( diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index 896dab30d..a21cea5ef 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -32,6 +32,7 @@ const ReplySchemaError = Type.Object({ error: Type.String(), }); +// eslint-disable-next-line @typescript-eslint/no-unused-vars const responseBodySchema = Type.Union([ReplySchemaOk, ReplySchemaError]); export async function healthCheck(fastify: FastifyInstance) { diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index 76c8c43a0..c04fe6561 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -104,7 +104,7 @@ export async function getUserOpReceipt(fastify: FastifyInstance) { reply.status(StatusCodes.OK).send({ result: json.result, }); - } catch (e) { + } catch { throw createCustomError( "Unable to get receipt.", StatusCodes.INTERNAL_SERVER_ERROR, diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index f5b3b28a6..880a050bd 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -9,6 +9,8 @@ import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; + +// eslint-disable-next-line @typescript-eslint/no-unused-vars const UserOp = Type.Object({ sender: Type.String(), nonce: Type.String(), diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index d9b704383..743d783b0 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -80,7 +80,7 @@ export async function cancelTransaction(fastify: FastifyInstance) { ); } - let message = "Transaction successfully cancelled."; + const message = "Transaction successfully cancelled."; let cancelledTransaction: CancelledTransaction | null = null; if (!transaction.isUserOp) { if (transaction.status === "queued") { diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index a5c9c1b95..877d26122 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -125,7 +125,7 @@ export async function checkTxStatus(fastify: FastifyInstance) { onError(error, connection, request); }); - connection.socket.on("message", async (message, isBinary) => { + connection.socket.on("message", async (_message, _isBinary) => { onMessage(connection, request); }); diff --git a/src/server/utils/chain.ts b/src/server/utils/chain.ts index 5ea5741d6..38ac60ae1 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -17,7 +17,7 @@ export const getChainIdFromChain = async (input: string): Promise => { if (chainV4.status !== "deprecated") { return chainV4.chainId; } - } catch {} + } catch { /* empty */ } throw badChainError(input); }; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 59ab4d885..54cbeaec8 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -31,7 +31,7 @@ export const getSmartWallet = async ({ resolvedFactoryAddress = (await redis.get(`account-factory:${accountAddress.toLowerCase()}`)) ?? undefined; - } catch {} + } catch { /* empty */ } } if (!resolvedFactoryAddress) { @@ -41,7 +41,7 @@ export const getSmartWallet = async ({ contractAddress: accountAddress, }); resolvedFactoryAddress = await contract.call("factory"); - } catch {} + } catch { /* empty */ } } if (!resolvedFactoryAddress) { diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index 4e68a198d..9bf614815 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -10,7 +10,7 @@ const timeoutDuration = 10 * 60 * 1000; export const findWSConnectionInSharedState = async ( connection: SocketStream, - request: FastifyRequest, + _request: FastifyRequest, ): Promise => { const index = subscriptionsData.findIndex( (sub) => sub.socket === connection.socket, diff --git a/src/tests/auth.test.ts b/src/tests/auth.test.ts index 8e6e774e9..9ae91c8c9 100644 --- a/src/tests/auth.test.ts +++ b/src/tests/auth.test.ts @@ -75,7 +75,7 @@ describe("Static paths", () => { method: "GET", url: path, headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -97,7 +97,7 @@ describe("Relayer endpoints", () => { method: "POST", url: "/relayer/be369f95-7bef-4e29-a016-3146fa394eb1", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -117,7 +117,7 @@ describe("Relayer endpoints", () => { method: "POST", url: path, headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -155,7 +155,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -188,7 +188,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -226,7 +226,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -249,7 +249,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: { socket: mockSocket }, }; @@ -275,6 +275,7 @@ describe("Websocket requests", () => { session: { permissions: Permission.Admin }, }); + // eslint-disable-next-line @typescript-eslint/no-unused-vars const mockSocket = { write: vi.fn(), destroy: vi.fn(), @@ -292,7 +293,7 @@ describe("Websocket requests", () => { url: "/backend-wallets/get-all", headers: { upgrade: "WEBSOCKET" }, query: { token: "my-access-token" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -336,7 +337,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -369,7 +370,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -401,7 +402,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -424,7 +425,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -464,7 +465,7 @@ describe("Access tokens", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -521,7 +522,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -555,7 +556,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -583,7 +584,7 @@ C0cP9UNh7FQsLQ/l2BcOH8+G2xvh+8tjtQ== method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -615,7 +616,7 @@ AwEHoUQDQgAE74w9+HXi/PCQZTu2AS4titehOFopNSrfqlFnFbtglPuwNB2ke53p method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -658,7 +659,7 @@ AwEHoUQDQgAE74w9+HXi/PCQZTu2AS4titehOFopNSrfqlFnFbtglPuwNB2ke53p method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -694,7 +695,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -718,7 +719,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -751,7 +752,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -771,7 +772,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -788,7 +789,7 @@ describe("Dashboard JWT", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: `Bearer ${jwt}` }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -809,7 +810,7 @@ describe("thirdweb secret key", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: "Bearer my-thirdweb-secret-key" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -823,7 +824,7 @@ describe("thirdweb secret key", () => { method: "POST", url: "/backend-wallets/get-all", headers: { authorization: "Bearer my-thirdweb-secret-key" }, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -888,7 +889,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -937,7 +938,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; @@ -952,7 +953,7 @@ describe("auth webhooks", () => { method: "POST", url: "/backend-wallets/get-all", headers: {}, - // @ts-ignore + // @ts-expect-error expected raw: {}, }; diff --git a/src/tests/chain.test.ts b/src/tests/chain.test.ts index 4a3684a6c..20fa1f585 100644 --- a/src/tests/chain.test.ts +++ b/src/tests/chain.test.ts @@ -22,7 +22,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists by slug", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -40,7 +40,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists by slug, case-insensitive", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -58,7 +58,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from chainOverrides if it exists", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({ chainOverrides: JSON.stringify([ { @@ -76,7 +76,7 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from getChainByChainIdAsync if chain is a valid numeric string", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetChainByChainIdAsync.mockResolvedValueOnce({ name: "Polygon", chainId: 137, @@ -90,9 +90,9 @@ describe("getChainIdFromChain", () => { }); it("should return the chainId from getChainBySlugAsync if chain is a valid string", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({}); - // @ts-ignore + // @ts-expect-error expected mockGetChainBySlugAsync.mockResolvedValueOnce({ name: "Polygon", chainId: 137, @@ -106,7 +106,7 @@ describe("getChainIdFromChain", () => { }); it("should throw an error for an invalid chain", async () => { - // @ts-ignore + // @ts-expect-error expected mockGetConfig.mockResolvedValueOnce({}); await expect(getChainIdFromChain("not_a_real_chain")).rejects.toEqual({ diff --git a/src/utils/block.ts b/src/utils/block.ts index 9d7f61f20..736b60097 100644 --- a/src/utils/block.ts +++ b/src/utils/block.ts @@ -20,9 +20,9 @@ export const getBlockNumberish = async (chainId: number): Promise => { try { const blockNumber = await eth_blockNumber(rpcRequest); // Non-blocking update to cache. - redis.set(key, blockNumber.toString()).catch((e) => {}); + redis.set(key, blockNumber.toString()).catch((_e) => {}); return blockNumber; - } catch (e) { + } catch { const cached = await redis.get(key); if (cached) { return BigInt(cached); diff --git a/src/utils/cache/clearCache.ts b/src/utils/cache/clearCache.ts index 870561b26..a682bb997 100644 --- a/src/utils/cache/clearCache.ts +++ b/src/utils/cache/clearCache.ts @@ -7,7 +7,7 @@ import { webhookCache } from "./getWebhook"; import { keypairCache } from "./keypair"; export const clearCache = async ( - service: (typeof env)["LOG_SERVICES"][0], + _service: (typeof env)["LOG_SERVICES"][0], ): Promise => { invalidateConfig(); webhookCache.clear(); diff --git a/src/utils/cache/getContract.ts b/src/utils/cache/getContract.ts index 4ace9a679..d7186a596 100644 --- a/src/utils/cache/getContract.ts +++ b/src/utils/cache/getContract.ts @@ -4,6 +4,7 @@ import { createCustomError } from "../../server/middleware/error"; import { abiSchema } from "../../server/schemas/contract"; import { getSdk } from "./getSdk"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const abiArraySchema = Type.Array(abiSchema); interface GetContractParams { diff --git a/src/utils/cron/isValidCron.ts b/src/utils/cron/isValidCron.ts index f0ea16ccf..849e905d0 100644 --- a/src/utils/cron/isValidCron.ts +++ b/src/utils/cron/isValidCron.ts @@ -5,7 +5,7 @@ import { createCustomError } from "../../server/middleware/error"; export const isValidCron = (input: string): boolean => { try { cronParser.parseExpression(input); - } catch (error) { + } catch { throw createCustomError( "Invalid cron expression. Please check the cron expression.", StatusCodes.BAD_REQUEST, diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 7b9052dd4..3b5c89929 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -14,7 +14,7 @@ export const isWellFormedPublicKey = (key: string) => { try { crypto.createPublicKey(key); return true; - } catch (e) { + } catch { return false; } }; diff --git a/src/worker/listeners/configListener.ts b/src/worker/listeners/configListener.ts index 48213c731..febdac002 100644 --- a/src/worker/listeners/configListener.ts +++ b/src/worker/listeners/configListener.ts @@ -18,7 +18,7 @@ export const newConfigurationListener = async (): Promise => { // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data await getConfig(false); }, @@ -69,7 +69,7 @@ export const updatedConfigurationListener = async (): Promise => { // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data logger({ service: "worker", diff --git a/src/worker/listeners/webhookListener.ts b/src/worker/listeners/webhookListener.ts index 2ab19ba2f..025db9ae6 100644 --- a/src/worker/listeners/webhookListener.ts +++ b/src/worker/listeners/webhookListener.ts @@ -16,7 +16,7 @@ export const newWebhooksListener = async (): Promise => { // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { logger({ service: "worker", level: "info", @@ -72,7 +72,7 @@ export const updatedWebhooksListener = async (): Promise => { // Whenever we receive a new transaction, process it connection.on( "notification", - async (msg: { channel: string; payload: string }) => { + async (_msg: { channel: string; payload: string }) => { // Update Configs Data logger({ service: "worker", diff --git a/src/worker/queues/sendTransactionQueue.ts b/src/worker/queues/sendTransactionQueue.ts index ba93068b8..bdd1c22b8 100644 --- a/src/worker/queues/sendTransactionQueue.ts +++ b/src/worker/queues/sendTransactionQueue.ts @@ -32,7 +32,7 @@ export class SendTransactionQueue { static remove = async (data: SendTransactionData) => { try { await this.q.remove(this.jobId(data)); - } catch (e) { + } catch { // Job is currently running. } }; diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index 6b8b6a125..e93e91256 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -66,7 +66,7 @@ const handler: Processor = async (job: Job) => { }; const fromRecycledNoncesKey = (key: string) => { - const [_, chainId, walletAddress] = key.split(":"); + const [, chainId, walletAddress] = key.split(":"); return { chainId: parseInt(chainId), walletAddress: walletAddress as Address, diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 4d528c0c8..7581273cc 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -50,7 +50,7 @@ const handler: Processor = async (_job: Job) => { await Promise.all( batch.map(async ({ chainId, walletAddress }) => { - const [_, isStuck, currentState] = await Promise.all([ + const [, isStuck, currentState] = await Promise.all([ updateNonceHistory(walletAddress, chainId), isQueueStuck(walletAddress, chainId), getCurrentNonceState(walletAddress, chainId), diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index b3ad7c5fa..843e6037c 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -261,7 +261,7 @@ const getBlockTimestamps = async ( try { const block = await eth_getBlockByHash(rpcRequest, { blockHash }); return new Date(Number(block.timestamp) * 1000); - } catch (e) { + } catch { return now; } }), diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index 803de187b..f3015bd75 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -78,6 +78,7 @@ const handler: Processor = async (job: Job) => { // For example, the developer retried all failed transactions during an RPC outage. // An errored queued transaction (resendCount = 0) is safe to retry: the transaction wasn't sent to RPC. if (transaction.status === "errored" && resendCount === 0) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars const { errorMessage, ...omitted } = transaction; transaction = { ...omitted, diff --git a/yarn.lock b/yarn.lock index 833d26027..15d0cd971 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1500,15 +1500,36 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": - version "4.10.0" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" - integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== +"@eslint-community/eslint-utils@^4.4.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" -"@eslint/eslintrc@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" - integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== +"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/config-array@^0.19.0": + version "0.19.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.19.0.tgz#3251a528998de914d59bb21ba4c11767cf1b3519" + integrity sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.9.0.tgz#168ee076f94b152c01ca416c3e5cf82290ab4fcd" + integrity sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg== + +"@eslint/eslintrc@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.2.0.tgz#57470ac4e2e283a6bf76044d63281196e370542c" + integrity sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w== dependencies: ajv "^6.12.4" debug "^4.3.2" @@ -1520,10 +1541,22 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@9.3.0": - version "9.3.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.3.0.tgz#2e8f65c9c55227abc4845b1513c69c32c679d8fe" - integrity sha512-niBqk8iwv96+yuTwjM6bWg8ovzAPF9qkICsGtcoa5/dmqcEMfdwNAX7+/OHcJHc7wj7XqPxH98oAHytFYlw6Sw== +"@eslint/js@9.15.0": + version "9.15.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.15.0.tgz#df0e24fe869143b59731942128c19938fdbadfb5" + integrity sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.3.tgz#812980a6a41ecf3a8341719f92a6d1e784a2e0e8" + integrity sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA== + dependencies: + levn "^0.4.1" "@eth-optimism/contracts-bedrock@0.17.2": version "0.17.2" @@ -2494,30 +2527,34 @@ protobufjs "^7.2.5" yargs "^17.7.2" -"@humanwhocodes/config-array@^0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748" - integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== + +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^2.0.3" - debug "^4.3.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" - integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== - "@humanwhocodes/retry@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.0.tgz#6d86b8cb322660f03d3f0aa94b99bdd8e172d570" integrity sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew== +"@humanwhocodes/retry@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== + "@ioredis/commands@^1.1.1": version "1.2.0" resolved "https://registry.yarnpkg.com/@ioredis/commands/-/commands-1.2.0.tgz#6d61b3097470af1fdbbe622795b8921d42018e11" @@ -2935,7 +2972,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -4904,6 +4941,11 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== +"@types/estree@^1.0.6": + version "1.0.6" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50" + integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== + "@types/glob@*": version "8.1.0" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" @@ -4912,7 +4954,7 @@ "@types/minimatch" "^5.1.2" "@types/node" "*" -"@types/json-schema@^7.0.6", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.15", "@types/json-schema@^7.0.6": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -5027,11 +5069,6 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12": - version "7.5.8" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" - integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== - "@types/tough-cookie@*": version "4.0.5" resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304" @@ -5059,89 +5096,86 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.55.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" - integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/type-utils" "5.62.0" - "@typescript-eslint/utils" "5.62.0" - debug "^4.3.4" +"@typescript-eslint/eslint-plugin@^8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.15.0.tgz#c95c6521e70c8b095a684d884d96c0c1c63747d2" + integrity sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg== + dependencies: + "@eslint-community/regexpp" "^4.10.0" + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/type-utils" "8.15.0" + "@typescript-eslint/utils" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" graphemer "^1.4.0" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@^5.55.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" - integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== - dependencies: - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" + ignore "^5.3.1" + natural-compare "^1.4.0" + ts-api-utils "^1.3.0" + +"@typescript-eslint/parser@^8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.15.0.tgz#92610da2b3af702cfbc02a46e2a2daa6260a9045" + integrity sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A== + dependencies: + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/typescript-estree" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" - integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== +"@typescript-eslint/scope-manager@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.15.0.tgz#28a1a0f13038f382424f45a988961acaca38f7c6" + integrity sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" -"@typescript-eslint/type-utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" - integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== +"@typescript-eslint/type-utils@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.15.0.tgz#a6da0f93aef879a68cc66c73fe42256cb7426c72" + integrity sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw== dependencies: - "@typescript-eslint/typescript-estree" "5.62.0" - "@typescript-eslint/utils" "5.62.0" + "@typescript-eslint/typescript-estree" "8.15.0" + "@typescript-eslint/utils" "8.15.0" debug "^4.3.4" - tsutils "^3.21.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/types@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" - integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/types@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.15.0.tgz#4958edf3d83e97f77005f794452e595aaf6430fc" + integrity sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ== -"@typescript-eslint/typescript-estree@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" - integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== +"@typescript-eslint/typescript-estree@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.15.0.tgz#915c94e387892b114a2a2cc0df2d7f19412c8ba7" + integrity sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg== dependencies: - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/visitor-keys" "8.15.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/utils@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" - integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== +"@typescript-eslint/utils@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.15.0.tgz#ac04679ad19252776b38b81954b8e5a65567cef6" + integrity sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ== dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.62.0" - "@typescript-eslint/types" "5.62.0" - "@typescript-eslint/typescript-estree" "5.62.0" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.62.0": - version "5.62.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" - integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== - dependencies: - "@typescript-eslint/types" "5.62.0" - eslint-visitor-keys "^3.3.0" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.15.0" + "@typescript-eslint/types" "8.15.0" + "@typescript-eslint/typescript-estree" "8.15.0" + +"@typescript-eslint/visitor-keys@8.15.0": + version "8.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.15.0.tgz#9ea5a85eb25401d2aa74ec8a478af4e97899ea12" + integrity sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q== + dependencies: + "@typescript-eslint/types" "8.15.0" + eslint-visitor-keys "^4.2.0" "@vitest/coverage-v8@^2.0.3": version "2.0.3" @@ -5754,6 +5788,11 @@ acorn@^8.11.3, acorn@^8.8.2: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + acorn@^8.9.0: version "8.11.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a" @@ -5861,11 +5900,6 @@ aria-hidden@^1.1.1: dependencies: tslib "^2.0.0" -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - arrify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" @@ -6700,7 +6734,7 @@ cross-fetch@^4.0.0: dependencies: node-fetch "^2.6.12" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -6709,6 +6743,15 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^7.0.5: + version "7.0.6" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + crossws@^0.2.0, crossws@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" @@ -6943,13 +6986,6 @@ dijkstrajs@^1.0.1: resolved "https://registry.yarnpkg.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz#4c8dbdea1f0f6478bff94d9c49c784d623e4fc23" integrity sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -7175,28 +7211,20 @@ escodegen@^1.13.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.7.0: - version "8.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" - integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== - -eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -eslint-scope@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc" - integrity sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og== +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== @@ -7206,28 +7234,37 @@ eslint-visitor-keys@^4.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.0.0.tgz#e3adc021aa038a2a8e0b2f8b0ce8f66b9483b1fb" integrity sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw== -eslint@^9.3.0: - version "9.3.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.3.0.tgz#36a96db84592618d6ed9074d677e92f4e58c08b9" - integrity sha512-5Iv4CsZW030lpUqHBapdPo3MJetAPtejVW8B84GIcIIv8+ohFaddXsrn1Gn8uD9ijDb+kcYKFUVmC8qG8B2ORQ== +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@^9.15.0: + version "9.15.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.15.0.tgz#77c684a4e980e82135ebff8ee8f0a9106ce6b8a6" + integrity sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.6.1" - "@eslint/eslintrc" "^3.1.0" - "@eslint/js" "9.3.0" - "@humanwhocodes/config-array" "^0.13.0" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.19.0" + "@eslint/core" "^0.9.0" + "@eslint/eslintrc" "^3.2.0" + "@eslint/js" "9.15.0" + "@eslint/plugin-kit" "^0.2.3" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@humanwhocodes/retry" "^0.3.0" - "@nodelib/fs.walk" "^1.2.8" + "@humanwhocodes/retry" "^0.4.1" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" ajv "^6.12.4" chalk "^4.0.0" - cross-spawn "^7.0.2" + cross-spawn "^7.0.5" debug "^4.3.2" escape-string-regexp "^4.0.0" - eslint-scope "^8.0.1" - eslint-visitor-keys "^4.0.0" - espree "^10.0.1" - esquery "^1.4.2" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^8.0.0" @@ -7236,15 +7273,11 @@ eslint@^9.3.0: ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.3" - strip-ansi "^6.0.1" - text-table "^0.2.0" esm@^3.2.25: version "3.2.25" @@ -7270,6 +7303,15 @@ espree@^10.0.1: acorn-jsx "^5.3.2" eslint-visitor-keys "^4.0.0" +espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== + dependencies: + acorn "^8.14.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^4.2.0" + espree@^9.0.0: version "9.6.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" @@ -7284,10 +7326,10 @@ esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -7298,7 +7340,7 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.2.0: version "4.3.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== @@ -7672,7 +7714,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.2.9: +fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -8087,18 +8129,6 @@ globals@^14.0.0: resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - google-auth-library@^8.0.2: version "8.9.0" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-8.9.0.tgz#15a271eb2ec35d43b81deb72211bd61b1ef14dd0" @@ -8433,6 +8463,11 @@ ignore@^5.2.0, ignore@^5.2.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== +ignore@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -8609,11 +8644,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-plain-obj@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" @@ -9353,7 +9383,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -9422,7 +9452,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.5, minimatch@^3.1.2: +minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -9600,11 +9630,6 @@ napi-wasm@^1.1.0: resolved "https://registry.yarnpkg.com/napi-wasm/-/napi-wasm-1.1.0.tgz#bbe617823765ae9c1bc12ff5942370eae7b2ba4e" integrity sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg== -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -10876,7 +10901,7 @@ secure-json-parse@^2.7.0: resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== -semver@^7.1.2, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: +semver@^7.1.2, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13" integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w== @@ -10965,11 +10990,6 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - solady@0.0.180: version "0.0.180" resolved "https://registry.yarnpkg.com/solady/-/solady-0.0.180.tgz#d806c84a0bf8b6e3d85a8fb0978980de086ff59e" @@ -11278,11 +11298,6 @@ text-hex@1.0.x: resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== -text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - thirdweb@5.26.0: version "5.26.0" resolved "https://registry.yarnpkg.com/thirdweb/-/thirdweb-5.26.0.tgz#00651fadb431e3423ffc3151b1ce079e0ca3cc1d" @@ -11444,7 +11459,12 @@ triple-beam@^1.3.0: resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.4.1.tgz#6fde70271dc6e5d73ca0c3b24e2d92afb7441984" integrity sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg== -tslib@1.14.1, tslib@^1.8.1: +ts-api-utils@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" + integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== + +tslib@1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -11464,13 +11484,6 @@ tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" From de0d56f6e51da26dc449b9ca834ec67227c03ce2 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Thu, 21 Nov 2024 21:01:52 -0600 Subject: [PATCH 04/11] fix weird generator spacing --- package.json | 1 + sdk/.babelrc | 4 +- sdk/old_openapi.json | 28139 ++++++++++++---- sdk/src/Engine.ts | 192 +- sdk/src/core/ApiError.ts | 36 +- sdk/src/core/ApiRequestOptions.ts | 29 +- sdk/src/core/ApiResult.ts | 10 +- sdk/src/core/BaseHttpRequest.ts | 11 +- sdk/src/core/CancelablePromise.ts | 222 +- sdk/src/core/FetchHttpRequest.ts | 35 +- sdk/src/core/OpenAPI.ts | 38 +- sdk/src/core/request.ts | 529 +- sdk/src/index.ts | 62 +- sdk/src/services/AccessTokensService.ts | 246 +- sdk/src/services/AccountFactoryService.ts | 470 +- sdk/src/services/AccountService.ts | 1046 +- sdk/src/services/BackendWalletService.ts | 2064 +- sdk/src/services/ChainService.ts | 254 +- sdk/src/services/ConfigurationService.ts | 1318 +- sdk/src/services/ContractEventsService.ts | 162 +- sdk/src/services/ContractMetadataService.ts | 390 +- sdk/src/services/ContractRolesService.ts | 522 +- sdk/src/services/ContractRoyaltiesService.ts | 542 +- sdk/src/services/ContractService.ts | 312 +- .../services/ContractSubscriptionsService.ts | 411 +- sdk/src/services/DefaultService.ts | 68 +- sdk/src/services/DeployService.ts | 2711 +- sdk/src/services/Erc1155Service.ts | 5155 +-- sdk/src/services/Erc20Service.ts | 3300 +- sdk/src/services/Erc721Service.ts | 4921 +-- sdk/src/services/KeypairService.ts | 267 +- .../MarketplaceDirectListingsService.ts | 2160 +- .../MarketplaceEnglishAuctionsService.ts | 1834 +- sdk/src/services/MarketplaceOffersService.ts | 1159 +- sdk/src/services/PermissionsService.ts | 176 +- sdk/src/services/RelayerService.ts | 393 +- sdk/src/services/TransactionService.ts | 1147 +- sdk/src/services/WebhooksService.ts | 299 +- 38 files changed, 37997 insertions(+), 22638 deletions(-) diff --git a/package.json b/package.json index 96be42a8f..184919e61 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "start:docker": "docker compose --profile engine --env-file ./.env up --remove-orphans", "start:docker-force-build": "docker compose --profile engine --env-file ./.env up --remove-orphans --build", "lint:fix": "eslint --fix 'src/**/*.ts'", + "lint:fix:sdk": "eslint --fix 'sdk/src/**/*.ts", "test:unit": "vitest", "test:coverage": "vitest run --coverage", "copy-files": "cp -r ./src/prisma ./dist/" diff --git a/sdk/.babelrc b/sdk/.babelrc index e15ac017a..614696c6c 100644 --- a/sdk/.babelrc +++ b/sdk/.babelrc @@ -1,3 +1,5 @@ { - "presets": ["@babel/preset-typescript"] + "presets": [ + "@babel/preset-typescript" + ] } diff --git a/sdk/old_openapi.json b/sdk/old_openapi.json index caf76231c..8fe058676 100644 --- a/sdk/old_openapi.json +++ b/sdk/old_openapi.json @@ -22,20 +22,32 @@ }, "paths": { "/json": { - "get": { "responses": { "200": { "description": "Default Response" } } } + "get": { + "responses": { + "200": { + "description": "Default Response" + } + } + } }, "/backend-wallet/create": { "post": { "operationId": "create", "summary": "Create backend wallet", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Create a backend wallet.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "label": { "type": "string" } } + "properties": { + "label": { + "type": "string" + } + } } } } @@ -57,14 +69,24 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { "type": "string" } + "status": { + "type": "string" + } }, - "required": ["walletAddress", "status"] + "required": [ + "walletAddress", + "status" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { - "result": { "walletAddress": "0x....", "status": "success" } + "result": { + "walletAddress": "0x....", + "status": "success" + } } } } @@ -81,11 +103,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -111,11 +141,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -141,11 +179,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -167,11 +213,16 @@ "delete": { "operationId": "removeBackendWallet", "summary": "Remove backend wallet", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are transferred out before removing a local wallet.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -189,12 +240,24 @@ "properties": { "result": { "type": "object", - "properties": { "status": { "type": "string" } }, - "required": ["status"] + "properties": { + "status": { + "type": "string" + } + }, + "required": [ + "status" + ] } }, - "required": ["result"], - "example": { "result": { "status": "success" } } + "required": [ + "result" + ], + "example": { + "result": { + "status": "success" + } + } } } } @@ -210,11 +273,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -240,11 +311,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -270,11 +349,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -296,7 +383,9 @@ "post": { "operationId": "import", "summary": "Import backend wallet", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Import an existing wallet as a backend wallet.", "requestBody": { "content": { @@ -308,7 +397,9 @@ "properties": { "awsKmsKeyId": { "description": "AWS KMS key ID", - "examples": ["12345678-1234-1234-1234-123456789012"], + "examples": [ + "12345678-1234-1234-1234-123456789012" + ], "type": "string" }, "awsKmsArn": { @@ -319,23 +410,33 @@ "type": "string" } }, - "required": ["awsKmsKeyId", "awsKmsArn"] + "required": [ + "awsKmsKeyId", + "awsKmsArn" + ] }, { "type": "object", "properties": { "gcpKmsKeyId": { "description": "GCP KMS key ID", - "examples": ["12345678-1234-1234-1234-123456789012"], + "examples": [ + "12345678-1234-1234-1234-123456789012" + ], "type": "string" }, "gcpKmsKeyVersionId": { "description": "GCP KMS key version ID", - "examples": ["1"], + "examples": [ + "1" + ], "type": "string" } }, - "required": ["gcpKmsKeyId", "gcpKmsKeyVersionId"] + "required": [ + "gcpKmsKeyId", + "gcpKmsKeyVersionId" + ] }, { "anyOf": [ @@ -347,7 +448,9 @@ "type": "string" } }, - "required": ["privateKey"] + "required": [ + "privateKey" + ] }, { "type": "object", @@ -357,7 +460,9 @@ "type": "string" } }, - "required": ["mnemonic"] + "required": [ + "mnemonic" + ] }, { "type": "object", @@ -371,7 +476,10 @@ "type": "string" } }, - "required": ["encryptedJson", "password"] + "required": [ + "encryptedJson", + "password" + ] } ] } @@ -389,7 +497,10 @@ } }, "example3": { - "value": { "encryptedJson": "", "password": "password123" } + "value": { + "encryptedJson": "", + "password": "password123" + } }, "example4": { "value": { @@ -424,14 +535,24 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { "type": "string" } + "status": { + "type": "string" + } }, - "required": ["walletAddress", "status"] + "required": [ + "walletAddress", + "status" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { - "result": { "walletAddress": "0x....", "status": "success" } + "result": { + "walletAddress": "0x....", + "status": "success" + } } } } @@ -448,11 +569,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -478,11 +607,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -508,11 +645,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -534,7 +679,9 @@ "post": { "operationId": "update", "summary": "Update backend wallet", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Update a backend wallet.", "requestBody": { "content": { @@ -548,9 +695,13 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "label": { "type": "string" } + "label": { + "type": "string" + } }, - "required": ["walletAddress"] + "required": [ + "walletAddress" + ] } } }, @@ -573,14 +724,24 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { "type": "string" } + "status": { + "type": "string" + } }, - "required": ["walletAddress", "status"] + "required": [ + "walletAddress", + "status" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { - "result": { "walletAddress": "0x....", "status": "success" } + "result": { + "walletAddress": "0x....", + "status": "success" + } } } } @@ -597,11 +758,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -627,11 +796,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -657,11 +834,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -683,11 +868,15 @@ "get": { "operationId": "getBalance", "summary": "Get balance", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Get the native balance for a backend wallet.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -695,7 +884,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -720,11 +912,21 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "walletAddress", @@ -736,7 +938,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "walletAddress": "0x...", @@ -762,11 +966,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -792,11 +1004,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -822,11 +1042,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -848,11 +1076,16 @@ "get": { "operationId": "getAll", "summary": "Get all backend wallets", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Get all backend wallets.", "parameters": [ { - "schema": { "default": "1", "type": "number" }, + "schema": { + "default": "1", + "type": "number" + }, "example": "1", "in": "query", "name": "page", @@ -860,7 +1093,10 @@ "description": "The page of wallets to get." }, { - "schema": { "default": "10", "type": "number" }, + "schema": { + "default": "10", + "type": "number" + }, "example": "10", "in": "query", "name": "limit", @@ -897,7 +1133,9 @@ "description": "A label for your wallet", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "awsKmsKeyId": { @@ -906,7 +1144,9 @@ "description": "AWS KMS Key ID", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "awsKmsArn": { @@ -915,7 +1155,9 @@ "description": "AWS KMS Key ARN", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gcpKmsKeyId": { @@ -924,7 +1166,9 @@ "description": "GCP KMS Key ID", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gcpKmsKeyRingId": { @@ -933,7 +1177,9 @@ "description": "GCP KMS Key Ring ID", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gcpKmsLocationId": { @@ -942,7 +1188,9 @@ "description": "GCP KMS Location ID", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gcpKmsKeyVersionId": { @@ -951,7 +1199,9 @@ "description": "GCP KMS Key Version ID", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gcpKmsResourcePath": { @@ -960,7 +1210,9 @@ "description": "GCP KMS Resource Path", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -979,7 +1231,9 @@ } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { @@ -1011,11 +1265,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1041,11 +1303,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1071,11 +1341,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1097,7 +1375,9 @@ "post": { "operationId": "transfer", "summary": "Transfer tokens", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Transfer native currency or ERC20 tokens to another wallet.", "requestBody": { "content": { @@ -1147,7 +1427,10 @@ } } }, - "required": ["to", "amount"] + "required": [ + "to", + "amount" + ] } } }, @@ -1155,14 +1438,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -1170,7 +1458,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1178,7 +1469,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1201,10 +1494,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -1225,11 +1522,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1255,11 +1560,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1285,11 +1598,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1311,7 +1632,9 @@ "post": { "operationId": "withdraw", "summary": "Withdraw funds", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Withdraw all funds from this wallet to another wallet.", "requestBody": { "content": { @@ -1326,7 +1649,9 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "required": ["toAddress"] + "required": [ + "toAddress" + ] } } }, @@ -1334,14 +1659,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -1349,7 +1679,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1357,7 +1690,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1374,11 +1709,19 @@ "properties": { "result": { "type": "object", - "properties": { "transactionHash": { "type": "string" } }, - "required": ["transactionHash"] + "properties": { + "transactionHash": { + "type": "string" + } + }, + "required": [ + "transactionHash" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -1394,11 +1737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1424,11 +1775,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1454,11 +1813,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1480,7 +1847,9 @@ "post": { "operationId": "sendTransaction", "summary": "Send a transaction", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Send a transaction with transaction parameters", "requestBody": { "content": { @@ -1494,8 +1863,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "data": { "type": "string", "example": "0x..." }, - "value": { "type": "string", "example": "10000000" }, + "data": { + "type": "string", + "example": "0x..." + }, + "value": { + "type": "string", + "example": "10000000" + }, "txOverrides": { "type": "object", "properties": { @@ -1517,13 +1892,18 @@ } } }, - "required": ["data", "value"] + "required": [ + "data", + "value" + ] }, "example": { "toAddress": "0x7a0ce8524bea337f0bee853b68fabde145dac0a0", "data": "0x449a52f800000000000000000000000043cae0d7fe86c713530e679ce02574743b2ee9fc0000000000000000000000000000000000000000000000000de0b6b3a7640000", "value": "0x00", - "txOverrides": { "gas": "50000" } + "txOverrides": { + "gas": "50000" + } } } }, @@ -1531,14 +1911,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -1546,7 +1931,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1554,14 +1942,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -1569,7 +1962,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -1593,10 +1989,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -1617,11 +2017,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1647,11 +2055,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1677,11 +2093,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1703,7 +2127,9 @@ "post": { "operationId": "sendTransactionBatch", "summary": "Send a batch of raw transactions", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Send a batch of raw transactions with transaction parameters", "requestBody": { "content": { @@ -1719,8 +2145,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "data": { "type": "string", "example": "0x..." }, - "value": { "type": "string", "example": "10000000" }, + "data": { + "type": "string", + "example": "0x..." + }, + "value": { + "type": "string", + "example": "10000000" + }, "txOverrides": { "type": "object", "properties": { @@ -1747,7 +2179,10 @@ } } }, - "required": ["data", "value"] + "required": [ + "data", + "value" + ] } } } @@ -1755,7 +2190,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -1763,7 +2200,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1771,7 +2211,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1791,13 +2233,19 @@ "properties": { "queueIds": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["queueIds"] + "required": [ + "queueIds" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -1813,11 +2261,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1843,11 +2299,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1873,11 +2337,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -1899,7 +2371,9 @@ "post": { "operationId": "signTransaction", "summary": "Sign a transaction", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Sign a transaction", "requestBody": { "content": { @@ -1910,27 +2384,53 @@ "transaction": { "type": "object", "properties": { - "to": { "type": "string" }, - "from": { "type": "string" }, - "nonce": { "type": "string" }, - "gasLimit": { "type": "string" }, - "gasPrice": { "type": "string" }, - "data": { "type": "string" }, - "value": { "type": "string" }, - "chainId": { "type": "number" }, - "type": { "type": "number" }, + "to": { + "type": "string" + }, + "from": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "gasLimit": { + "type": "string" + }, + "gasPrice": { + "type": "string" + }, + "data": { + "type": "string" + }, + "value": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "type": { + "type": "number" + }, "accessList": {}, - "maxFeePerGas": { "type": "string" }, - "maxPriorityFeePerGas": { "type": "string" }, + "maxFeePerGas": { + "type": "string" + }, + "maxPriorityFeePerGas": { + "type": "string" + }, "customData": { "type": "object", "additionalProperties": {} }, - "ccipReadEnabled": { "type": "boolean" } + "ccipReadEnabled": { + "type": "boolean" + } } } }, - "required": ["transaction"] + "required": [ + "transaction" + ] } } }, @@ -1938,7 +2438,10 @@ }, "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1946,7 +2449,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1960,8 +2465,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] } } } @@ -1977,11 +2488,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2007,11 +2526,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2037,11 +2564,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2063,7 +2598,9 @@ "post": { "operationId": "signMessage", "summary": "Sign a message", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Send a message", "requestBody": { "content": { @@ -2071,10 +2608,16 @@ "schema": { "type": "object", "properties": { - "message": { "type": "string" }, - "isBytes": { "type": "boolean" } + "message": { + "type": "string" + }, + "isBytes": { + "type": "boolean" + } }, - "required": ["message"] + "required": [ + "message" + ] } } }, @@ -2082,7 +2625,10 @@ }, "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2090,7 +2636,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2104,8 +2652,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] } } } @@ -2121,11 +2675,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2151,11 +2713,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2181,11 +2751,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2207,7 +2785,9 @@ "post": { "operationId": "signTypedData", "summary": "Sign an EIP-712 message", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Send an EIP-712 message (\"typed data\")", "requestBody": { "content": { @@ -2231,7 +2811,11 @@ "properties": {} } }, - "required": ["domain", "types", "value"] + "required": [ + "domain", + "types", + "value" + ] } } }, @@ -2239,7 +2823,10 @@ }, "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2247,7 +2834,9 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2261,8 +2850,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] } } } @@ -2278,11 +2873,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2308,11 +2911,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2338,11 +2949,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2364,11 +2983,17 @@ "get": { "operationId": "getTransactionsForBackendWallet", "summary": "Get recent transactions", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Get recent transactions for this backend wallet.", "parameters": [ { - "schema": { "default": 1, "minimum": 1, "type": "integer" }, + "schema": { + "default": 1, + "minimum": 1, + "type": "integer" + }, "example": 1, "in": "query", "name": "page", @@ -2376,7 +3001,10 @@ "description": "Specify the page number." }, { - "schema": { "default": 100, "type": "integer" }, + "schema": { + "default": 100, + "type": "integer" + }, "example": 100, "in": "query", "name": "limit", @@ -2387,10 +3015,30 @@ "schema": { "default": "queued", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["cancelled"] }, - { "type": "string", "enum": ["errored"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + } ] }, "in": "query", @@ -2399,7 +3047,9 @@ "description": "The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued'" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -2407,7 +3057,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -2437,17 +3090,44 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["sent"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["errored"] }, - { "type": "string", "enum": ["cancelled"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "sent" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + } ], "example": "queued" }, @@ -2457,7 +3137,9 @@ "description": "The chain ID for the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "fromAddress": { @@ -2466,7 +3148,9 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "toAddress": { @@ -2475,7 +3159,9 @@ "description": "The contract address to be called", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "data": { @@ -2484,7 +3170,9 @@ "description": "Encoded calldata", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "extension": { @@ -2493,7 +3181,9 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "value": { @@ -2502,7 +3192,9 @@ "description": "The amount of native currency to send", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "nonce": { @@ -2515,7 +3207,9 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasLimit": { @@ -2524,7 +3218,9 @@ "description": "The max gas unit limit", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasPrice": { @@ -2533,7 +3229,9 @@ "description": "The gas price used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxFeePerGas": { @@ -2542,7 +3240,9 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxPriorityFeePerGas": { @@ -2551,7 +3251,9 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionType": { @@ -2560,7 +3262,9 @@ "description": "The type of transaction", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionHash": { @@ -2569,7 +3273,9 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "queuedAt": { @@ -2578,7 +3284,9 @@ "description": "When the transaction is enqueued", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAt": { @@ -2587,7 +3295,9 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "minedAt": { @@ -2596,7 +3306,9 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cancelledAt": { @@ -2605,7 +3317,9 @@ "description": "When the transactino is cancelled", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractAddress": { @@ -2614,7 +3328,9 @@ "description": "The address for a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractType": { @@ -2623,7 +3339,9 @@ "description": "The type of a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "errorMessage": { @@ -2632,7 +3350,9 @@ "description": "The error that occurred", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAtBlockNumber": { @@ -2641,7 +3361,9 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "blockNumber": { @@ -2650,7 +3372,9 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryCount": { @@ -2663,7 +3387,9 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxFeePerGas": { @@ -2672,7 +3398,9 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxPriorityFeePerGas": { @@ -2681,7 +3409,9 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "signerAddress": { @@ -2694,7 +3424,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "accountAddress": { @@ -2707,7 +3439,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "target": { @@ -2720,7 +3454,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "sender": { @@ -2733,74 +3469,128 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "initCode": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "verificationGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "preVerificationGas": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "paymasterAndData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "userOpHash": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionName": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionArgs": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "onChainTxStatus": { "anyOf": [ - { "type": "number" }, - { "type": "null" } + { + "type": "number" + }, + { + "type": "null" + } ] }, "onchainStatus": { "anyOf": [ - { "type": "string", "enum": ["success"] }, - { "type": "string", "enum": ["reverted"] }, - { "type": "null" } + { + "type": "string", + "enum": [ + "success" + ] + }, + { + "type": "string", + "enum": [ + "reverted" + ] + }, + { + "type": "null" + } ] }, "effectiveGasPrice": { @@ -2809,7 +3599,9 @@ "description": "Effective Gas Price", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cumulativeGasUsed": { @@ -2818,7 +3610,9 @@ "description": "Cumulative Gas Used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -2872,10 +3666,14 @@ } } }, - "required": ["transactions"] + "required": [ + "transactions" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -2891,11 +3689,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2921,11 +3727,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2951,11 +3765,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -2977,11 +3799,16 @@ "get": { "operationId": "getTransactionsForBackendWalletByNonce", "summary": "Get recent transactions by nonce", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Get recent transactions for this backend wallet, sorted by descending nonce.", "parameters": [ { - "schema": { "minimum": 0, "type": "integer" }, + "schema": { + "minimum": 0, + "type": "integer" + }, "example": 100, "in": "query", "name": "fromNonce", @@ -2989,7 +3816,10 @@ "description": "The earliest nonce, inclusive." }, { - "schema": { "minimum": 0, "type": "integer" }, + "schema": { + "minimum": 0, + "type": "integer" + }, "example": 100, "in": "query", "name": "toNonce", @@ -2997,7 +3827,9 @@ "description": "The latest nonce, inclusive. If omitted, queries up to the latest sent nonce." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -3005,7 +3837,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -3026,7 +3861,9 @@ "items": { "type": "object", "properties": { - "nonce": { "type": "number" }, + "nonce": { + "type": "number" + }, "transaction": { "anyOf": [ { @@ -3038,7 +3875,9 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "status": { @@ -3051,13 +3890,35 @@ "cancelled" ], "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["sent"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["errored"] }, { "type": "string", - "enum": ["cancelled"] + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "sent" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] } ] }, @@ -3067,7 +3928,9 @@ "description": "The chain ID for the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "fromAddress": { @@ -3076,7 +3939,9 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "toAddress": { @@ -3085,7 +3950,9 @@ "description": "The contract address to be called", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "data": { @@ -3094,7 +3961,9 @@ "description": "Encoded calldata", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "extension": { @@ -3103,7 +3972,9 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "value": { @@ -3112,7 +3983,9 @@ "description": "The amount of native currency to send", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "nonce": { @@ -3125,7 +3998,9 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasLimit": { @@ -3134,7 +4009,9 @@ "description": "The max gas unit limit", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasPrice": { @@ -3143,7 +4020,9 @@ "description": "The gas price used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxFeePerGas": { @@ -3152,7 +4031,9 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxPriorityFeePerGas": { @@ -3161,7 +4042,9 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionType": { @@ -3170,7 +4053,9 @@ "description": "The type of transaction", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionHash": { @@ -3179,7 +4064,9 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "queuedAt": { @@ -3188,7 +4075,9 @@ "description": "When the transaction is enqueued", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAt": { @@ -3197,7 +4086,9 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "minedAt": { @@ -3206,7 +4097,9 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cancelledAt": { @@ -3215,7 +4108,9 @@ "description": "When the transactino is cancelled", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractAddress": { @@ -3224,7 +4119,9 @@ "description": "The address for a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractType": { @@ -3233,7 +4130,9 @@ "description": "The type of a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "errorMessage": { @@ -3242,7 +4141,9 @@ "description": "The error that occurred", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAtBlockNumber": { @@ -3251,7 +4152,9 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "blockNumber": { @@ -3260,7 +4163,9 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryCount": { @@ -3273,7 +4178,9 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxFeePerGas": { @@ -3282,7 +4189,9 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxPriorityFeePerGas": { @@ -3291,7 +4200,9 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "signerAddress": { @@ -3304,7 +4215,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "accountAddress": { @@ -3317,7 +4230,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "target": { @@ -3330,7 +4245,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "sender": { @@ -3343,77 +4260,128 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "initCode": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "verificationGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "preVerificationGas": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "paymasterAndData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "userOpHash": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionName": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionArgs": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "onChainTxStatus": { "anyOf": [ - { "type": "number" }, - { "type": "null" } + { + "type": "number" + }, + { + "type": "null" + } ] }, "onchainStatus": { "anyOf": [ - { "type": "string", "enum": ["success"] }, { "type": "string", - "enum": ["reverted"] + "enum": [ + "success" + ] }, - { "type": "null" } + { + "type": "string", + "enum": [ + "reverted" + ] + }, + { + "type": "null" + } ] }, "effectiveGasPrice": { @@ -3422,7 +4390,9 @@ "description": "Effective Gas Price", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cumulativeGasUsed": { @@ -3431,7 +4401,9 @@ "description": "Cumulative Gas Used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -3483,15 +4455,22 @@ "cumulativeGasUsed" ] }, - { "type": "string" } + { + "type": "string" + } ] } }, - "required": ["nonce", "transaction"] + "required": [ + "nonce", + "transaction" + ] } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -3507,11 +4486,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3537,11 +4524,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3567,11 +4562,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3593,7 +4596,9 @@ "post": { "operationId": "resetNonces", "summary": "Reset nonces", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens.", "responses": { "200": { @@ -3605,12 +4610,24 @@ "properties": { "result": { "type": "object", - "properties": { "status": { "type": "string" } }, - "required": ["status"] + "properties": { + "status": { + "type": "string" + } + }, + "required": [ + "status" + ] } }, - "required": ["result"], - "example": { "result": { "status": "success" } } + "required": [ + "result" + ], + "example": { + "result": { + "status": "success" + } + } } } } @@ -3626,11 +4643,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3656,11 +4681,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3686,11 +4719,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3712,11 +4753,15 @@ "get": { "operationId": "getNonce", "summary": "Get nonce", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -3724,7 +4769,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -3742,12 +4790,24 @@ "properties": { "result": { "type": "object", - "properties": { "nonce": { "type": "number" } }, - "required": ["nonce"] + "properties": { + "nonce": { + "type": "number" + } + }, + "required": [ + "nonce" + ] } }, - "required": ["result"], - "example": { "result": { "nonce": 100 } } + "required": [ + "result" + ], + "example": { + "result": { + "nonce": 100 + } + } } } } @@ -3763,11 +4823,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3793,11 +4861,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3823,11 +4899,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -3849,7 +4933,9 @@ "post": { "operationId": "simulateTransaction", "summary": "Simulate a transaction", - "tags": ["Backend Wallet"], + "tags": [ + "Backend Wallet" + ], "description": "Simulate a transaction with transaction parameters", "requestBody": { "content": { @@ -3877,8 +4963,14 @@ "type": "array", "items": { "anyOf": [ - { "description": "String argument", "type": "string" }, - { "description": "Numeric argument", "type": "number" }, + { + "description": "String argument", + "type": "string" + }, + { + "description": "Numeric argument", + "type": "number" + }, { "description": "Boolean argument", "type": "boolean" @@ -3896,9 +4988,14 @@ ] } }, - "data": { "description": "Raw calldata", "type": "string" } + "data": { + "description": "Raw calldata", + "type": "string" + } }, - "required": ["toAddress"] + "required": [ + "toAddress" + ] } } }, @@ -3906,7 +5003,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -3914,7 +5013,10 @@ "description": "Chain ID" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -3922,14 +5024,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -3937,7 +5044,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -3961,10 +5071,14 @@ "type": "boolean" } }, - "required": ["success"] + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -3980,11 +5094,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4010,11 +5132,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4040,11 +5170,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4066,7 +5204,9 @@ "get": { "operationId": "getWalletsConfiguration", "summary": "Get wallets configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get wallets configuration", "responses": { "200": { @@ -4081,26 +5221,57 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["local"] } + "type": { + "type": "string", + "enum": [ + "local" + ] + } }, - "required": ["type"] + "required": [ + "type" + ] }, { "type": "object", "properties": { - "type": { "type": "string", "enum": ["aws-kms"] }, - "awsAccessKeyId": { "type": "string" }, - "awsRegion": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "aws-kms" + ] + }, + "awsAccessKeyId": { + "type": "string" + }, + "awsRegion": { + "type": "string" + } }, - "required": ["type", "awsAccessKeyId", "awsRegion"] + "required": [ + "type", + "awsAccessKeyId", + "awsRegion" + ] }, { "type": "object", "properties": { - "type": { "type": "string", "enum": ["gcp-kms"] }, - "gcpApplicationProjectId": { "type": "string" }, - "gcpKmsLocationId": { "type": "string" }, - "gcpKmsKeyRingId": { "type": "string" }, + "type": { + "type": "string", + "enum": [ + "gcp-kms" + ] + }, + "gcpApplicationProjectId": { + "type": "string" + }, + "gcpKmsLocationId": { + "type": "string" + }, + "gcpKmsKeyRingId": { + "type": "string" + }, "gcpApplicationCredentialEmail": { "type": "string" } @@ -4116,7 +5287,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -4132,11 +5305,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4162,11 +5343,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4192,11 +5381,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4216,7 +5413,9 @@ "post": { "operationId": "updateWalletsConfiguration", "summary": "Update wallets configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update wallets configuration", "requestBody": { "content": { @@ -4226,17 +5425,35 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["local"] } + "type": { + "type": "string", + "enum": [ + "local" + ] + } }, - "required": ["type"] + "required": [ + "type" + ] }, { "type": "object", "properties": { - "type": { "type": "string", "enum": ["aws-kms"] }, - "awsAccessKeyId": { "type": "string" }, - "awsSecretAccessKey": { "type": "string" }, - "awsRegion": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "aws-kms" + ] + }, + "awsAccessKeyId": { + "type": "string" + }, + "awsSecretAccessKey": { + "type": "string" + }, + "awsRegion": { + "type": "string" + } }, "required": [ "type", @@ -4248,12 +5465,27 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["gcp-kms"] }, - "gcpApplicationProjectId": { "type": "string" }, - "gcpKmsLocationId": { "type": "string" }, - "gcpKmsKeyRingId": { "type": "string" }, - "gcpApplicationCredentialEmail": { "type": "string" }, - "gcpApplicationCredentialPrivateKey": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "gcp-kms" + ] + }, + "gcpApplicationProjectId": { + "type": "string" + }, + "gcpKmsLocationId": { + "type": "string" + }, + "gcpKmsKeyRingId": { + "type": "string" + }, + "gcpApplicationCredentialEmail": { + "type": "string" + }, + "gcpApplicationCredentialPrivateKey": { + "type": "string" + } }, "required": [ "type", @@ -4267,7 +5499,11 @@ ] }, "examples": { - "example1": { "value": { "type": "local" } }, + "example1": { + "value": { + "type": "local" + } + }, "example2": { "value": { "type": "aws-kms", @@ -4303,26 +5539,57 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["local"] } + "type": { + "type": "string", + "enum": [ + "local" + ] + } }, - "required": ["type"] + "required": [ + "type" + ] }, { "type": "object", "properties": { - "type": { "type": "string", "enum": ["aws-kms"] }, - "awsAccessKeyId": { "type": "string" }, - "awsRegion": { "type": "string" } + "type": { + "type": "string", + "enum": [ + "aws-kms" + ] + }, + "awsAccessKeyId": { + "type": "string" + }, + "awsRegion": { + "type": "string" + } }, - "required": ["type", "awsAccessKeyId", "awsRegion"] + "required": [ + "type", + "awsAccessKeyId", + "awsRegion" + ] }, { "type": "object", "properties": { - "type": { "type": "string", "enum": ["gcp-kms"] }, - "gcpApplicationProjectId": { "type": "string" }, - "gcpKmsLocationId": { "type": "string" }, - "gcpKmsKeyRingId": { "type": "string" }, + "type": { + "type": "string", + "enum": [ + "gcp-kms" + ] + }, + "gcpApplicationProjectId": { + "type": "string" + }, + "gcpKmsLocationId": { + "type": "string" + }, + "gcpKmsKeyRingId": { + "type": "string" + }, "gcpApplicationCredentialEmail": { "type": "string" } @@ -4338,7 +5605,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -4354,11 +5623,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4384,11 +5661,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4414,11 +5699,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4440,7 +5733,9 @@ "get": { "operationId": "getChainsConfiguration", "summary": "Get chain overrides configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get chain overrides configuration", "responses": { "200": { @@ -4486,7 +5781,11 @@ "type": "number" } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] }, "shortName": { "description": "Chain short name", @@ -4508,7 +5807,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -4524,11 +5825,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4554,11 +5863,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4584,11 +5901,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4608,7 +5933,9 @@ "post": { "operationId": "updateChainsConfiguration", "summary": "Update chain overrides configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update chain overrides configuration", "requestBody": { "content": { @@ -4652,7 +5979,11 @@ "type": "number" } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] }, "shortName": { "description": "Chain short name", @@ -4674,14 +6005,18 @@ } } }, - "required": ["chainOverrides"] + "required": [ + "chainOverrides" + ] }, "example": { "chainOverrides": [ { "name": "Localhost", "chain": "ETH", - "rpc": ["http://localhost:8545"], + "rpc": [ + "http://localhost:8545" + ], "nativeCurrency": { "name": "Ether", "symbol": "ETH", @@ -4740,7 +6075,11 @@ "type": "number" } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] }, "shortName": { "description": "Chain short name", @@ -4762,7 +6101,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -4778,11 +6119,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4808,11 +6157,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4838,11 +6195,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4864,7 +6229,9 @@ "get": { "operationId": "getTransactionConfiguration", "summary": "Get transaction processing configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get transactions processing configuration", "responses": { "200": { @@ -4877,21 +6244,56 @@ "result": { "type": "object", "properties": { - "minTxsToProcess": { "type": "number" }, - "maxTxsToProcess": { "type": "number" }, + "minTxsToProcess": { + "type": "number" + }, + "maxTxsToProcess": { + "type": "number" + }, "minedTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "maxTxsToUpdate": { + "type": "number" }, - "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "minEllapsedBlocksBeforeRetry": { + "type": "number" + }, + "maxFeePerGasForRetries": { + "type": "string" + }, + "maxPriorityFeePerGasForRetries": { + "type": "string" + }, + "maxRetriesPerTx": { + "type": "number" }, - "minEllapsedBlocksBeforeRetry": { "type": "number" }, - "maxFeePerGasForRetries": { "type": "string" }, - "maxPriorityFeePerGasForRetries": { "type": "string" }, - "maxRetriesPerTx": { "type": "number" }, "clearCacheCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -4908,7 +6310,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -4924,11 +6328,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4954,11 +6366,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -4984,11 +6404,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5008,7 +6436,9 @@ "post": { "operationId": "updateTransactionConfiguration", "summary": "Update transaction processing configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update transaction processing configuration", "requestBody": { "content": { @@ -5016,19 +6446,47 @@ "schema": { "type": "object", "properties": { - "minTxsToProcess": { "type": "number" }, - "maxTxsToProcess": { "type": "number" }, + "minTxsToProcess": { + "type": "number" + }, + "maxTxsToProcess": { + "type": "number" + }, "minedTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "maxTxsToUpdate": { + "type": "number" }, - "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "minEllapsedBlocksBeforeRetry": { + "type": "number" }, - "minEllapsedBlocksBeforeRetry": { "type": "number" }, - "maxFeePerGasForRetries": { "type": "string" }, - "maxPriorityFeePerGasForRetries": { "type": "string" }, - "maxRetriesPerTx": { "type": "number" } + "maxFeePerGasForRetries": { + "type": "string" + }, + "maxPriorityFeePerGasForRetries": { + "type": "string" + }, + "maxRetriesPerTx": { + "type": "number" + } } } } @@ -5045,19 +6503,47 @@ "result": { "type": "object", "properties": { - "minTxsToProcess": { "type": "number" }, - "maxTxsToProcess": { "type": "number" }, + "minTxsToProcess": { + "type": "number" + }, + "maxTxsToProcess": { + "type": "number" + }, "minedTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "maxTxsToUpdate": { + "type": "number" }, - "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "minEllapsedBlocksBeforeRetry": { + "type": "number" + }, + "maxFeePerGasForRetries": { + "type": "string" + }, + "maxPriorityFeePerGasForRetries": { + "type": "string" }, - "minEllapsedBlocksBeforeRetry": { "type": "number" }, - "maxFeePerGasForRetries": { "type": "string" }, - "maxPriorityFeePerGasForRetries": { "type": "string" }, - "maxRetriesPerTx": { "type": "number" } + "maxRetriesPerTx": { + "type": "number" + } }, "required": [ "minTxsToProcess", @@ -5072,7 +6558,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5088,11 +6576,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5118,11 +6614,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5148,11 +6652,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5174,7 +6686,9 @@ "get": { "operationId": "getAuthConfiguration", "summary": "Get auth configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get auth configuration", "responses": { "200": { @@ -5186,11 +6700,19 @@ "properties": { "result": { "type": "object", - "properties": { "domain": { "type": "string" } }, - "required": ["domain"] + "properties": { + "domain": { + "type": "string" + } + }, + "required": [ + "domain" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5206,11 +6728,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5236,11 +6766,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5266,11 +6804,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5290,15 +6836,23 @@ "post": { "operationId": "updateAuthConfiguration", "summary": "Update auth configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update auth configuration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "domain": { "type": "string" } }, - "required": ["domain"] + "properties": { + "domain": { + "type": "string" + } + }, + "required": [ + "domain" + ] } } }, @@ -5314,11 +6868,19 @@ "properties": { "result": { "type": "object", - "properties": { "domain": { "type": "string" } }, - "required": ["domain"] + "properties": { + "domain": { + "type": "string" + } + }, + "required": [ + "domain" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5334,11 +6896,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5364,11 +6934,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5394,11 +6972,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5420,7 +7006,9 @@ "get": { "operationId": "getBackendWalletBalanceConfiguration", "summary": "Get wallet-balance configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get wallet-balance configuration", "responses": { "200": { @@ -5438,10 +7026,14 @@ "type": "string" } }, - "required": ["minWalletBalance"] + "required": [ + "minWalletBalance" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5457,11 +7049,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5487,11 +7087,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5517,11 +7125,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5541,7 +7157,9 @@ "post": { "operationId": "updateBackendWalletBalanceConfiguration", "summary": "Update backend wallet balance configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update backend wallet balance configuration", "requestBody": { "content": { @@ -5574,10 +7192,14 @@ "type": "string" } }, - "required": ["minWalletBalance"] + "required": [ + "minWalletBalance" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5593,11 +7215,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5623,11 +7253,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5653,11 +7291,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5679,7 +7325,9 @@ "get": { "operationId": "getCorsConfiguration", "summary": "Get CORS configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get CORS configuration", "responses": { "200": { @@ -5689,9 +7337,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5707,11 +7362,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5737,11 +7400,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5767,11 +7438,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5791,7 +7470,9 @@ "post": { "operationId": "addUrlToCorsConfiguration", "summary": "Add a CORS URL", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Add a URL to allow client-side calls to Engine", "requestBody": { "content": { @@ -5808,7 +7489,9 @@ } } }, - "required": ["urlsToAdd"] + "required": [ + "urlsToAdd" + ] }, "example": { "urlsToAdd": [ @@ -5828,9 +7511,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5846,11 +7536,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5876,11 +7574,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5906,11 +7612,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -5930,7 +7644,9 @@ "delete": { "operationId": "removeUrlToCorsConfiguration", "summary": "Remove CORS URLs", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Remove URLs from CORS configuration", "requestBody": { "content": { @@ -5946,7 +7662,9 @@ } } }, - "required": ["urlsToRemove"] + "required": [ + "urlsToRemove" + ] }, "example": { "urlsToRemove": [ @@ -5966,9 +7684,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -5984,11 +7709,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6014,11 +7747,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6044,11 +7785,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6068,7 +7817,9 @@ "put": { "operationId": "setUrlsToCorsConfiguration", "summary": "Set CORS URLs", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Replaces the CORS URLs to allow client-side calls to Engine", "requestBody": { "content": { @@ -6085,10 +7836,15 @@ } } }, - "required": ["urls"] + "required": [ + "urls" + ] }, "example": { - "urls": ["https://example.com", "https://subdomain.example.com"] + "urls": [ + "https://example.com", + "https://subdomain.example.com" + ] } } }, @@ -6102,9 +7858,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6120,11 +7883,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6150,11 +7921,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6180,11 +7959,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6206,7 +7993,9 @@ "get": { "operationId": "getCacheConfiguration", "summary": "Get cache configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get cache configuration", "responses": { "200": { @@ -6219,12 +8008,18 @@ "result": { "type": "object", "properties": { - "clearCacheCronSchedule": { "type": "string" } + "clearCacheCronSchedule": { + "type": "string" + } }, - "required": ["clearCacheCronSchedule"] + "required": [ + "clearCacheCronSchedule" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6240,11 +8035,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6270,11 +8073,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6300,11 +8111,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6324,7 +8143,9 @@ "post": { "operationId": "updateCacheConfiguration", "summary": "Update cache configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update cache configuration", "requestBody": { "content": { @@ -6339,7 +8160,9 @@ "type": "string" } }, - "required": ["clearCacheCronSchedule"] + "required": [ + "clearCacheCronSchedule" + ] } } }, @@ -6356,12 +8179,18 @@ "result": { "type": "object", "properties": { - "clearCacheCronSchedule": { "type": "string" } + "clearCacheCronSchedule": { + "type": "string" + } }, - "required": ["clearCacheCronSchedule"] + "required": [ + "clearCacheCronSchedule" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6377,11 +8206,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6407,11 +8244,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6437,11 +8282,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6463,7 +8316,9 @@ "get": { "operationId": "getContractSubscriptionsConfiguration", "summary": "Get Contract Subscriptions configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get the configuration for Contract Subscriptions", "responses": { "200": { @@ -6476,7 +8331,9 @@ "result": { "type": "object", "properties": { - "maxBlocksToIndex": { "type": "number" }, + "maxBlocksToIndex": { + "type": "number" + }, "contractSubscriptionsRequeryDelaySeconds": { "type": "string" } @@ -6487,7 +8344,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6503,11 +8362,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6533,11 +8400,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6563,11 +8438,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6587,7 +8470,9 @@ "post": { "operationId": "updateContractSubscriptionsConfiguration", "summary": "Update Contract Subscriptions configuration", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Update the configuration for Contract Subscriptions", "requestBody": { "content": { @@ -6619,7 +8504,9 @@ "result": { "type": "object", "properties": { - "maxBlocksToIndex": { "type": "number" }, + "maxBlocksToIndex": { + "type": "number" + }, "contractSubscriptionsRequeryDelaySeconds": { "type": "string" } @@ -6630,7 +8517,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6646,11 +8535,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6676,11 +8573,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6706,11 +8611,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6732,7 +8645,9 @@ "get": { "operationId": "getIpAllowlist", "summary": "Get Allowed IP Addresses", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Get the list of allowed IP addresses", "responses": { "200": { @@ -6742,9 +8657,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6760,11 +8682,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6790,11 +8720,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6820,11 +8758,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6844,7 +8790,9 @@ "put": { "operationId": "setIpAllowlist", "summary": "Set IP Allowlist", - "tags": ["Configuration"], + "tags": [ + "Configuration" + ], "description": "Replaces the IP Allowlist array to allow calls to Engine", "requestBody": { "content": { @@ -6862,9 +8810,16 @@ } } }, - "required": ["ips"] + "required": [ + "ips" + ] }, - "example": { "ips": ["8.8.8.8", "172.217.255.255"] } + "example": { + "ips": [ + "8.8.8.8", + "172.217.255.255" + ] + } } }, "required": true @@ -6877,9 +8832,16 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -6895,11 +8857,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6925,11 +8895,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6955,11 +8933,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -6981,7 +8967,9 @@ "get": { "operationId": "getAll", "summary": "Get all webhooks configured", - "tags": ["Webhooks"], + "tags": [ + "Webhooks" + ], "description": "Get all webhooks configuration data set up on Engine", "responses": { "200": { @@ -6996,15 +8984,34 @@ "items": { "type": "object", "properties": { - "url": { "type": "string" }, + "url": { + "type": "string" + }, "name": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "secret": { + "type": "string" + }, + "eventType": { + "type": "string" }, - "secret": { "type": "string" }, - "eventType": { "type": "string" }, - "active": { "type": "boolean" }, - "createdAt": { "type": "string" }, - "id": { "type": "number" } + "active": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "number" + } }, "required": [ "url", @@ -7017,7 +9024,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7033,11 +9042,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7063,11 +9080,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7093,11 +9118,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7119,7 +9152,9 @@ "post": { "operationId": "create", "summary": "Create a webhook", - "tags": ["Webhooks"], + "tags": [ + "Webhooks" + ], "description": "Create a webhook to call when certain blockchain events occur.", "requestBody": { "content": { @@ -7132,22 +9167,73 @@ "type": "string", "example": "https://example.com/webhook" }, - "name": { "minLength": 3, "type": "string" }, + "name": { + "minLength": 3, + "type": "string" + }, "eventType": { "anyOf": [ - { "type": "string", "enum": ["queued_transaction"] }, - { "type": "string", "enum": ["sent_transaction"] }, - { "type": "string", "enum": ["mined_transaction"] }, - { "type": "string", "enum": ["errored_transaction"] }, - { "type": "string", "enum": ["cancelled_transaction"] }, - { "type": "string", "enum": ["all_transactions"] }, - { "type": "string", "enum": ["backend_wallet_balance"] }, - { "type": "string", "enum": ["auth"] }, - { "type": "string", "enum": ["contract_subscription"] } + { + "type": "string", + "enum": [ + "queued_transaction" + ] + }, + { + "type": "string", + "enum": [ + "sent_transaction" + ] + }, + { + "type": "string", + "enum": [ + "mined_transaction" + ] + }, + { + "type": "string", + "enum": [ + "errored_transaction" + ] + }, + { + "type": "string", + "enum": [ + "cancelled_transaction" + ] + }, + { + "type": "string", + "enum": [ + "all_transactions" + ] + }, + { + "type": "string", + "enum": [ + "backend_wallet_balance" + ] + }, + { + "type": "string", + "enum": [ + "auth" + ] + }, + { + "type": "string", + "enum": [ + "contract_subscription" + ] + } ] } }, - "required": ["url", "eventType"] + "required": [ + "url", + "eventType" + ] }, "examples": { "example1": { @@ -7222,15 +9308,34 @@ "result": { "type": "object", "properties": { - "url": { "type": "string" }, + "url": { + "type": "string" + }, "name": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "secret": { + "type": "string" + }, + "eventType": { + "type": "string" }, - "secret": { "type": "string" }, - "eventType": { "type": "string" }, - "active": { "type": "boolean" }, - "createdAt": { "type": "string" }, - "id": { "type": "number" } + "active": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "number" + } }, "required": [ "url", @@ -7242,7 +9347,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7258,11 +9365,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7288,11 +9403,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7318,11 +9441,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7344,15 +9475,23 @@ "post": { "operationId": "revoke", "summary": "Revoke webhook", - "tags": ["Webhooks"], + "tags": [ + "Webhooks" + ], "description": "Revoke a Webhook", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "id": { "type": "number" } }, - "required": ["id"] + "properties": { + "id": { + "type": "number" + } + }, + "required": [ + "id" + ] } } }, @@ -7368,11 +9507,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7388,11 +9535,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7418,11 +9573,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7448,11 +9611,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7474,7 +9645,9 @@ "get": { "operationId": "getEventTypes", "summary": "Get webhooks event types", - "tags": ["Webhooks"], + "tags": [ + "Webhooks" + ], "description": "Get the all the webhooks event types", "responses": { "200": { @@ -7488,29 +9661,67 @@ "type": "array", "items": { "anyOf": [ - { "type": "string", "enum": ["queued_transaction"] }, - { "type": "string", "enum": ["sent_transaction"] }, - { "type": "string", "enum": ["mined_transaction"] }, - { "type": "string", "enum": ["errored_transaction"] }, { "type": "string", - "enum": ["cancelled_transaction"] + "enum": [ + "queued_transaction" + ] + }, + { + "type": "string", + "enum": [ + "sent_transaction" + ] + }, + { + "type": "string", + "enum": [ + "mined_transaction" + ] + }, + { + "type": "string", + "enum": [ + "errored_transaction" + ] + }, + { + "type": "string", + "enum": [ + "cancelled_transaction" + ] + }, + { + "type": "string", + "enum": [ + "all_transactions" + ] + }, + { + "type": "string", + "enum": [ + "backend_wallet_balance" + ] }, - { "type": "string", "enum": ["all_transactions"] }, { "type": "string", - "enum": ["backend_wallet_balance"] + "enum": [ + "auth" + ] }, - { "type": "string", "enum": ["auth"] }, { "type": "string", - "enum": ["contract_subscription"] + "enum": [ + "contract_subscription" + ] } ] } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7526,11 +9737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7556,11 +9775,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7586,11 +9813,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7612,7 +9847,9 @@ "get": { "operationId": "getAll", "summary": "Get all permissions", - "tags": ["Permissions"], + "tags": [ + "Permissions" + ], "description": "Get all users with their corresponding permissions", "responses": { "200": { @@ -7633,16 +9870,31 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "permissions": { "type": "string" }, + "permissions": { + "type": "string" + }, "label": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, - "required": ["walletAddress", "permissions", "label"] + "required": [ + "walletAddress", + "permissions", + "label" + ] } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7658,11 +9910,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7688,11 +9948,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7718,11 +9986,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7744,7 +10020,9 @@ "post": { "operationId": "grant", "summary": "Grant permissions to user", - "tags": ["Permissions"], + "tags": [ + "Permissions" + ], "description": "Grant permissions to a user", "requestBody": { "content": { @@ -7760,13 +10038,28 @@ }, "permissions": { "anyOf": [ - { "type": "string", "enum": ["ADMIN"] }, - { "type": "string", "enum": ["OWNER"] } + { + "type": "string", + "enum": [ + "ADMIN" + ] + }, + { + "type": "string", + "enum": [ + "OWNER" + ] + } ] }, - "label": { "type": "string" } + "label": { + "type": "string" + } }, - "required": ["walletAddress", "permissions"] + "required": [ + "walletAddress", + "permissions" + ] } } }, @@ -7782,11 +10075,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7802,11 +10103,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7832,11 +10141,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7862,11 +10179,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7888,7 +10213,9 @@ "post": { "operationId": "revoke", "summary": "Revoke permissions from user", - "tags": ["Permissions"], + "tags": [ + "Permissions" + ], "description": "Revoke a user's permissions", "requestBody": { "content": { @@ -7903,7 +10230,9 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "required": ["walletAddress"] + "required": [ + "walletAddress" + ] } } }, @@ -7919,11 +10248,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -7939,11 +10276,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7969,11 +10314,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -7999,11 +10352,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8025,7 +10386,9 @@ "get": { "operationId": "getAll", "summary": "Get all access tokens", - "tags": ["Access Tokens"], + "tags": [ + "Access Tokens" + ], "description": "Get all access tokens", "responses": { "200": { @@ -8040,18 +10403,33 @@ "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "tokenMask": { "type": "string" }, + "id": { + "type": "string" + }, + "tokenMask": { + "type": "string" + }, "walletAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "createdAt": { "type": "string" }, - "expiresAt": { "type": "string" }, + "createdAt": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, "label": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -8065,7 +10443,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8081,11 +10461,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8111,11 +10499,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8141,11 +10537,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8167,14 +10571,20 @@ "post": { "operationId": "create", "summary": "Create a new access token", - "tags": ["Access Tokens"], + "tags": [ + "Access Tokens" + ], "description": "Create a new access token", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "label": { "type": "string" } } + "properties": { + "label": { + "type": "string" + } + } } } } @@ -8190,20 +10600,37 @@ "result": { "type": "object", "properties": { - "id": { "type": "string" }, - "tokenMask": { "type": "string" }, + "id": { + "type": "string" + }, + "tokenMask": { + "type": "string" + }, "walletAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "createdAt": { "type": "string" }, - "expiresAt": { "type": "string" }, + "createdAt": { + "type": "string" + }, + "expiresAt": { + "type": "string" + }, "label": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, - "accessToken": { "type": "string" } + "accessToken": { + "type": "string" + } }, "required": [ "id", @@ -8216,7 +10643,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8232,11 +10661,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8262,11 +10699,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8292,11 +10737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8318,15 +10771,23 @@ "post": { "operationId": "revoke", "summary": "Revoke an access token", - "tags": ["Access Tokens"], + "tags": [ + "Access Tokens" + ], "description": "Revoke an access token", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "id": { "type": "string" } }, - "required": ["id"] + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] } } }, @@ -8342,11 +10803,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8362,11 +10831,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8392,11 +10869,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8422,11 +10907,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8448,7 +10941,9 @@ "post": { "operationId": "update", "summary": "Update an access token", - "tags": ["Access Tokens"], + "tags": [ + "Access Tokens" + ], "description": "Update an access token", "requestBody": { "content": { @@ -8456,10 +10951,16 @@ "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "label": { "type": "string" } + "id": { + "type": "string" + }, + "label": { + "type": "string" + } }, - "required": ["id"] + "required": [ + "id" + ] } } }, @@ -8475,11 +10976,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8495,11 +11004,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8525,11 +11042,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8555,11 +11080,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8581,7 +11114,9 @@ "get": { "operationId": "list", "summary": "List public keys", - "tags": ["Keypair"], + "tags": [ + "Keypair" + ], "description": "List the public keys configured with Engine", "responses": { "200": { @@ -8633,7 +11168,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8649,11 +11186,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8679,11 +11224,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8709,11 +11262,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8735,7 +11296,9 @@ "post": { "operationId": "add", "summary": "Add public key", - "tags": ["Keypair"], + "tags": [ + "Keypair" + ], "description": "Add the public key for a keypair", "requestBody": { "content": { @@ -8749,20 +11312,70 @@ }, "algorithm": { "anyOf": [ - { "type": "string", "enum": ["RS256"] }, - { "type": "string", "enum": ["RS384"] }, - { "type": "string", "enum": ["RS512"] }, - { "type": "string", "enum": ["ES256"] }, - { "type": "string", "enum": ["ES384"] }, - { "type": "string", "enum": ["ES512"] }, - { "type": "string", "enum": ["PS256"] }, - { "type": "string", "enum": ["PS384"] }, - { "type": "string", "enum": ["PS512"] } + { + "type": "string", + "enum": [ + "RS256" + ] + }, + { + "type": "string", + "enum": [ + "RS384" + ] + }, + { + "type": "string", + "enum": [ + "RS512" + ] + }, + { + "type": "string", + "enum": [ + "ES256" + ] + }, + { + "type": "string", + "enum": [ + "ES384" + ] + }, + { + "type": "string", + "enum": [ + "ES512" + ] + }, + { + "type": "string", + "enum": [ + "PS256" + ] + }, + { + "type": "string", + "enum": [ + "PS384" + ] + }, + { + "type": "string", + "enum": [ + "PS512" + ] + } ] }, - "label": { "type": "string" } + "label": { + "type": "string" + } }, - "required": ["publicKey", "algorithm"] + "required": [ + "publicKey", + "algorithm" + ] } } }, @@ -8818,10 +11431,14 @@ ] } }, - "required": ["keypair"] + "required": [ + "keypair" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8837,11 +11454,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8867,11 +11492,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8897,11 +11530,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8923,15 +11564,23 @@ "post": { "operationId": "remove", "summary": "Remove public key", - "tags": ["Keypair"], + "tags": [ + "Keypair" + ], "description": "Remove the public key for a keypair", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "hash": { "type": "string" } }, - "required": ["hash"] + "properties": { + "hash": { + "type": "string" + } + }, + "required": [ + "hash" + ] } } }, @@ -8947,11 +11596,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -8967,11 +11624,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -8997,11 +11662,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9027,11 +11700,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9053,14 +11734,22 @@ "get": { "operationId": "get", "summary": "Get chain details", - "tags": ["Chain"], + "tags": [ + "Chain" + ], "description": "Get details about a chain.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "examples": { - "1": { "value": "1" }, - "ethereum": { "value": "ethereum" } + "1": { + "value": "1" + }, + "ethereum": { + "value": "ethereum" + } }, "in": "query", "name": "chain", @@ -9110,7 +11799,11 @@ "type": "number" } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] }, "shortName": { "description": "Chain short name", @@ -9131,7 +11824,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": { @@ -9165,11 +11860,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9195,11 +11898,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9225,11 +11936,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9251,7 +11970,9 @@ "get": { "operationId": "getAll", "summary": "Get all chain details", - "tags": ["Chain"], + "tags": [ + "Chain" + ], "description": "Get details about all supported chains.", "responses": { "200": { @@ -9297,7 +12018,11 @@ "type": "number" } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] }, "shortName": { "description": "Chain short name", @@ -9319,7 +12044,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -9371,11 +12098,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9401,11 +12136,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9431,11 +12174,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9457,7 +12208,9 @@ "get": { "operationId": "getAll", "summary": "Get all meta-transaction relayers", - "tags": ["Relayer"], + "tags": [ + "Relayer" + ], "description": "Get all meta-transaction relayers", "responses": { "200": { @@ -9472,11 +12225,22 @@ "items": { "type": "object", "properties": { - "id": { "type": "string" }, + "id": { + "type": "string" + }, "name": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] + }, + "chainId": { + "type": "string" }, - "chainId": { "type": "string" }, "backendWalletAddress": { "description": "A contract or wallet address", "type": "string", @@ -9487,18 +12251,26 @@ "anyOf": [ { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, - { "type": "null" } + { + "type": "null" + } ] }, "allowedForwarders": { "anyOf": [ { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -9513,7 +12285,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -9529,11 +12303,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9559,11 +12341,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9589,11 +12379,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9615,7 +12413,9 @@ "post": { "operationId": "create", "summary": "Create a new meta-transaction relayer", - "tags": ["Relayer"], + "tags": [ + "Relayer" + ], "description": "Create a new meta-transaction relayer", "requestBody": { "content": { @@ -9623,8 +12423,12 @@ "schema": { "type": "object", "properties": { - "name": { "type": "string" }, - "chain": { "type": "string" }, + "name": { + "type": "string" + }, + "chain": { + "type": "string" + }, "backendWalletAddress": { "description": "The address of the backend wallet to use for relaying transactions.", "type": "string", @@ -9650,14 +12454,21 @@ } } }, - "required": ["chain", "backendWalletAddress"] + "required": [ + "chain", + "backendWalletAddress" + ] }, "example": { "name": "My relayer", "chain": "mainnet", "backendWalletAddress": "0", - "allowedContracts": ["0x1234...."], - "allowedForwarders": ["0x1234..."] + "allowedContracts": [ + "0x1234...." + ], + "allowedForwarders": [ + "0x1234..." + ] } } }, @@ -9673,11 +12484,19 @@ "properties": { "result": { "type": "object", - "properties": { "relayerId": { "type": "string" } }, - "required": ["relayerId"] + "properties": { + "relayerId": { + "type": "string" + } + }, + "required": [ + "relayerId" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -9693,11 +12512,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9723,11 +12550,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9753,11 +12588,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9779,15 +12622,23 @@ "post": { "operationId": "revoke", "summary": "Revoke a relayer", - "tags": ["Relayer"], + "tags": [ + "Relayer" + ], "description": "Revoke a relayer", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "id": { "type": "string" } }, - "required": ["id"] + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ] } } }, @@ -9803,11 +12654,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -9823,11 +12682,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9853,11 +12720,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9883,11 +12758,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -9909,7 +12792,9 @@ "post": { "operationId": "update", "summary": "Update a relayer", - "tags": ["Relayer"], + "tags": [ + "Relayer" + ], "description": "Update a relayer", "requestBody": { "content": { @@ -9917,9 +12802,15 @@ "schema": { "type": "object", "properties": { - "id": { "type": "string" }, - "name": { "type": "string" }, - "chain": { "type": "string" }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "chain": { + "type": "string" + }, "backendWalletAddress": { "description": "A contract or wallet address", "type": "string", @@ -9928,14 +12819,20 @@ }, "allowedContracts": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "allowedForwarders": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["id"] + "required": [ + "id" + ] } } }, @@ -9951,11 +12848,19 @@ "properties": { "result": { "type": "object", - "properties": { "success": { "type": "boolean" } }, - "required": ["success"] + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -9971,11 +12876,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10001,11 +12914,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10031,11 +12952,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10057,7 +12986,9 @@ "post": { "operationId": "relay", "summary": "Relay a meta-transaction", - "tags": ["Relayer"], + "tags": [ + "Relayer" + ], "description": "Relay an EIP-2771 meta-transaction", "requestBody": { "content": { @@ -10067,17 +12998,36 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["forward"] }, + "type": { + "type": "string", + "enum": [ + "forward" + ] + }, "request": { "type": "object", "properties": { - "from": { "type": "string" }, - "to": { "type": "string" }, - "value": { "type": "string" }, - "gas": { "type": "string" }, - "nonce": { "type": "string" }, - "data": { "type": "string" }, - "chainid": { "type": "string" } + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "value": { + "type": "string" + }, + "gas": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "data": { + "type": "string" + }, + "chainid": { + "type": "string" + } }, "required": [ "from", @@ -10088,7 +13038,9 @@ "data" ] }, - "signature": { "type": "string" }, + "signature": { + "type": "string" + }, "forwarderAddress": { "description": "A contract or wallet address", "examples": [ @@ -10108,16 +13060,33 @@ { "type": "object", "properties": { - "type": { "type": "string", "enum": ["permit"] }, + "type": { + "type": "string", + "enum": [ + "permit" + ] + }, "request": { "type": "object", "properties": { - "to": { "type": "string" }, - "owner": { "type": "string" }, - "spender": { "type": "string" }, - "value": { "type": "string" }, - "nonce": { "type": "string" }, - "deadline": { "type": "string" } + "to": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "spender": { + "type": "string" + }, + "value": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "deadline": { + "type": "string" + } }, "required": [ "to", @@ -10128,29 +13097,53 @@ "deadline" ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["type", "request", "signature"] + "required": [ + "type", + "request", + "signature" + ] }, { "type": "object", "properties": { "type": { "type": "string", - "enum": ["execute-meta-transaction"] + "enum": [ + "execute-meta-transaction" + ] }, "request": { "type": "object", "properties": { - "from": { "type": "string" }, - "to": { "type": "string" }, - "data": { "type": "string" } + "from": { + "type": "string" + }, + "to": { + "type": "string" + }, + "data": { + "type": "string" + } }, - "required": ["from", "to", "data"] + "required": [ + "from", + "to", + "data" + ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["type", "request", "signature"] + "required": [ + "type", + "request", + "signature" + ] } ] } @@ -10159,7 +13152,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "path", "name": "relayerId", "required": true @@ -10181,10 +13176,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -10205,11 +13204,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10235,11 +13242,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10265,11 +13280,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10291,11 +13314,15 @@ "get": { "operationId": "read", "summary": "Read from contract", - "tags": ["Contract"], + "tags": [ + "Contract" + ], "description": "Call a read function on a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "balanceOf", "in": "query", "name": "functionName", @@ -10303,7 +13330,9 @@ "description": "Name of the function to call on Contract" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "", "in": "query", "name": "args", @@ -10311,7 +13340,9 @@ "description": "Arguments for the function. Comma Separated" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -10319,7 +13350,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -10334,8 +13368,12 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": {} }, - "required": ["result"] + "properties": { + "result": {} + }, + "required": [ + "result" + ] } } } @@ -10351,11 +13389,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10381,11 +13427,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10411,11 +13465,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10437,7 +13499,9 @@ "post": { "operationId": "write", "summary": "Write to contract", - "tags": ["Contract"], + "tags": [ + "Contract" + ], "description": "Call a write function on a contract.", "requestBody": { "content": { @@ -10484,25 +13548,43 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } @@ -10514,31 +13596,52 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } } } }, - "stateMutability": { "type": "string" } + "stateMutability": { + "type": "string" + } }, - "required": ["type"] + "required": [ + "type" + ] } } }, - "required": ["functionName", "args"] + "required": [ + "functionName", + "args" + ] } } }, @@ -10546,14 +13649,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -10561,7 +13669,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -10569,7 +13680,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -10577,14 +13691,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -10592,7 +13711,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -10616,10 +13738,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -10636,13 +13762,22 @@ "get": { "operationId": "getAllEvents", "summary": "Get all events", - "tags": ["Contract-Events"], + "tags": [ + "Contract-Events" + ], "description": "Get a list of all blockchain events for this contract.", "parameters": [ { "schema": { "default": "0", - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "in": "query", "name": "fromBlock", @@ -10652,8 +13787,14 @@ "schema": { "default": "latest", "anyOf": [ - { "default": 0, "type": "number" }, - { "default": "0", "type": "string" } + { + "default": 0, + "type": "number" + }, + { + "default": "0", + "type": "string" + } ] }, "in": "query", @@ -10664,8 +13805,18 @@ "schema": { "default": "desc", "anyOf": [ - { "type": "string", "enum": ["asc"] }, - { "type": "string", "enum": ["desc"] } + { + "type": "string", + "enum": [ + "asc" + ] + }, + { + "type": "string", + "enum": [ + "desc" + ] + } ] }, "in": "query", @@ -10673,7 +13824,9 @@ "required": false }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -10681,7 +13834,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -10699,10 +13855,15 @@ "properties": { "result": { "type": "array", - "items": { "type": "object", "additionalProperties": {} } + "items": { + "type": "object", + "additionalProperties": {} + } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { @@ -10710,7 +13871,10 @@ "data": { "from": "0x0000000000000000000000000000000000000000", "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", - "tokenId": { "type": "BigNumber", "hex": "0x01" } + "tokenId": { + "type": "BigNumber", + "hex": "0x01" + } }, "transaction": { "blockNumber": 35439713, @@ -10748,11 +13912,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10778,11 +13950,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10808,11 +13988,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10834,7 +14022,9 @@ "post": { "operationId": "getEvents", "summary": "Get events", - "tags": ["Contract-Events"], + "tags": [ + "Contract-Events" + ], "description": "Get a list of specific blockchain events emitted from this contract.", "requestBody": { "content": { @@ -10843,28 +14033,59 @@ "description": "Specify the from and to block numbers to get events for, defaults to all blocks", "type": "object", "properties": { - "eventName": { "type": "string", "example": "Transfer" }, + "eventName": { + "type": "string", + "example": "Transfer" + }, "fromBlock": { "default": "0", - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "toBlock": { "default": "latest", "anyOf": [ - { "default": 0, "type": "number" }, - { "default": "0", "type": "string" } + { + "default": 0, + "type": "number" + }, + { + "default": "0", + "type": "string" + } ] }, "order": { "default": "desc", "anyOf": [ - { "type": "string", "enum": ["asc"] }, - { "type": "string", "enum": ["desc"] } + { + "type": "string", + "enum": [ + "asc" + ] + }, + { + "type": "string", + "enum": [ + "desc" + ] + } ] }, - "filters": { "type": "object", "properties": {} } + "filters": { + "type": "object", + "properties": {} + } }, - "required": ["eventName"] + "required": [ + "eventName" + ] } } }, @@ -10873,7 +14094,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -10881,7 +14104,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -10899,10 +14125,15 @@ "properties": { "result": { "type": "array", - "items": { "type": "object", "additionalProperties": {} } + "items": { + "type": "object", + "additionalProperties": {} + } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "eventName": "ApprovalForAll", @@ -10945,11 +14176,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -10975,11 +14214,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11005,11 +14252,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11031,11 +14286,15 @@ "get": { "operationId": "getAbi", "summary": "Get ABI", - "tags": ["Contract-Metadata"], + "tags": [ + "Contract-Metadata" + ], "description": "Get the ABI of a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11043,7 +14302,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11064,25 +14326,43 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } @@ -11094,49 +14374,87 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } } } }, - "stateMutability": { "type": "string" } + "stateMutability": { + "type": "string" + } }, - "required": ["type"] + "required": [ + "type" + ] } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { "type": "function", "name": "transferFrom", "inputs": [ - { "type": "address", "name": "from" }, - { "type": "address", "name": "to" }, - { "type": "uint256", "name": "tokenId" } + { + "type": "address", + "name": "from" + }, + { + "type": "address", + "name": "to" + }, + { + "type": "uint256", + "name": "tokenId" + } ] }, { "type": "event", "name": "Transfer", "inputs": [ - { "type": "address", "name": "from" }, - { "type": "address", "name": "to" }, - { "type": "uint256", "name": "tokenId" } + { + "type": "address", + "name": "from" + }, + { + "type": "address", + "name": "to" + }, + { + "type": "uint256", + "name": "tokenId" + } ] } ] @@ -11156,11 +14474,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11186,11 +14512,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11216,11 +14550,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11242,11 +14584,15 @@ "get": { "operationId": "getEvents", "summary": "Get events", - "tags": ["Contract-Metadata"], + "tags": [ + "Contract-Metadata" + ], "description": "Get details of all events implemented by a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11254,7 +14600,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11275,24 +14624,40 @@ "items": { "type": "object", "properties": { - "name": { "type": "string" }, + "name": { + "type": "string" + }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } @@ -11304,48 +14669,88 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } } } }, - "comment": { "type": "string" } + "comment": { + "type": "string" + } }, - "required": ["name", "inputs", "outputs"] + "required": [ + "name", + "inputs", + "outputs" + ] } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { "name": "Approval", "inputs": [ - { "type": "address", "name": "owner" }, - { "type": "address", "name": "approved" }, - { "type": "uint256", "name": "tokenId" } + { + "type": "address", + "name": "owner" + }, + { + "type": "address", + "name": "approved" + }, + { + "type": "uint256", + "name": "tokenId" + } ], "outputs": [] }, { "name": "ApprovalForAll", "inputs": [ - { "type": "address", "name": "owner" }, - { "type": "address", "name": "operator" }, - { "type": "bool", "name": "approved" } + { + "type": "address", + "name": "owner" + }, + { + "type": "address", + "name": "operator" + }, + { + "type": "bool", + "name": "approved" + } ], "outputs": [] } @@ -11366,11 +14771,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11396,11 +14809,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11426,11 +14847,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11452,11 +14881,15 @@ "get": { "operationId": "getExtensions", "summary": "Get extensions", - "tags": ["Contract-Metadata"], + "tags": [ + "Contract-Metadata" + ], "description": "Get all detected extensions for a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11464,7 +14897,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11483,10 +14919,14 @@ "result": { "description": "Array of detected extension names", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ "ERC721", @@ -11520,11 +14960,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11550,11 +14998,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11580,11 +15036,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11606,11 +15070,15 @@ "get": { "operationId": "getFunctions", "summary": "Get functions", - "tags": ["Contract-Metadata"], + "tags": [ + "Contract-Metadata" + ], "description": "Get details of all functions implemented by the contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11618,7 +15086,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11639,24 +15110,40 @@ "items": { "type": "object", "properties": { - "name": { "type": "string" }, + "name": { + "type": "string" + }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } @@ -11668,27 +15155,47 @@ "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" }, - "stateMutability": { "type": "string" }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + }, + "stateMutability": { + "type": "string" + }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { "type": "string" }, - "name": { "type": "string" }, - "internalType": { "type": "string" } + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "internalType": { + "type": "string" + } } } } } } }, - "comment": { "type": "string" }, - "signature": { "type": "string" }, - "stateMutability": { "type": "string" } + "comment": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "stateMutability": { + "type": "string" + } }, "required": [ "name", @@ -11700,20 +15207,37 @@ } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { "name": "balanceOf", - "inputs": [{ "type": "address", "name": "owner" }], - "outputs": [{ "type": "uint256", "name": "" }], + "inputs": [ + { + "type": "address", + "name": "owner" + } + ], + "outputs": [ + { + "type": "uint256", + "name": "" + } + ], "comment": "See {IERC721-balanceOf}.", "signature": "contract.call(\"balanceOf\", owner: string): Promise\u003CBigNumber\u003E", "stateMutability": "view" }, { "name": "burn", - "inputs": [{ "type": "uint256", "name": "tokenId" }], + "inputs": [ + { + "type": "uint256", + "name": "tokenId" + } + ], "outputs": [], "comment": "Burns `tokenId`. See {ERC721-_burn}.", "signature": "contract.call(\"burn\", tokenId: BigNumberish): Promise\u003CTransactionResult\u003E", @@ -11736,11 +15260,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11766,11 +15298,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11796,11 +15336,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11822,18 +15370,24 @@ "get": { "operationId": "getRole", "summary": "Get wallets for role", - "tags": ["Contract-Roles"], + "tags": [ + "Contract-Roles" + ], "description": "Get all wallets with a specific role for a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "role", "required": true, "description": "The role to list wallet members" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11841,7 +15395,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11857,12 +15414,21 @@ "schema": { "type": "object", "properties": { - "result": { "type": "array", "items": { "type": "string" } } + "result": { + "type": "array", + "items": { + "type": "string" + } + } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { - "result": ["0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473"] + "result": [ + "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473" + ] } } } @@ -11878,11 +15444,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11908,11 +15482,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11938,11 +15520,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -11964,11 +15554,15 @@ "get": { "operationId": "getAll", "summary": "Get wallets for all roles", - "tags": ["Contract-Roles"], + "tags": [ + "Contract-Roles" + ], "description": "Get all wallets in each role for a contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -11976,7 +15570,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -11997,39 +15594,57 @@ "properties": { "admin": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "transfer": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "minter": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "pauser": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "lister": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "asset": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "unwrap": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "factory": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "signer": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -12045,7 +15660,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -12061,11 +15678,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12091,11 +15716,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12121,11 +15754,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12147,7 +15788,9 @@ "post": { "operationId": "grant", "summary": "Grant role", - "tags": ["Contract-Roles"], + "tags": [ + "Contract-Roles" + ], "description": "Grant a role to a specific wallet.", "requestBody": { "content": { @@ -12191,7 +15834,10 @@ } } }, - "required": ["role", "address"] + "required": [ + "role", + "address" + ] } } }, @@ -12199,14 +15845,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -12214,7 +15865,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -12222,7 +15876,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -12230,14 +15887,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -12245,7 +15907,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -12269,10 +15934,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -12293,11 +15962,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12323,11 +16000,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12353,11 +16038,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12379,7 +16072,9 @@ "post": { "operationId": "revoke", "summary": "Revoke role", - "tags": ["Contract-Roles"], + "tags": [ + "Contract-Roles" + ], "description": "Revoke a role from a specific wallet.", "requestBody": { "content": { @@ -12423,7 +16118,10 @@ } } }, - "required": ["role", "address"] + "required": [ + "role", + "address" + ] } } }, @@ -12431,14 +16129,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -12446,7 +16149,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -12454,7 +16160,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -12462,14 +16171,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -12477,7 +16191,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -12501,10 +16218,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -12525,11 +16246,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12555,11 +16284,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12585,11 +16322,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12611,11 +16356,15 @@ "get": { "operationId": "getDefaultRoyaltyInfo", "summary": "Get royalty details", - "tags": ["Contract-Royalties"], + "tags": [ + "Contract-Royalties" + ], "description": "Gets the royalty recipient and BPS (basis points) of the smart contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -12623,7 +16372,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -12651,10 +16403,15 @@ "type": "string" } }, - "required": ["seller_fee_basis_points", "fee_recipient"] + "required": [ + "seller_fee_basis_points", + "fee_recipient" + ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": { @@ -12676,11 +16433,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12706,11 +16471,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12736,11 +16509,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12762,17 +16543,23 @@ "get": { "operationId": "getTokenRoyaltyInfo", "summary": "Get token royalty details", - "tags": ["Contract-Royalties"], + "tags": [ + "Contract-Royalties" + ], "description": "Gets the royalty recipient and BPS (basis points) of a particular token in the contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "path", "name": "tokenId", "required": true }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -12780,7 +16567,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -12808,10 +16598,15 @@ "type": "string" } }, - "required": ["seller_fee_basis_points", "fee_recipient"] + "required": [ + "seller_fee_basis_points", + "fee_recipient" + ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": { @@ -12833,11 +16628,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12863,11 +16666,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12893,11 +16704,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -12919,7 +16738,9 @@ "post": { "operationId": "setDefaultRoyaltyInfo", "summary": "Set royalty details", - "tags": ["Contract-Royalties"], + "tags": [ + "Contract-Royalties" + ], "description": "Set the royalty recipient and fee for the smart contract.", "requestBody": { "content": { @@ -12961,7 +16782,10 @@ } } }, - "required": ["seller_fee_basis_points", "fee_recipient"] + "required": [ + "seller_fee_basis_points", + "fee_recipient" + ] }, "example": { "fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -12973,14 +16797,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -12988,7 +16817,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -12996,7 +16828,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -13004,14 +16839,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -13019,7 +16859,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -13043,10 +16886,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -13067,11 +16914,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13097,11 +16952,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13127,11 +16990,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13153,7 +17024,9 @@ "post": { "operationId": "setTokenRoyaltyInfo", "summary": "Set token royalty details", - "tags": ["Contract-Royalties"], + "tags": [ + "Contract-Royalties" + ], "description": "Set the royalty recipient and fee for a particular token in the contract.", "requestBody": { "content": { @@ -13216,14 +17089,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -13231,7 +17109,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -13239,7 +17120,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -13247,14 +17131,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -13262,7 +17151,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -13286,10 +17178,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -13310,11 +17206,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13340,11 +17244,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13370,11 +17282,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13396,7 +17316,9 @@ "post": { "operationId": "deployEdition", "summary": "Deploy Edition", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy an Edition contract.", "requestBody": { "content": { @@ -13407,12 +17329,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -13423,7 +17357,10 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { "default": "", "type": "string" }, + "symbol": { + "default": "", + "type": "string" + }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -13434,11 +17371,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -13455,23 +17396,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -13499,7 +17462,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -13514,7 +17479,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -13522,7 +17489,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -13530,14 +17500,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -13545,7 +17520,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -13564,7 +17542,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -13574,7 +17554,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -13590,11 +17572,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13620,11 +17610,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13650,11 +17648,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13676,7 +17682,9 @@ "post": { "operationId": "deployEditionDrop", "summary": "Deploy Edition Drop", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy an Edition Drop contract.", "requestBody": { "content": { @@ -13687,12 +17695,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -13705,9 +17725,14 @@ }, "merkle": { "type": "object", - "additionalProperties": { "type": "string" } + "additionalProperties": { + "type": "string" + } + }, + "symbol": { + "default": "", + "type": "string" }, - "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -13718,11 +17743,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -13739,23 +17768,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -13783,7 +17834,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -13798,7 +17851,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -13806,7 +17861,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -13814,14 +17872,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -13829,7 +17892,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -13848,7 +17914,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -13858,7 +17926,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -13874,11 +17944,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13904,11 +17982,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13934,11 +18020,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -13960,7 +18054,9 @@ "post": { "operationId": "deployMarketplaceV3", "summary": "Deploy Marketplace", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Marketplace contract.", "requestBody": { "content": { @@ -13971,12 +18067,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -13990,7 +18098,9 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -14004,23 +18114,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "compilerVersion": { + "type": "string" + }, + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -14048,16 +18180,24 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, - "example": { "contractMetadata": { "name": "My Marketplace" } } + "example": { + "contractMetadata": { + "name": "My Marketplace" + } + } } }, "required": true }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -14065,7 +18205,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -14073,14 +18216,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -14088,7 +18236,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -14107,7 +18258,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -14117,7 +18270,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -14133,11 +18288,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14163,11 +18326,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14193,11 +18364,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14219,7 +18398,9 @@ "post": { "operationId": "deployMultiwrap", "summary": "Deploy Multiwrap", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Multiwrap contract.", "requestBody": { "content": { @@ -14230,12 +18411,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -14246,11 +18439,16 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { "default": "", "type": "string" }, + "symbol": { + "default": "", + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -14265,23 +18463,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "compilerVersion": { + "type": "string" + }, + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -14309,10 +18529,15 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { - "contractMetadata": { "name": "My Multiwrap", "symbol": "Mw" } + "contractMetadata": { + "name": "My Multiwrap", + "symbol": "Mw" + } } } }, @@ -14320,7 +18545,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -14328,7 +18555,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -14336,14 +18566,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -14351,7 +18586,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -14370,7 +18608,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -14380,7 +18620,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -14396,11 +18638,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14426,11 +18676,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14456,11 +18714,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14482,7 +18748,9 @@ "post": { "operationId": "deployNFTCollection", "summary": "Deploy NFT Collection", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy an NFT Collection contract.", "requestBody": { "content": { @@ -14493,12 +18761,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -14509,7 +18789,10 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { "default": "", "type": "string" }, + "symbol": { + "default": "", + "type": "string" + }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -14520,11 +18803,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -14541,23 +18828,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "compilerVersion": { + "type": "string" + }, + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -14585,7 +18894,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -14599,7 +18910,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -14607,7 +18920,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -14615,14 +18931,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -14630,7 +18951,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -14649,7 +18973,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -14659,7 +18985,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -14675,11 +19003,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14705,11 +19041,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14735,11 +19079,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14761,7 +19113,9 @@ "post": { "operationId": "deployNFTDrop", "summary": "Deploy NFT Drop", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy an NFT Drop contract.", "requestBody": { "content": { @@ -14772,12 +19126,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -14790,9 +19156,14 @@ }, "merkle": { "type": "object", - "additionalProperties": { "type": "string" } + "additionalProperties": { + "type": "string" + } + }, + "symbol": { + "default": "", + "type": "string" }, - "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -14803,11 +19174,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -14824,23 +19199,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -14868,7 +19265,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -14883,7 +19282,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -14891,7 +19292,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -14899,14 +19303,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -14914,7 +19323,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -14933,7 +19345,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -14943,7 +19357,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -14959,11 +19375,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -14989,11 +19413,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15019,11 +19451,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15045,7 +19485,9 @@ "post": { "operationId": "deployPack", "summary": "Deploy Pack", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Pack contract.", "requestBody": { "content": { @@ -15056,12 +19498,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -15072,7 +19526,10 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { "default": "", "type": "string" }, + "symbol": { + "default": "", + "type": "string" + }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -15086,7 +19543,9 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -15103,23 +19562,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "compilerVersion": { + "type": "string" + }, + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -15147,10 +19628,15 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { - "contractMetadata": { "name": "My Pack", "symbol": "PACK" } + "contractMetadata": { + "name": "My Pack", + "symbol": "PACK" + } } } }, @@ -15158,7 +19644,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -15166,7 +19654,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -15174,14 +19665,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -15189,7 +19685,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -15208,7 +19707,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -15218,7 +19719,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -15234,11 +19737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15264,11 +19775,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15294,11 +19813,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15320,7 +19847,9 @@ "post": { "operationId": "deploySignatureDrop", "summary": "Deploy Signature Drop", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Signature Drop contract.", "requestBody": { "content": { @@ -15331,12 +19860,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -15349,9 +19890,14 @@ }, "merkle": { "type": "object", - "additionalProperties": { "type": "string" } + "additionalProperties": { + "type": "string" + } + }, + "symbol": { + "default": "", + "type": "string" }, - "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -15362,11 +19908,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -15383,23 +19933,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -15427,7 +19999,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -15442,7 +20016,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -15450,7 +20026,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -15458,14 +20037,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -15473,7 +20057,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -15492,7 +20079,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -15502,7 +20091,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -15518,11 +20109,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15548,11 +20147,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15578,11 +20185,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15604,7 +20219,9 @@ "post": { "operationId": "deploySplit", "summary": "Deploy Split", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Split contract.", "requestBody": { "content": { @@ -15615,12 +20232,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "recipients": { "type": "array", "items": { @@ -15638,38 +20267,69 @@ "type": "number" } }, - "required": ["address", "sharesBps"] + "required": [ + "address", + "sharesBps" + ] } }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["name", "recipients", "trusted_forwarders"] + "required": [ + "name", + "recipients", + "trusted_forwarders" + ] }, "version": { "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -15697,7 +20357,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -15720,7 +20382,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -15728,7 +20392,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -15736,14 +20403,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -15751,7 +20423,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -15770,7 +20445,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -15780,7 +20457,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -15796,11 +20475,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15826,11 +20513,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15856,11 +20551,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -15882,7 +20585,9 @@ "post": { "operationId": "deployToken", "summary": "Deploy Token", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Token contract.", "requestBody": { "content": { @@ -15893,13 +20598,28 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, - "symbol": { "default": "", "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, + "symbol": { + "default": "", + "type": "string" + }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -15910,11 +20630,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -15929,23 +20653,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -15973,7 +20719,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -15988,7 +20736,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -15996,7 +20746,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16004,14 +20757,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16019,7 +20777,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16038,7 +20799,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -16048,7 +20811,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -16064,11 +20829,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16094,11 +20867,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16124,11 +20905,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16150,7 +20939,9 @@ "post": { "operationId": "deployTokenDrop", "summary": "Deploy Token Drop", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Token Drop contract.", "requestBody": { "content": { @@ -16161,17 +20952,34 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "merkle": { "type": "object", - "additionalProperties": { "type": "string" } + "additionalProperties": { + "type": "string" + } + }, + "symbol": { + "default": "", + "type": "string" }, - "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -16182,11 +20990,15 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { "type": "string" }, + "primary_sale_recipient": { + "type": "string" + }, "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -16201,23 +21013,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -16245,7 +21079,9 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, "example": { "contractMetadata": { @@ -16260,7 +21096,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -16268,7 +21106,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16276,14 +21117,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16291,7 +21137,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16310,7 +21159,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -16320,7 +21171,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -16336,11 +21189,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16366,11 +21227,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16396,11 +21265,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16422,7 +21299,9 @@ "post": { "operationId": "deployVote", "summary": "Deploy Vote", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a Vote contract.", "requestBody": { "content": { @@ -16433,12 +21312,24 @@ "contractMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "description": { "type": "string" }, - "image": { "type": "string" }, - "external_link": { "type": "string" }, - "app_uri": { "type": "string" }, - "defaultAdmin": { "type": "string" }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "image": { + "type": "string" + }, + "external_link": { + "type": "string" + }, + "app_uri": { + "type": "string" + }, + "defaultAdmin": { + "type": "string" + }, "voting_delay_in_blocks": { "minimum": 0, "default": 0, @@ -16468,7 +21359,9 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -16485,23 +21378,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] + }, + "compilerVersion": { + "type": "string" }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "txOverrides": { "type": "object", @@ -16529,16 +21444,24 @@ } } }, - "required": ["contractMetadata"] + "required": [ + "contractMetadata" + ] }, - "example": { "contractMetadata": { "name": "My Vote" } } + "example": { + "contractMetadata": { + "name": "My Vote" + } + } } }, "required": true }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -16546,7 +21469,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16554,14 +21480,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16569,7 +21500,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16588,7 +21522,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -16598,7 +21534,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -16614,11 +21552,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16644,11 +21590,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16674,11 +21628,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -16700,7 +21662,9 @@ "post": { "operationId": "deployPublished", "summary": "Deploy published contract", - "tags": ["Deploy"], + "tags": [ + "Deploy" + ], "description": "Deploy a published contract to the blockchain.", "requestBody": { "content": { @@ -16712,23 +21676,45 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { "type": "boolean" }, - "saltForProxyDeploy": { "type": "string" }, + "forceDirectDeploy": { + "type": "boolean" + }, + "saltForProxyDeploy": { + "type": "string" + }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { "type": "string", "enum": ["solc"] }, - { "type": "string", "enum": ["string"] } + { + "type": "string", + "enum": [ + "solc" + ] + }, + { + "type": "string", + "enum": [ + "string" + ] + } ], - "enum": ["zksolc"] + "enum": [ + "zksolc" + ] }, - "compilerVersion": { "type": "string" }, - "evmVersion": { "type": "string" } + "compilerVersion": { + "type": "string" + }, + "evmVersion": { + "type": "string" + } }, - "required": ["compilerType"] + "required": [ + "compilerType" + ] }, "constructorParams": { "description": "Constructor arguments for the deployment.", @@ -16761,7 +21747,9 @@ } } }, - "required": ["constructorParams"] + "required": [ + "constructorParams" + ] }, "example": { "constructorParams": [ @@ -16774,7 +21762,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -16782,7 +21772,9 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "deployer.thirdweb.eth", "in": "path", "name": "publisher", @@ -16790,7 +21782,9 @@ "description": "Address or ENS of the publisher of the contract" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "AirdropERC20", "in": "path", "name": "contractName", @@ -16798,7 +21792,10 @@ "description": "Name of the published contract to deploy" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16806,14 +21803,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16821,7 +21823,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16837,127 +21842,17 @@ "schema": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "Not all contracts return a deployed address.", "type": "string" }, - "message": { "type": "string" } - } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } + "message": { + "type": "string" } } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/deploy/contract-types": { - "get": { - "operationId": "contractTypes", - "summary": "Get contract types", - "tags": ["Deploy"], - "description": "Get all prebuilt contract types.", - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { "type": "array", "items": { "type": "string" } } - }, - "required": ["result"] } } } @@ -16973,11 +21868,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17003,11 +21906,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17033,11 +21944,166 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/deploy/contract-types": { + "get": { + "operationId": "contractTypes", + "summary": "Get contract types", + "tags": [ + "Deploy" + ], + "description": "Get all prebuilt contract types.", + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "result" + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17059,11 +22125,17 @@ "get": { "operationId": "getAll", "summary": "Get all transactions", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get all transaction requests.", "parameters": [ { - "schema": { "default": 1, "minimum": 1, "type": "integer" }, + "schema": { + "default": 1, + "minimum": 1, + "type": "integer" + }, "example": 1, "in": "query", "name": "page", @@ -17071,7 +22143,10 @@ "description": "Specify the page number." }, { - "schema": { "default": 100, "type": "integer" }, + "schema": { + "default": 100, + "type": "integer" + }, "example": 100, "in": "query", "name": "limit", @@ -17082,10 +22157,30 @@ "schema": { "default": "queued", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["cancelled"] }, - { "type": "string", "enum": ["errored"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + } ] }, "in": "query", @@ -17116,17 +22211,44 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["sent"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["errored"] }, - { "type": "string", "enum": ["cancelled"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "sent" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + } ], "example": "queued" }, @@ -17136,7 +22258,9 @@ "description": "The chain ID for the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "fromAddress": { @@ -17145,7 +22269,9 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "toAddress": { @@ -17154,7 +22280,9 @@ "description": "The contract address to be called", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "data": { @@ -17163,7 +22291,9 @@ "description": "Encoded calldata", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "extension": { @@ -17172,7 +22302,9 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "value": { @@ -17181,7 +22313,9 @@ "description": "The amount of native currency to send", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "nonce": { @@ -17194,7 +22328,9 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasLimit": { @@ -17203,7 +22339,9 @@ "description": "The max gas unit limit", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasPrice": { @@ -17212,7 +22350,9 @@ "description": "The gas price used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxFeePerGas": { @@ -17221,7 +22361,9 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxPriorityFeePerGas": { @@ -17230,7 +22372,9 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionType": { @@ -17239,7 +22383,9 @@ "description": "The type of transaction", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionHash": { @@ -17248,7 +22394,9 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "queuedAt": { @@ -17257,7 +22405,9 @@ "description": "When the transaction is enqueued", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAt": { @@ -17266,7 +22416,9 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "minedAt": { @@ -17275,7 +22427,9 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cancelledAt": { @@ -17284,7 +22438,9 @@ "description": "When the transactino is cancelled", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractAddress": { @@ -17293,7 +22449,9 @@ "description": "The address for a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractType": { @@ -17302,7 +22460,9 @@ "description": "The type of a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "errorMessage": { @@ -17311,7 +22471,9 @@ "description": "The error that occurred", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAtBlockNumber": { @@ -17320,7 +22482,9 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "blockNumber": { @@ -17329,7 +22493,9 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryCount": { @@ -17342,7 +22508,9 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxFeePerGas": { @@ -17351,7 +22519,9 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxPriorityFeePerGas": { @@ -17360,7 +22530,9 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "signerAddress": { @@ -17373,7 +22545,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "accountAddress": { @@ -17386,7 +22560,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "target": { @@ -17399,7 +22575,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "sender": { @@ -17412,74 +22590,128 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "initCode": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "verificationGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "preVerificationGas": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "paymasterAndData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "userOpHash": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionName": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionArgs": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "onChainTxStatus": { "anyOf": [ - { "type": "number" }, - { "type": "null" } + { + "type": "number" + }, + { + "type": "null" + } ] }, "onchainStatus": { "anyOf": [ - { "type": "string", "enum": ["success"] }, - { "type": "string", "enum": ["reverted"] }, - { "type": "null" } + { + "type": "string", + "enum": [ + "success" + ] + }, + { + "type": "string", + "enum": [ + "reverted" + ] + }, + { + "type": "null" + } ] }, "effectiveGasPrice": { @@ -17488,7 +22720,9 @@ "description": "Effective Gas Price", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cumulativeGasUsed": { @@ -17497,7 +22731,9 @@ "description": "Cumulative Gas Used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -17550,12 +22786,19 @@ ] } }, - "totalCount": { "type": "number" } + "totalCount": { + "type": "number" + } }, - "required": ["transactions", "totalCount"] + "required": [ + "transactions", + "totalCount" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "transactions": [ @@ -17621,11 +22864,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17651,11 +22902,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17681,11 +22940,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -17707,11 +22974,15 @@ "get": { "operationId": "status", "summary": "Get transaction status", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get the status for a transaction request.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35", "in": "path", "name": "queueId", @@ -17736,17 +23007,44 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["sent"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["errored"] }, - { "type": "string", "enum": ["cancelled"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "sent" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + } ], "example": "queued" }, @@ -17756,7 +23054,9 @@ "description": "The chain ID for the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "fromAddress": { @@ -17765,7 +23065,9 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "toAddress": { @@ -17774,7 +23076,9 @@ "description": "The contract address to be called", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "data": { @@ -17783,7 +23087,9 @@ "description": "Encoded calldata", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "extension": { @@ -17792,7 +23098,9 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "value": { @@ -17801,7 +23109,9 @@ "description": "The amount of native currency to send", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "nonce": { @@ -17814,7 +23124,9 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasLimit": { @@ -17823,7 +23135,9 @@ "description": "The max gas unit limit", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasPrice": { @@ -17832,7 +23146,9 @@ "description": "The gas price used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxFeePerGas": { @@ -17841,7 +23157,9 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxPriorityFeePerGas": { @@ -17850,7 +23168,9 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionType": { @@ -17859,7 +23179,9 @@ "description": "The type of transaction", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionHash": { @@ -17868,7 +23190,9 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "queuedAt": { @@ -17877,7 +23201,9 @@ "description": "When the transaction is enqueued", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAt": { @@ -17886,7 +23212,9 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "minedAt": { @@ -17895,7 +23223,9 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cancelledAt": { @@ -17904,7 +23234,9 @@ "description": "When the transactino is cancelled", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractAddress": { @@ -17913,7 +23245,9 @@ "description": "The address for a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractType": { @@ -17922,7 +23256,9 @@ "description": "The type of a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "errorMessage": { @@ -17931,7 +23267,9 @@ "description": "The error that occurred", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAtBlockNumber": { @@ -17940,7 +23278,9 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "blockNumber": { @@ -17949,7 +23289,9 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryCount": { @@ -17962,7 +23304,9 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxFeePerGas": { @@ -17971,7 +23315,9 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxPriorityFeePerGas": { @@ -17980,7 +23326,9 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "signerAddress": { @@ -17993,7 +23341,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "accountAddress": { @@ -18006,7 +23356,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "target": { @@ -18019,7 +23371,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "sender": { @@ -18032,44 +23386,128 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "initCode": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "callData": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "callGasLimit": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "verificationGasLimit": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "preVerificationGas": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "paymasterAndData": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "userOpHash": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "functionName": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "functionArgs": { - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "onChainTxStatus": { - "anyOf": [{ "type": "number" }, { "type": "null" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "onchainStatus": { "anyOf": [ - { "type": "string", "enum": ["success"] }, - { "type": "string", "enum": ["reverted"] }, - { "type": "null" } + { + "type": "string", + "enum": [ + "success" + ] + }, + { + "type": "string", + "enum": [ + "reverted" + ] + }, + { + "type": "null" + } ] }, "effectiveGasPrice": { @@ -18078,7 +23516,9 @@ "description": "Effective Gas Price", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cumulativeGasUsed": { @@ -18087,7 +23527,9 @@ "description": "Cumulative Gas Used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -18140,7 +23582,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -18183,11 +23627,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18213,11 +23665,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18243,11 +23703,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18269,11 +23737,17 @@ "get": { "operationId": "getAllDeployedContracts", "summary": "Get all deployment transactions", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get all transaction requests to deploy contracts.", "parameters": [ { - "schema": { "default": 1, "minimum": 1, "type": "integer" }, + "schema": { + "default": 1, + "minimum": 1, + "type": "integer" + }, "example": 1, "in": "query", "name": "page", @@ -18281,7 +23755,11 @@ "description": "Specify the page number for pagination." }, { - "schema": { "default": 10, "minimum": 1, "type": "integer" }, + "schema": { + "default": 10, + "minimum": 1, + "type": "integer" + }, "example": 10, "in": "query", "name": "limit", @@ -18311,17 +23789,44 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { "type": "string", "enum": ["queued"] }, - { "type": "string", "enum": ["sent"] }, - { "type": "string", "enum": ["mined"] }, - { "type": "string", "enum": ["errored"] }, - { "type": "string", "enum": ["cancelled"] } + { + "type": "string", + "enum": [ + "queued" + ] + }, + { + "type": "string", + "enum": [ + "sent" + ] + }, + { + "type": "string", + "enum": [ + "mined" + ] + }, + { + "type": "string", + "enum": [ + "errored" + ] + }, + { + "type": "string", + "enum": [ + "cancelled" + ] + } ], "example": "queued" }, @@ -18331,7 +23836,9 @@ "description": "The chain ID for the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "fromAddress": { @@ -18340,7 +23847,9 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "toAddress": { @@ -18349,7 +23858,9 @@ "description": "The contract address to be called", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "data": { @@ -18358,7 +23869,9 @@ "description": "Encoded calldata", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "extension": { @@ -18367,7 +23880,9 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "value": { @@ -18376,7 +23891,9 @@ "description": "The amount of native currency to send", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "nonce": { @@ -18389,7 +23906,9 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasLimit": { @@ -18398,7 +23917,9 @@ "description": "The max gas unit limit", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "gasPrice": { @@ -18407,7 +23928,9 @@ "description": "The gas price used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxFeePerGas": { @@ -18416,7 +23939,9 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "maxPriorityFeePerGas": { @@ -18425,7 +23950,9 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionType": { @@ -18434,7 +23961,9 @@ "description": "The type of transaction", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "transactionHash": { @@ -18443,7 +23972,9 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "queuedAt": { @@ -18452,7 +23983,9 @@ "description": "When the transaction is enqueued", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAt": { @@ -18461,7 +23994,9 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "minedAt": { @@ -18470,7 +24005,9 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cancelledAt": { @@ -18479,7 +24016,9 @@ "description": "When the transactino is cancelled", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractAddress": { @@ -18488,7 +24027,9 @@ "description": "The address for a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "deployedContractType": { @@ -18497,7 +24038,9 @@ "description": "The type of a deployed contract", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "errorMessage": { @@ -18506,7 +24049,9 @@ "description": "The error that occurred", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "sentAtBlockNumber": { @@ -18515,7 +24060,9 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "blockNumber": { @@ -18524,7 +24071,9 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryCount": { @@ -18537,7 +24086,9 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxFeePerGas": { @@ -18546,7 +24097,9 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "retryMaxPriorityFeePerGas": { @@ -18555,7 +24108,9 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "signerAddress": { @@ -18568,7 +24123,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "accountAddress": { @@ -18581,7 +24138,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "target": { @@ -18594,7 +24153,9 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "sender": { @@ -18607,74 +24168,128 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, "initCode": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "callGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "verificationGasLimit": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "preVerificationGas": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "paymasterAndData": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "userOpHash": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionName": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "functionArgs": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "onChainTxStatus": { "anyOf": [ - { "type": "number" }, - { "type": "null" } + { + "type": "number" + }, + { + "type": "null" + } ] }, "onchainStatus": { "anyOf": [ - { "type": "string", "enum": ["success"] }, - { "type": "string", "enum": ["reverted"] }, - { "type": "null" } + { + "type": "string", + "enum": [ + "success" + ] + }, + { + "type": "string", + "enum": [ + "reverted" + ] + }, + { + "type": "null" + } ] }, "effectiveGasPrice": { @@ -18683,7 +24298,9 @@ "description": "Effective Gas Price", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] }, "cumulativeGasUsed": { @@ -18692,7 +24309,9 @@ "description": "Cumulative Gas Used", "type": "string" }, - { "type": "null" } + { + "type": "null" + } ] } }, @@ -18745,12 +24364,19 @@ ] } }, - "totalCount": { "type": "number" } + "totalCount": { + "type": "number" + } }, - "required": ["transactions", "totalCount"] + "required": [ + "transactions", + "totalCount" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "transactions": [ @@ -18794,11 +24420,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18824,11 +24458,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18854,11 +24496,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18880,7 +24530,9 @@ "post": { "operationId": "syncRetry", "summary": "Retry transaction (synchronous)", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors.", "requestBody": { "content": { @@ -18893,10 +24545,16 @@ "type": "string", "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" }, - "maxFeePerGas": { "type": "string" }, - "maxPriorityFeePerGas": { "type": "string" } + "maxFeePerGas": { + "type": "string" + }, + "maxPriorityFeePerGas": { + "type": "string" + } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } } }, @@ -18912,11 +24570,19 @@ "properties": { "result": { "type": "object", - "properties": { "transactionHash": { "type": "string" } }, - "required": ["transactionHash"] + "properties": { + "transactionHash": { + "type": "string" + } + }, + "required": [ + "transactionHash" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "transactionHash": "0xc3b437073c164c33f95065fb325e9bc419f306cb39ae8b4ca233f33efaa74ead" @@ -18937,11 +24603,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18967,11 +24641,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -18997,11 +24679,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19023,7 +24713,9 @@ "post": { "operationId": "retryFailed", "summary": "Retry failed transaction", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Retry a failed transaction", "requestBody": { "content": { @@ -19037,7 +24729,9 @@ "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } } }, @@ -19054,13 +24748,22 @@ "result": { "type": "object", "properties": { - "message": { "type": "string" }, - "status": { "type": "string" } + "message": { + "type": "string" + }, + "status": { + "type": "string" + } }, - "required": ["message", "status"] + "required": [ + "message", + "status" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "message": "Transaction queued for retry with queueId: a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -19082,11 +24785,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19112,11 +24823,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19142,11 +24861,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19168,7 +24895,9 @@ "post": { "operationId": "cancel", "summary": "Cancel transaction", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled.", "requestBody": { "content": { @@ -19182,7 +24911,9 @@ "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } } }, @@ -19220,10 +24951,16 @@ "example": "0x0514076b5b7e3062c8dc17e10f7c0befe88e6efb7e97f16e3c14afb36c296467" } }, - "required": ["queueId", "status", "message"] + "required": [ + "queueId", + "status", + "message" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -19245,11 +24982,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19275,11 +25020,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19305,11 +25058,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19331,15 +25092,23 @@ "post": { "operationId": "sendRawTransaction", "summary": "Send a signed transaction", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Send a signed transaction", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "signedTransaction": { "type": "string" } }, - "required": ["signedTransaction"] + "properties": { + "signedTransaction": { + "type": "string" + } + }, + "required": [ + "signedTransaction" + ] } } }, @@ -19347,7 +25116,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -19365,11 +25136,19 @@ "properties": { "result": { "type": "object", - "properties": { "transactionHash": { "type": "string" } }, - "required": ["transactionHash"] + "properties": { + "transactionHash": { + "type": "string" + } + }, + "required": [ + "transactionHash" + ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -19385,11 +25164,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19415,11 +25202,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19445,11 +25240,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19471,15 +25274,21 @@ "post": { "operationId": "sendSignedUserOp", "summary": "Send a signed user operation", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Send a signed user operation", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { "signedUserOp": {} }, - "required": ["signedUserOp"] + "properties": { + "signedUserOp": {} + }, + "required": [ + "signedUserOp" + ] } } }, @@ -19487,7 +25296,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -19507,22 +25318,38 @@ "properties": { "result": { "type": "object", - "properties": { "userOpHash": { "type": "string" } }, - "required": ["userOpHash"] + "properties": { + "userOpHash": { + "type": "string" + } + }, + "required": [ + "userOpHash" + ] } }, - "required": ["result"] + "required": [ + "result" + ] }, { "type": "object", "properties": { "error": { "type": "object", - "properties": { "message": { "type": "string" } }, - "required": ["message"] + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] } }, - "required": ["error"] + "required": [ + "error" + ] } ] } @@ -19540,11 +25367,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19570,11 +25405,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19600,11 +25443,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19626,11 +25477,16 @@ "get": { "operationId": "txHashReceipt", "summary": "Get transaction receipt from transaction hash", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get the transaction receipt from a transaction hash.", "parameters": [ { - "schema": { "pattern": "^0x([A-Fa-f0-9]{64})$", "type": "string" }, + "schema": { + "pattern": "^0x([A-Fa-f0-9]{64})$", + "type": "string" + }, "example": "0xd9bcba8f5bc4ce5bf4d631b2a0144329c1df3b56ddb9fc64637ed3a4219dd087", "in": "path", "name": "txHash", @@ -19638,7 +25494,9 @@ "description": "Transaction hash" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -19659,8 +25517,12 @@ { "type": "object", "properties": { - "to": { "type": "string" }, - "from": { "type": "string" }, + "to": { + "type": "string" + }, + "from": { + "type": "string" + }, "contractAddress": { "anyOf": [ { @@ -19671,30 +25533,65 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { "type": "null" } + { + "type": "null" + } ] }, - "transactionIndex": { "type": "number" }, - "root": { "type": "string" }, - "gasUsed": { "type": "string" }, - "logsBloom": { "type": "string" }, - "blockHash": { "type": "string" }, - "transactionHash": { "type": "string" }, - "logs": { "type": "array", "items": {} }, - "blockNumber": { "type": "number" }, - "confirmations": { "type": "number" }, - "cumulativeGasUsed": { "type": "string" }, - "effectiveGasPrice": { "type": "string" }, - "byzantium": { "type": "boolean" }, - "type": { "type": "number" }, - "status": { "type": "number" } + "transactionIndex": { + "type": "number" + }, + "root": { + "type": "string" + }, + "gasUsed": { + "type": "string" + }, + "logsBloom": { + "type": "string" + }, + "blockHash": { + "type": "string" + }, + "transactionHash": { + "type": "string" + }, + "logs": { + "type": "array", + "items": {} + }, + "blockNumber": { + "type": "number" + }, + "confirmations": { + "type": "number" + }, + "cumulativeGasUsed": { + "type": "string" + }, + "effectiveGasPrice": { + "type": "string" + }, + "byzantium": { + "type": "boolean" + }, + "type": { + "type": "number" + }, + "status": { + "type": "number" + } } }, - { "type": "null" } + { + "type": "null" + } ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "to": "0xd7419703c2D5737646525A8660906eCb612875BD", @@ -19761,11 +25658,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19791,11 +25696,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19821,11 +25734,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19847,11 +25768,16 @@ "get": { "operationId": "useropHashReceipt", "summary": "Get transaction receipt from user-op hash", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get the transaction receipt from a user-op hash.", "parameters": [ { - "schema": { "pattern": "^0x([A-Fa-f0-9]{64})$", "type": "string" }, + "schema": { + "pattern": "^0x([A-Fa-f0-9]{64})$", + "type": "string" + }, "example": "0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f", "in": "path", "name": "userOpHash", @@ -19859,7 +25785,9 @@ "description": "User operation hash" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -19874,8 +25802,12 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": {} }, - "required": ["result"], + "properties": { + "result": {} + }, + "required": [ + "result" + ], "example": { "result": { "userOpHash": "0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f", @@ -19920,11 +25852,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19950,11 +25890,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -19980,11 +25928,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20006,11 +25962,15 @@ "get": { "operationId": "getTransactionLogs", "summary": "Get transaction logs", - "tags": ["Transaction"], + "tags": [ + "Transaction" + ], "description": "Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "query", "name": "chain", @@ -20018,14 +25978,19 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "queueId", "required": false, "description": "The queue ID for a mined transaction." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{64}$" + }, "example": "0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431", "in": "query", "name": "transactionHash", @@ -20033,7 +25998,9 @@ "description": "The transaction hash for a mined transaction." }, { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "parseLogs", "required": false, @@ -20065,10 +26032,16 @@ }, "topics": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } + }, + "data": { + "type": "string" + }, + "blockNumber": { + "type": "string" }, - "data": { "type": "string" }, - "blockNumber": { "type": "string" }, "transactionHash": { "description": "A transaction hash", "examples": [ @@ -20077,11 +26050,21 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, - "transactionIndex": { "type": "number" }, - "blockHash": { "type": "string" }, - "logIndex": { "type": "number" }, - "removed": { "type": "boolean" }, - "eventName": { "type": "string" }, + "transactionIndex": { + "type": "number" + }, + "blockHash": { + "type": "string" + }, + "logIndex": { + "type": "number" + }, + "removed": { + "type": "boolean" + }, + "eventName": { + "type": "string" + }, "args": { "description": "Event arguments.", "examples": [ @@ -20123,10 +26106,16 @@ }, "topics": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } + }, + "data": { + "type": "string" + }, + "blockNumber": { + "type": "string" }, - "data": { "type": "string" }, - "blockNumber": { "type": "string" }, "transactionHash": { "description": "A transaction hash", "examples": [ @@ -20135,10 +26124,18 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, - "transactionIndex": { "type": "number" }, - "blockHash": { "type": "string" }, - "logIndex": { "type": "number" }, - "removed": { "type": "boolean" } + "transactionIndex": { + "type": "number" + }, + "blockHash": { + "type": "string" + }, + "logIndex": { + "type": "number" + }, + "removed": { + "type": "boolean" + } }, "required": [ "address", @@ -20156,7 +26153,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { @@ -20197,11 +26196,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20227,11 +26234,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20257,11 +26272,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20283,11 +26306,15 @@ "get": { "operationId": "getAllAccounts", "summary": "Get all smart accounts", - "tags": ["Account Factory"], + "tags": [ + "Account Factory" + ], "description": "Get all the smart accounts for this account factory.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -20295,7 +26322,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -20314,10 +26344,14 @@ "result": { "description": "The account addresses of all the accounts in this factory", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -20333,11 +26367,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20363,11 +26405,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20393,11 +26443,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20419,11 +26477,16 @@ "get": { "operationId": "getAssociatedAccounts", "summary": "Get associated smart accounts", - "tags": ["Account Factory"], + "tags": [ + "Account Factory" + ], "description": "Get all the smart accounts for this account factory associated with the specific admin wallet.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "signerAddress", @@ -20431,7 +26494,9 @@ "description": "The address of the signer to get associated accounts from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -20439,7 +26504,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -20458,10 +26526,14 @@ "result": { "description": "The account addresses of all the accounts with a specific signer in this factory", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -20477,11 +26549,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20507,11 +26587,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20537,11 +26625,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20563,11 +26659,16 @@ "get": { "operationId": "isAccountDeployed", "summary": "Check if deployed", - "tags": ["Account Factory"], + "tags": [ + "Account Factory" + ], "description": "Check if a smart account has been deployed to the blockchain.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "adminAddress", @@ -20575,14 +26676,18 @@ "description": "The address of the admin to check if the account address is deployed" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "extraData", "required": false, "description": "Extra data to use in predicting the account address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -20590,7 +26695,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -20611,7 +26719,9 @@ "type": "boolean" } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -20627,11 +26737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20657,11 +26775,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20687,11 +26813,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20713,11 +26847,16 @@ "get": { "operationId": "predictAccountAddress", "summary": "Predict smart account address", - "tags": ["Account Factory"], + "tags": [ + "Account Factory" + ], "description": "Get the counterfactual address of a smart account.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "adminAddress", @@ -20725,14 +26864,18 @@ "description": "The address of the admin to predict the account address for" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "extraData", "required": false, "description": "Extra data to add to use in predicting the account address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -20740,7 +26883,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -20761,7 +26907,9 @@ "type": "string" } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -20777,11 +26925,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20807,11 +26963,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20837,11 +27001,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -20863,7 +27035,9 @@ "post": { "operationId": "createAccount", "summary": "Create smart account", - "tags": ["Account Factory"], + "tags": [ + "Account Factory" + ], "description": "Create a smart account for this account factory.", "requestBody": { "content": { @@ -20907,7 +27081,9 @@ } } }, - "required": ["adminAddress"] + "required": [ + "adminAddress" + ] }, "example": { "adminAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -20918,14 +27094,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -20933,7 +27114,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -20941,7 +27125,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -20949,14 +27136,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -20964,7 +27156,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -20983,7 +27178,9 @@ "result": { "type": "object", "properties": { - "queueId": { "type": "string" }, + "queueId": { + "type": "string" + }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -20993,7 +27190,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -21009,11 +27208,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21039,11 +27246,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21069,11 +27284,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21095,11 +27318,15 @@ "get": { "operationId": "getAllAdmins", "summary": "Get all admins", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Get all admins for a smart account.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -21107,7 +27334,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -21126,10 +27356,14 @@ "result": { "description": "The address of the admins on this account", "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -21145,11 +27379,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21175,11 +27417,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21205,11 +27455,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21231,11 +27489,15 @@ "get": { "operationId": "getAllSessions", "summary": "Get all session keys", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Get all session keys for a smart account.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -21243,7 +27505,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -21270,14 +27535,20 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "startDate": { "type": "string" }, - "expirationDate": { "type": "string" }, + "startDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, "nativeTokenLimitPerTransaction": { "type": "string" }, "approvedCallTargets": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, "required": [ @@ -21290,7 +27561,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -21306,11 +27579,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21336,11 +27617,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21366,11 +27655,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21392,7 +27689,9 @@ "post": { "operationId": "grantAdmin", "summary": "Grant admin", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Grant a smart account's admin permission.", "requestBody": { "content": { @@ -21432,7 +27731,9 @@ } } }, - "required": ["signerAddress"] + "required": [ + "signerAddress" + ] }, "example": { "signerAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -21443,14 +27744,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -21458,7 +27764,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -21466,7 +27775,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21474,14 +27786,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21489,7 +27806,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21513,10 +27833,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -21537,11 +27861,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21567,11 +27899,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21597,11 +27937,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21623,7 +27971,9 @@ "post": { "operationId": "revokeAdmin", "summary": "Revoke admin", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Revoke a smart account's admin permission.", "requestBody": { "content": { @@ -21663,7 +28013,9 @@ } } }, - "required": ["walletAddress"] + "required": [ + "walletAddress" + ] }, "example": { "walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -21674,14 +28026,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -21689,7 +28046,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -21697,7 +28057,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21705,14 +28068,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21720,7 +28088,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21744,10 +28115,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -21768,11 +28143,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21798,11 +28181,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21828,11 +28219,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -21854,7 +28253,9 @@ "post": { "operationId": "grantSession", "summary": "Create session key", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Create a session key for a smart account.", "requestBody": { "content": { @@ -21868,12 +28269,20 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "startDate": { "type": "string" }, - "expirationDate": { "type": "string" }, - "nativeTokenLimitPerTransaction": { "type": "string" }, + "startDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "nativeTokenLimitPerTransaction": { + "type": "string" + }, "approvedCallTargets": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, "txOverrides": { "type": "object", @@ -21924,14 +28333,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -21939,7 +28353,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -21947,7 +28364,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21955,14 +28375,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21970,7 +28395,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21994,10 +28422,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -22018,11 +28450,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22048,11 +28488,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22078,11 +28526,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22104,7 +28560,9 @@ "post": { "operationId": "revokeSession", "summary": "Revoke session key", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Revoke a session key for a smart account.", "requestBody": { "content": { @@ -22144,7 +28602,9 @@ } } }, - "required": ["walletAddress"] + "required": [ + "walletAddress" + ] }, "example": { "walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -22155,14 +28615,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -22170,7 +28635,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -22178,7 +28646,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -22186,14 +28657,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -22201,7 +28677,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -22225,10 +28704,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -22249,11 +28732,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22279,11 +28770,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22309,11 +28808,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22335,7 +28842,9 @@ "post": { "operationId": "updateSession", "summary": "Update session key", - "tags": ["Account"], + "tags": [ + "Account" + ], "description": "Update a session key for a smart account.", "requestBody": { "content": { @@ -22358,9 +28867,15 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "startDate": { "type": "string" }, - "expirationDate": { "type": "string" }, - "nativeTokenLimitPerTransaction": { "type": "string" }, + "startDate": { + "type": "string" + }, + "expirationDate": { + "type": "string" + }, + "nativeTokenLimitPerTransaction": { + "type": "string" + }, "txOverrides": { "type": "object", "properties": { @@ -22387,7 +28902,10 @@ } } }, - "required": ["signerAddress", "approvedCallTargets"] + "required": [ + "signerAddress", + "approvedCallTargets" + ] }, "example": { "signerAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373", @@ -22401,14 +28919,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -22416,7 +28939,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -22424,7 +28950,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -22432,14 +28961,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -22447,7 +28981,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -22471,10 +29008,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -22495,11 +29036,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22525,11 +29074,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22555,11 +29112,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22581,11 +29146,15 @@ "get": { "operationId": "allowanceOf", "summary": "Get token allowance", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get the allowance of a specific wallet for an ERC-20 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -22593,7 +29162,9 @@ "description": "Address of the wallet who owns the funds" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "spenderWallet", @@ -22601,7 +29172,9 @@ "description": "Address of the wallet to check token allowance" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -22609,7 +29182,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -22628,9 +29204,15 @@ "result": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "string" }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "string" + }, "value": { "description": "Value in wei", "type": "string" @@ -22649,7 +29231,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "name": "ERC20", @@ -22674,11 +29258,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22704,11 +29296,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22734,11 +29334,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22760,11 +29368,16 @@ "get": { "operationId": "balanceOf", "summary": "Get token balance", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get the balance of a specific wallet address for this ERC-20 contract.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "wallet_address", @@ -22772,7 +29385,9 @@ "description": "Address of the wallet to check token balance" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -22780,7 +29395,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -22799,9 +29417,15 @@ "result": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "string" }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "string" + }, "value": { "description": "Value in wei", "type": "string" @@ -22820,7 +29444,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": [ { "result": { @@ -22847,11 +29473,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22877,11 +29511,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22907,11 +29549,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -22933,11 +29583,15 @@ "get": { "operationId": "get", "summary": "Get token details", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get details for this ERC-20 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -22945,7 +29599,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -22964,14 +29621,26 @@ "result": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "string" + } }, - "required": ["name", "symbol", "decimals"] + "required": [ + "name", + "symbol", + "decimals" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "name": "ERC20", @@ -22994,11 +29663,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23024,11 +29701,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23054,11 +29739,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23080,11 +29773,15 @@ "get": { "operationId": "totalSupply", "summary": "Get total supply", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get the total supply in circulation for this ERC-20 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -23092,7 +29789,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -23111,9 +29811,15 @@ "result": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "string" }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "string" + }, "value": { "description": "Value in wei", "type": "string" @@ -23132,7 +29838,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": [ { "result": { @@ -23159,11 +29867,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23189,11 +29905,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23219,11 +29943,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23245,7 +29977,9 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -23285,7 +30019,9 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] }, "mintEndTime": { @@ -23294,11 +30030,16 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] } }, - "required": ["to", "quantity"], + "required": [ + "to", + "quantity" + ], "examples": [ { "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -23313,30 +30054,59 @@ { "type": "object", "properties": { - "to": { "type": "string" }, - "primarySaleRecipient": { "type": "string" }, - "price": { "type": "string" }, - "priceInWei": { "type": "string" }, - "currency": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "to": { + "type": "string" + }, + "primarySaleRecipient": { + "type": "string" + }, + "price": { + "type": "string" + }, + "priceInWei": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, - "required": ["to", "validityStartTimestamp"] + "required": [ + "to", + "validityStartTimestamp" + ] }, { "anyOf": [ { "type": "object", - "properties": { "quantity": { "type": "string" } }, - "required": ["quantity"] + "properties": { + "quantity": { + "type": "string" + } + }, + "required": [ + "quantity" + ] }, { "type": "object", "properties": { - "quantityWei": { "type": "string" } + "quantityWei": { + "type": "string" + } }, - "required": ["quantityWei"] + "required": [ + "quantityWei" + ] } ] } @@ -23349,7 +30119,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -23357,7 +30129,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -23365,7 +30140,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -23373,14 +30151,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -23388,7 +30171,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -23396,7 +30182,9 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -23484,9 +30272,14 @@ } ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, { "type": "object", @@ -23494,14 +30287,30 @@ "payload": { "type": "object", "properties": { - "to": { "type": "string" }, - "primarySaleRecipient": { "type": "string" }, - "quantity": { "type": "string" }, - "price": { "type": "string" }, - "currency": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "to": { + "type": "string" + }, + "primarySaleRecipient": { + "type": "string" + }, + "quantity": { + "type": "string" + }, + "price": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "to", @@ -23514,15 +30323,24 @@ "uid" ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] } ] } }, - "required": ["result"], - "example": { "result": "1" } + "required": [ + "result" + ], + "example": { + "result": "1" + } } } } @@ -23538,11 +30356,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23568,11 +30394,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23598,11 +30432,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23624,18 +30466,24 @@ "get": { "operationId": "canClaim", "summary": "Check if tokens are available for claiming", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -23643,7 +30491,9 @@ "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -23651,7 +30501,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -23666,8 +30519,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] } } } @@ -23683,11 +30542,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23713,11 +30580,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23743,11 +30618,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23769,18 +30652,24 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Retrieve the currently active claim phase, if any.", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Retrieve the currently active claim phase, if any.", "parameters": [ { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -23788,7 +30677,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -23808,14 +30700,28 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -23824,27 +30730,62 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -23857,12 +30798,23 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, - { "type": "array", "items": { "type": "string" } }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -23870,8 +30822,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -23892,12 +30848,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -23912,7 +30874,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -23928,11 +30892,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23958,11 +30930,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -23988,11 +30968,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24014,18 +31002,24 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured.", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get all the claim phases configured on the drop contract.", "parameters": [ { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -24033,7 +31027,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -24056,8 +31053,12 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "startTime": { @@ -24066,8 +31067,12 @@ }, "price": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "currencyAddress": { @@ -24078,32 +31083,61 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "waitInSeconds": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -24116,14 +31150,22 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, + { + "type": "null" + }, { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, { "type": "array", @@ -24132,8 +31174,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -24154,12 +31200,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -24175,7 +31227,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -24191,11 +31245,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24221,11 +31283,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24251,11 +31321,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24277,18 +31355,24 @@ "get": { "operationId": "claimConditionsGetClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -24296,7 +31380,9 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -24304,7 +31390,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -24324,12 +31413,16 @@ "type": "array", "items": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "anyOf": [ { "type": "string", - "enum": ["There is not enough supply to claim."] + "enum": [ + "There is not enough supply to claim." + ] }, { "type": "string", @@ -24345,15 +31438,21 @@ }, { "type": "string", - "enum": ["Claim phase has not started yet."] + "enum": [ + "Claim phase has not started yet." + ] }, { "type": "string", - "enum": ["You have already claimed the token."] + "enum": [ + "You have already claimed the token." + ] }, { "type": "string", - "enum": ["Incorrect price or currency."] + "enum": [ + "Incorrect price or currency." + ] }, { "type": "string", @@ -24375,15 +31474,21 @@ }, { "type": "string", - "enum": ["There is no claim condition set."] + "enum": [ + "There is no claim condition set." + ] }, { "type": "string", - "enum": ["No wallet connected."] + "enum": [ + "No wallet connected." + ] }, { "type": "string", - "enum": ["No claim conditions found."] + "enum": [ + "No claim conditions found." + ] } ] } @@ -24391,7 +31496,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -24407,11 +31514,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24437,11 +31552,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24467,11 +31590,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24493,11 +31624,16 @@ "post": { "operationId": "claimConditionsGetClaimerProofs", "summary": "Get claimer proofs", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -24505,7 +31641,9 @@ "description": "The wallet address to get the merkle proofs for." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -24513,7 +31651,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -24531,11 +31672,15 @@ "properties": { "result": { "anyOf": [ - { "type": "null" }, + { + "type": "null" + }, { "type": "object", "properties": { - "price": { "type": "string" }, + "price": { + "type": "string" + }, "currencyAddress": { "description": "A contract or wallet address", "examples": [ @@ -24552,18 +31697,28 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "maxClaimable": { "type": "string" }, + "maxClaimable": { + "type": "string" + }, "proof": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["address", "maxClaimable", "proof"] + "required": [ + "address", + "maxClaimable", + "proof" + ] } ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -24579,11 +31734,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24609,11 +31772,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24639,11 +31810,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24665,7 +31844,9 @@ "post": { "operationId": "setAllowance", "summary": "Set allowance", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet.", "requestBody": { "content": { @@ -24709,7 +31890,10 @@ } } }, - "required": ["spenderAddress", "amount"] + "required": [ + "spenderAddress", + "amount" + ] }, "example": { "spenderAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -24721,14 +31905,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -24736,7 +31925,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -24744,7 +31936,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -24752,14 +31947,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -24767,7 +31967,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -24791,10 +31994,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -24815,11 +32022,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24845,11 +32060,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24875,11 +32098,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -24901,7 +32132,9 @@ "post": { "operationId": "transfer", "summary": "Transfer tokens", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Transfer ERC-20 tokens from the caller wallet to a specific wallet.", "requestBody": { "content": { @@ -24945,7 +32178,10 @@ } } }, - "required": ["toAddress", "amount"] + "required": [ + "toAddress", + "amount" + ] }, "example": { "toAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -24957,14 +32193,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -24972,7 +32213,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -24980,7 +32224,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -24988,14 +32235,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -25003,7 +32255,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -25027,10 +32282,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -25051,11 +32310,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25081,11 +32348,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25111,11 +32386,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25137,7 +32420,9 @@ "post": { "operationId": "transferFrom", "summary": "Transfer tokens from wallet", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -25187,7 +32472,11 @@ } } }, - "required": ["fromAddress", "toAddress", "amount"] + "required": [ + "fromAddress", + "toAddress", + "amount" + ] }, "example": { "fromAddress": "0x....", @@ -25200,14 +32489,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -25215,7 +32509,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -25223,7 +32520,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -25231,14 +32531,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -25246,7 +32551,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -25270,10 +32578,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -25294,11 +32606,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25324,11 +32644,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25354,11 +32682,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25380,7 +32716,9 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Burn ERC-20 tokens in the caller wallet.", "requestBody": { "content": { @@ -25418,23 +32756,32 @@ } } }, - "required": ["amount"] + "required": [ + "amount" + ] }, - "example": { "amount": "0.1" } + "example": { + "amount": "0.1" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -25442,7 +32789,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -25450,7 +32800,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -25458,14 +32811,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -25473,7 +32831,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -25497,10 +32858,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -25521,11 +32886,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25551,11 +32924,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25581,11 +32962,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25607,7 +32996,9 @@ "post": { "operationId": "burnFrom", "summary": "Burn token from wallet", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Burn ERC-20 tokens in a specific wallet. Requires allowance.", "requestBody": { "content": { @@ -25651,7 +33042,10 @@ } } }, - "required": ["holderAddress", "amount"] + "required": [ + "holderAddress", + "amount" + ] }, "example": { "holderAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -25663,14 +33057,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -25678,7 +33077,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -25686,7 +33088,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -25694,14 +33099,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -25709,7 +33119,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -25733,10 +33146,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -25757,11 +33174,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25787,11 +33212,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25817,11 +33250,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -25843,7 +33284,9 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Claim ERC-20 tokens to a specific wallet.", "requestBody": { "content": { @@ -25885,7 +33328,10 @@ } } }, - "required": ["recipient", "amount"] + "required": [ + "recipient", + "amount" + ] }, "example": { "recipient": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -25897,14 +33343,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -25912,7 +33363,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -25920,7 +33374,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -25928,14 +33385,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -25943,7 +33405,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -25967,10 +33432,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -25991,11 +33460,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26021,11 +33498,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26051,11 +33536,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26077,7 +33570,9 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Mint ERC-20 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -26101,7 +33596,10 @@ "type": "string" } }, - "required": ["toAddress", "amount"] + "required": [ + "toAddress", + "amount" + ] } }, "txOverrides": { @@ -26130,7 +33628,9 @@ } } }, - "required": ["data"] + "required": [ + "data" + ] }, "example": { "data": [ @@ -26150,14 +33650,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -26165,7 +33670,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -26173,7 +33681,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -26181,14 +33692,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -26196,7 +33712,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -26220,10 +33739,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -26244,11 +33767,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26274,11 +33805,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26304,11 +33843,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26330,7 +33877,9 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Mint ERC-20 tokens to a specific wallet.", "requestBody": { "content": { @@ -26374,7 +33923,10 @@ } } }, - "required": ["toAddress", "amount"] + "required": [ + "toAddress", + "amount" + ] }, "example": { "toAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -26386,14 +33938,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -26401,7 +33958,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -26409,7 +33969,10 @@ "description": "ERC20 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -26417,14 +33980,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -26432,7 +34000,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -26456,10 +34027,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -26480,11 +34055,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26510,11 +34093,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26540,11 +34131,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26566,7 +34165,9 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Mint ERC-20 tokens from a generated signature.", "requestBody": { "content": { @@ -26638,7 +34239,9 @@ "signature": "0xe16697bf7ede4ff4918f0dbc84953b964a84fed70cb3a0b0afb3ee9a55c9ff4d14e029bce8d8c74e71c1de32889c4eff529a9f7d45402455b8d15c7e6993c1c91b" } }, - "signature": { "type": "string" }, + "signature": { + "type": "string" + }, "txOverrides": { "type": "object", "properties": { @@ -26665,23 +34268,34 @@ } } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, - "example": { "payload": {}, "signature": "" } + "example": { + "payload": {}, + "signature": "" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -26689,7 +34303,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -26697,7 +34314,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -26705,14 +34325,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -26720,7 +34345,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -26744,10 +34372,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -26768,11 +34400,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26798,11 +34438,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26828,11 +34476,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -26854,7 +34510,9 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for the drop.", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -26868,16 +34526,35 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -26886,24 +34563,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -26911,8 +34618,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -26933,21 +34644,31 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } } }, - "resetClaimEligibilityForAll": { "type": "boolean" }, + "resetClaimEligibilityForAll": { + "type": "boolean" + }, "txOverrides": { "type": "object", "properties": { @@ -26974,7 +34695,9 @@ } } }, - "required": ["claimConditionInputs"] + "required": [ + "claimConditionInputs" + ] } } }, @@ -26982,14 +34705,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -26997,7 +34725,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27005,7 +34736,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -27013,14 +34747,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -27028,7 +34767,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -27052,10 +34794,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -27076,11 +34822,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27106,11 +34860,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27136,11 +34898,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27162,7 +34932,9 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": ["ERC20"], + "tags": [ + "ERC20" + ], "description": "Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -27174,16 +34946,35 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -27192,24 +34983,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -27217,8 +35038,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -27239,15 +35064,23 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } @@ -27282,7 +35115,10 @@ } } }, - "required": ["claimConditionInput", "index"] + "required": [ + "claimConditionInput", + "index" + ] } } }, @@ -27290,14 +35126,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -27305,7 +35146,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27313,7 +35157,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -27321,14 +35168,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -27336,7 +35188,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -27360,10 +35215,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -27384,11 +35243,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27414,11 +35281,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27444,11 +35319,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27470,11 +35353,15 @@ "get": { "operationId": "get", "summary": "Get details", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get the details for a token in an ERC-721 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0", "in": "query", "name": "tokenId", @@ -27482,7 +35369,9 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -27490,7 +35379,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27513,59 +35405,116 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": [ { "result": { @@ -27597,11 +35546,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27627,11 +35584,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27657,11 +35622,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27683,11 +35656,15 @@ "get": { "operationId": "getAll", "summary": "Get all details", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get details for all tokens in an ERC-721 contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "example": "0", "in": "query", "name": "start", @@ -27695,7 +35672,9 @@ "description": "The start token id for paginated results. Defaults to 0." }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "example": "20", "in": "query", "name": "count", @@ -27703,7 +35682,9 @@ "description": "The page count for paginated results. Defaults to 100." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -27711,7 +35692,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27736,60 +35720,117 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { @@ -27821,11 +35862,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27851,11 +35900,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27881,11 +35938,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -27907,11 +35972,16 @@ "get": { "operationId": "getOwned", "summary": "Get owned tokens", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get all tokens in an ERC-721 contract owned by a specific wallet.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -27919,7 +35989,9 @@ "description": "Address of the wallet to get NFTs for" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -27927,7 +35999,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27952,60 +36027,117 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } } }, - "required": ["result"], + "required": [ + "result" + ], "example": [ { "result": [ @@ -28039,11 +36171,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28069,11 +36209,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28099,11 +36247,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28125,11 +36281,16 @@ "get": { "operationId": "balanceOf", "summary": "Get token balance", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get the balance of a specific wallet address for this ERC-721 contract.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -28137,7 +36298,9 @@ "description": "Address of the wallet to check NFT balance" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28145,7 +36308,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28160,8 +36326,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "example": { "result": "1" } + "properties": { + "result": { + "type": "string" + } + }, + "example": { + "result": "1" + } } } } @@ -28177,11 +36349,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28207,11 +36387,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28237,11 +36425,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28263,11 +36459,15 @@ "get": { "operationId": "isApproved", "summary": "Check if approved transfers", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Check if the specific wallet has approved transfers from a specific operator wallet.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -28275,7 +36475,9 @@ "description": "Address of the wallet who owns the NFT" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "operator", @@ -28283,7 +36485,9 @@ "description": "Address of the operator to check approval on" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28291,7 +36495,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28306,8 +36513,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "example": { "result": false } + "properties": { + "result": { + "type": "boolean" + } + }, + "example": { + "result": false + } } } } @@ -28323,11 +36536,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28353,11 +36574,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28383,11 +36612,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28409,11 +36646,15 @@ "get": { "operationId": "totalCount", "summary": "Get total supply", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get the total supply in circulation for this ERC-721 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28421,7 +36662,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28436,8 +36680,16 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "example": [{ "result": "1" }] + "properties": { + "result": { + "type": "string" + } + }, + "example": [ + { + "result": "1" + } + ] } } } @@ -28453,11 +36705,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28483,11 +36743,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28513,11 +36781,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28539,11 +36815,15 @@ "get": { "operationId": "totalClaimedSupply", "summary": "Get claimed supply", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get the claimed supply for this ERC-721 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28551,7 +36831,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28566,7 +36849,11 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } } + "properties": { + "result": { + "type": "string" + } + } } } } @@ -28582,11 +36869,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28612,11 +36907,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28642,11 +36945,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28668,11 +36979,15 @@ "get": { "operationId": "totalUnclaimedSupply", "summary": "Get unclaimed supply", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get the unclaimed supply for this ERC-721 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28680,7 +36995,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28694,153 +37012,12 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { "result": { "type": "string" } } - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", "type": "object", "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } + "result": { + "type": "string" } } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim": { - "get": { - "operationId": "canClaim", - "summary": "Check if tokens are available for claiming", - "tags": ["ERC721"], - "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", - "parameters": [ - { - "schema": { "type": "string" }, - "in": "query", - "name": "quantity", - "required": true, - "description": "The amount of tokens to claim." - }, - { - "schema": { "type": "string" }, - "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", - "in": "query", - "name": "addressToCheck", - "required": false, - "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." - }, - { - "schema": { "type": "string" }, - "example": "80002", - "in": "path", - "name": "chain", - "required": true, - "description": "Chain ID or name" - }, - { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "path", - "name": "contractAddress", - "required": true, - "description": "Contract address" - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] } } } @@ -28856,11 +37033,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28886,11 +37071,205 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim": { + "get": { + "operationId": "canClaim", + "summary": "Check if tokens are available for claiming", + "tags": [ + "ERC721" + ], + "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "query", + "name": "quantity", + "required": true, + "description": "The amount of tokens to claim." + }, + { + "schema": { + "type": "string" + }, + "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", + "in": "query", + "name": "addressToCheck", + "required": false, + "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." + }, + { + "schema": { + "type": "string" + }, + "example": "80002", + "in": "path", + "name": "chain", + "required": true, + "description": "Chain ID or name" + }, + { + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "path", + "name": "contractAddress", + "required": true, + "description": "Contract address" + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28916,11 +37295,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -28942,18 +37329,24 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Retrieve the currently active claim phase, if any.", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Retrieve the currently active claim phase, if any.", "parameters": [ { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -28961,7 +37354,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28981,14 +37377,28 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -28997,27 +37407,62 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -29030,12 +37475,23 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, - { "type": "array", "items": { "type": "string" } }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -29043,8 +37499,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -29065,12 +37525,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -29085,7 +37551,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -29101,11 +37569,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29131,11 +37607,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29161,11 +37645,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29187,18 +37679,24 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured for the drop.", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get all the claim phases configured for the drop.", "parameters": [ { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -29206,7 +37704,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -29229,8 +37730,12 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "startTime": { @@ -29239,8 +37744,12 @@ }, "price": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "currencyAddress": { @@ -29251,32 +37760,61 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "waitInSeconds": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -29289,14 +37827,22 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, + { + "type": "null" + }, { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, { "type": "array", @@ -29305,8 +37851,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -29327,12 +37877,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -29348,7 +37904,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -29364,11 +37922,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29394,11 +37960,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29424,11 +37998,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29450,18 +38032,24 @@ "get": { "operationId": "getClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -29469,7 +38057,9 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -29477,7 +38067,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -29497,12 +38090,16 @@ "type": "array", "items": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "anyOf": [ { "type": "string", - "enum": ["There is not enough supply to claim."] + "enum": [ + "There is not enough supply to claim." + ] }, { "type": "string", @@ -29518,15 +38115,21 @@ }, { "type": "string", - "enum": ["Claim phase has not started yet."] + "enum": [ + "Claim phase has not started yet." + ] }, { "type": "string", - "enum": ["You have already claimed the token."] + "enum": [ + "You have already claimed the token." + ] }, { "type": "string", - "enum": ["Incorrect price or currency."] + "enum": [ + "Incorrect price or currency." + ] }, { "type": "string", @@ -29548,15 +38151,21 @@ }, { "type": "string", - "enum": ["There is no claim condition set."] + "enum": [ + "There is no claim condition set." + ] }, { "type": "string", - "enum": ["No wallet connected."] + "enum": [ + "No wallet connected." + ] }, { "type": "string", - "enum": ["No claim conditions found."] + "enum": [ + "No claim conditions found." + ] } ] } @@ -29564,7 +38173,229 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "reason": {}, + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs": { + "get": { + "operationId": "getClaimerProofs", + "summary": "Get claimer proofs", + "tags": [ + "ERC721" + ], + "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", + "parameters": [ + { + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "query", + "name": "walletAddress", + "required": true, + "description": "The wallet address to get the merkle proofs for." + }, + { + "schema": { + "type": "string" + }, + "example": "80002", + "in": "path", + "name": "chain", + "required": true, + "description": "Chain ID or name" + }, + { + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "path", + "name": "contractAddress", + "required": true, + "description": "Contract address" + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "anyOf": [ + { + "type": "null" + }, + { + "type": "object", + "properties": { + "price": { + "type": "string" + }, + "currencyAddress": { + "description": "A contract or wallet address", + "examples": [ + "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" + ], + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "address": { + "description": "A contract or wallet address", + "examples": [ + "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" + ], + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "maxClaimable": { + "type": "string" + }, + "proof": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "address", + "maxClaimable", + "proof" + ] + } + ] + } + }, + "required": [ + "result" + ] } } } @@ -29580,11 +38411,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29610,11 +38449,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -29640,183 +38487,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs": { - "get": { - "operationId": "getClaimerProofs", - "summary": "Get claimer proofs", - "tags": ["ERC721"], - "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", - "parameters": [ - { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "query", - "name": "walletAddress", - "required": true, - "description": "The wallet address to get the merkle proofs for." - }, - { - "schema": { "type": "string" }, - "example": "80002", - "in": "path", - "name": "chain", - "required": true, - "description": "Chain ID or name" - }, - { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "path", - "name": "contractAddress", - "required": true, - "description": "Contract address" - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "anyOf": [ - { "type": "null" }, - { - "type": "object", - "properties": { - "price": { "type": "string" }, - "currencyAddress": { - "description": "A contract or wallet address", - "examples": [ - "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" - ], - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "address": { - "description": "A contract or wallet address", - "examples": [ - "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" - ], - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "maxClaimable": { "type": "string" }, - "proof": { - "type": "array", - "items": { "type": "string" } - } - }, - "required": ["address", "maxClaimable", "proof"] + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" } - ] - } - }, - "required": ["result"] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { "type": "string" }, - "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } } } } @@ -29838,7 +38521,9 @@ "post": { "operationId": "setApprovalForAll", "summary": "Set approval for all", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.", "requestBody": { "content": { @@ -29880,7 +38565,10 @@ } } }, - "required": ["operator", "approved"] + "required": [ + "operator", + "approved" + ] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -29892,14 +38580,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -29907,7 +38600,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -29915,7 +38611,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -29923,14 +38622,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -29938,7 +38642,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -29962,10 +38669,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -29986,11 +38697,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30016,11 +38735,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30046,11 +38773,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30072,7 +38807,9 @@ "post": { "operationId": "setApprovalForToken", "summary": "Set approval for token", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token.", "requestBody": { "content": { @@ -30114,7 +38851,10 @@ } } }, - "required": ["operator", "tokenId"] + "required": [ + "operator", + "tokenId" + ] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -30126,14 +38866,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -30141,7 +38886,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30149,7 +38897,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -30157,14 +38908,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -30172,7 +38928,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -30196,10 +38955,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -30220,11 +38983,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30250,11 +39021,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30280,11 +39059,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30306,7 +39093,9 @@ "post": { "operationId": "transfer", "summary": "Transfer token", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Transfer an ERC-721 token from the caller wallet.", "requestBody": { "content": { @@ -30348,7 +39137,10 @@ } } }, - "required": ["to", "tokenId"] + "required": [ + "to", + "tokenId" + ] }, "example": { "to": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -30360,14 +39152,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -30375,7 +39172,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30383,7 +39183,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -30391,14 +39194,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -30406,7 +39214,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -30430,10 +39241,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -30454,11 +39269,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30484,11 +39307,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30514,11 +39345,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30540,7 +39379,9 @@ "post": { "operationId": "transferFrom", "summary": "Transfer token from wallet", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -30586,7 +39427,11 @@ } } }, - "required": ["from", "to", "tokenId"] + "required": [ + "from", + "to", + "tokenId" + ] }, "example": { "from": "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", @@ -30599,14 +39444,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -30614,7 +39464,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30622,7 +39475,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -30630,14 +39486,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -30645,7 +39506,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -30669,10 +39533,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -30693,11 +39561,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30723,11 +39599,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30753,11 +39637,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -30779,7 +39671,9 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Mint ERC-721 tokens to a specific wallet.", "requestBody": { "content": { @@ -30799,25 +39693,59 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "image": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The image of the NFT" }, "external_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The animation url of the NFT" }, "properties": { @@ -30827,12 +39755,21 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "txOverrides": { @@ -30861,7 +39798,10 @@ } } }, - "required": ["receiver", "metadata"] + "required": [ + "receiver", + "metadata" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -30877,14 +39817,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -30892,7 +39837,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30900,7 +39848,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -30908,14 +39859,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -30923,7 +39879,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -30947,10 +39906,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -30971,11 +39934,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31001,11 +39972,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31031,11 +40010,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31057,7 +40044,9 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Mint ERC-721 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -31079,36 +40068,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -31120,14 +40131,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] } }, @@ -31157,7 +40174,10 @@ } } }, - "required": ["receiver", "metadatas"] + "required": [ + "receiver", + "metadatas" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -31180,14 +40200,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -31195,7 +40220,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31203,7 +40231,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -31211,14 +40242,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -31226,7 +40262,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -31250,10 +40289,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -31274,11 +40317,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31304,11 +40355,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31334,11 +40393,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31360,7 +40427,9 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Burn ERC-721 tokens in the caller wallet.", "requestBody": { "content": { @@ -31398,23 +40467,32 @@ } } }, - "required": ["tokenId"] + "required": [ + "tokenId" + ] }, - "example": { "tokenId": "0" } + "example": { + "tokenId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -31422,7 +40500,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31430,7 +40511,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -31438,14 +40522,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -31453,7 +40542,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -31477,10 +40569,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -31501,11 +40597,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31531,11 +40635,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31561,11 +40673,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31587,7 +40707,9 @@ "post": { "operationId": "lazyMint", "summary": "Lazy mint", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Lazy mint ERC-721 tokens to be claimed in the future.", "requestBody": { "content": { @@ -31605,36 +40727,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -31646,14 +40790,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] } }, @@ -31683,7 +40833,9 @@ } } }, - "required": ["metadatas"] + "required": [ + "metadatas" + ] }, "example": { "metadatas": [ @@ -31705,14 +40857,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -31720,7 +40877,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31728,7 +40888,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -31736,14 +40899,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -31751,7 +40919,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -31775,10 +40946,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -31799,11 +40974,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31829,11 +41012,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31859,11 +41050,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -31885,7 +41084,9 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Claim ERC-721 tokens to a specific wallet.", "requestBody": { "content": { @@ -31927,7 +41128,10 @@ } } }, - "required": ["receiver", "quantity"] + "required": [ + "receiver", + "quantity" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -31939,14 +41143,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -31954,7 +41163,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31962,7 +41174,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -31970,14 +41185,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -31985,7 +41205,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -32009,10 +41232,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -32033,11 +41260,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32063,11 +41298,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32093,11 +41336,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32119,7 +41370,9 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -32161,36 +41414,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -32202,14 +41477,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "currencyAddress": { @@ -32226,7 +41507,9 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] }, "mintEndTime": { @@ -32235,11 +41518,16 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] } }, - "required": ["to", "metadata"], + "required": [ + "to", + "metadata" + ], "examples": [ { "to": "0x...", @@ -32258,7 +41546,9 @@ "properties": { "metadata": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "object", "properties": { @@ -32295,10 +41585,17 @@ "items": { "type": "object", "properties": { - "trait_type": { "type": "string" }, - "value": { "type": "string" } + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": ["trait_type", "value"] + "required": [ + "trait_type", + "value" + ] } } } @@ -32362,7 +41659,10 @@ "type": "string" } }, - "required": ["metadata", "to"] + "required": [ + "metadata", + "to" + ] } ] } @@ -32371,7 +41671,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -32379,7 +41681,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -32387,7 +41692,10 @@ "description": "ERC721 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -32395,14 +41703,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -32410,7 +41723,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -32418,7 +41734,9 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -32441,7 +41759,9 @@ "payload": { "type": "object", "properties": { - "uri": { "type": "string" }, + "uri": { + "type": "string" + }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -32474,36 +41794,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -32515,14 +41857,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "currencyAddress": { @@ -32582,9 +41930,14 @@ } ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, { "type": "object", @@ -32592,9 +41945,15 @@ "payload": { "type": "object", "properties": { - "uri": { "type": "string" }, - "to": { "type": "string" }, - "price": { "type": "string" }, + "uri": { + "type": "string" + }, + "to": { + "type": "string" + }, + "price": { + "type": "string" + }, "currency": { "description": "A contract or wallet address", "examples": [ @@ -32603,12 +41962,24 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "primarySaleRecipient": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "primarySaleRecipient": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "uri", @@ -32623,14 +41994,21 @@ "uid" ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] } ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "payload": { @@ -32668,11 +42046,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32698,11 +42084,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32728,11 +42122,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -32754,7 +42156,9 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Mint ERC-721 tokens from a generated signature.", "requestBody": { "content": { @@ -32767,7 +42171,9 @@ { "type": "object", "properties": { - "uri": { "type": "string" }, + "uri": { + "type": "string" + }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -32800,36 +42206,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -32841,14 +42269,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "currencyAddress": { @@ -32911,9 +42345,15 @@ { "type": "object", "properties": { - "uri": { "type": "string" }, - "to": { "type": "string" }, - "price": { "type": "string" }, + "uri": { + "type": "string" + }, + "to": { + "type": "string" + }, + "price": { + "type": "string" + }, "currency": { "description": "A contract or wallet address", "examples": [ @@ -32922,12 +42362,24 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "primarySaleRecipient": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "primarySaleRecipient": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "uri", @@ -32944,7 +42396,9 @@ } ] }, - "signature": { "type": "string" }, + "signature": { + "type": "string" + }, "txOverrides": { "type": "object", "properties": { @@ -32971,7 +42425,10 @@ } } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, "example": { "payload": { @@ -32999,14 +42456,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -33014,7 +42476,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -33022,7 +42487,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33030,14 +42498,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33045,7 +42518,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33069,10 +42545,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33093,11 +42573,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33123,11 +42611,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33153,11 +42649,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33179,7 +42683,9 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for the drop.", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -33193,16 +42699,35 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -33211,24 +42736,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -33236,8 +42791,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -33258,21 +42817,31 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } } }, - "resetClaimEligibilityForAll": { "type": "boolean" }, + "resetClaimEligibilityForAll": { + "type": "boolean" + }, "txOverrides": { "type": "object", "properties": { @@ -33299,7 +42868,9 @@ } } }, - "required": ["claimConditionInputs"] + "required": [ + "claimConditionInputs" + ] } } }, @@ -33307,14 +42878,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -33322,7 +42898,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -33330,7 +42909,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33338,14 +42920,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33353,7 +42940,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33377,10 +42967,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33401,11 +42995,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33431,11 +43033,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33461,11 +43071,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33487,7 +43105,9 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -33499,16 +43119,35 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -33517,24 +43156,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -33542,8 +43211,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -33564,15 +43237,23 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } @@ -33607,7 +43288,10 @@ } } }, - "required": ["claimConditionInput", "index"] + "required": [ + "claimConditionInput", + "index" + ] } } }, @@ -33615,14 +43299,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -33630,7 +43319,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -33638,7 +43330,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33646,14 +43341,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33661,7 +43361,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33685,10 +43388,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33709,11 +43416,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33739,11 +43454,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33769,11 +43492,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -33795,7 +43526,9 @@ "post": { "operationId": "signaturePrepare", "summary": "Prepare signature", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Prepares a payload for a wallet to generate a signature.", "requestBody": { "content": { @@ -33805,7 +43538,9 @@ "properties": { "metadata": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "object", "properties": { @@ -33842,10 +43577,17 @@ "items": { "type": "object", "properties": { - "trait_type": { "type": "string" }, - "value": { "type": "string" } + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": ["trait_type", "value"] + "required": [ + "trait_type", + "value" + ] } } } @@ -33901,7 +43643,10 @@ "type": "string" } }, - "required": ["metadata", "to"] + "required": [ + "metadata", + "to" + ] } } }, @@ -33909,7 +43654,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -33917,7 +43664,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -33939,21 +43689,39 @@ "mintPayload": { "type": "object", "properties": { - "uri": { "type": "string" }, - "to": { "type": "string" }, - "price": { "type": "string" }, + "uri": { + "type": "string" + }, + "to": { + "type": "string" + }, + "price": { + "type": "string" + }, "currency": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "primarySaleRecipient": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "primarySaleRecipient": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "uri", @@ -33976,10 +43744,18 @@ "description": "Specifies the contextual information used to prevent signature reuse across different contexts.", "type": "object", "properties": { - "name": { "type": "string" }, - "version": { "type": "string" }, - "chainId": { "type": "number" }, - "verifyingContract": { "type": "string" } + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "chainId": { + "type": "number" + }, + "verifyingContract": { + "type": "string" + } }, "required": [ "name", @@ -33997,10 +43773,17 @@ "items": { "type": "object", "properties": { - "name": { "type": "string" }, - "type": { "type": "string" } + "name": { + "type": "string" + }, + "type": { + "type": "string" + } }, - "required": ["name", "type"] + "required": [ + "name", + "type" + ] } }, "MintRequest": { @@ -34008,33 +43791,61 @@ "items": { "type": "object", "properties": { - "name": { "type": "string" }, - "type": { "type": "string" } + "name": { + "type": "string" + }, + "type": { + "type": "string" + } }, - "required": ["name", "type"] + "required": [ + "name", + "type" + ] } } }, - "required": ["EIP712Domain", "MintRequest"] + "required": [ + "EIP712Domain", + "MintRequest" + ] }, "message": { "type": "object", "properties": { - "uri": { "type": "string" }, - "to": { "type": "string" }, - "price": { "type": "string" }, + "uri": { + "type": "string" + }, + "to": { + "type": "string" + }, + "price": { + "type": "string" + }, "currency": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "primarySaleRecipient": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "primarySaleRecipient": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "uri", @@ -34053,7 +43864,9 @@ "primaryType": { "description": "The main type of the data in the message corresponding to a defined type in the `types` field.", "type": "string", - "enum": ["MintRequest"] + "enum": [ + "MintRequest" + ] } }, "required": [ @@ -34064,10 +43877,15 @@ ] } }, - "required": ["mintPayload", "typedDataPayload"] + "required": [ + "mintPayload", + "typedDataPayload" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "result": { @@ -34088,16 +43906,34 @@ }, "types": { "MintRequest": [ - { "name": "to", "type": "address" }, - { "name": "royaltyRecipient", "type": "address" }, - { "name": "royaltyBps", "type": "uint256" }, + { + "name": "to", + "type": "address" + }, + { + "name": "royaltyRecipient", + "type": "address" + }, + { + "name": "royaltyBps", + "type": "uint256" + }, { "name": "primarySaleRecipient", "type": "address" }, - { "name": "uri", "type": "string" }, - { "name": "price", "type": "uint256" }, - { "name": "currency", "type": "address" }, + { + "name": "uri", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "currency", + "type": "address" + }, { "name": "validityStartTimestamp", "type": "uint128" @@ -34106,7 +43942,10 @@ "name": "validityEndTimestamp", "type": "uint128" }, - { "name": "uid", "type": "bytes32" } + { + "name": "uid", + "type": "bytes32" + } ] }, "message": { @@ -34137,11 +43976,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34167,11 +44014,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34197,11 +44052,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34223,7 +44086,9 @@ "post": { "operationId": "updateTokenMetadata", "summary": "Update token metadata", - "tags": ["ERC721"], + "tags": [ + "ERC721" + ], "description": "Update the metadata for an ERC721 token.", "requestBody": { "content": { @@ -34241,25 +44106,59 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "image": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The image of the NFT" }, "external_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The animation url of the NFT" }, "properties": { @@ -34269,7 +44168,14 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The background color of the NFT" } } @@ -34300,7 +44206,10 @@ } } }, - "required": ["tokenId", "metadata"] + "required": [ + "tokenId", + "metadata" + ] } } }, @@ -34308,14 +44217,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -34323,7 +44237,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34331,7 +44248,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -34339,14 +44259,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -34354,7 +44279,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -34378,10 +44306,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -34402,11 +44334,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34432,11 +44372,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34462,11 +44410,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34488,11 +44444,15 @@ "get": { "operationId": "get", "summary": "Get details", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get the details for a token in an ERC-1155 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0", "in": "query", "name": "tokenId", @@ -34500,7 +44460,9 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -34508,7 +44470,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34531,59 +44496,116 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": { @@ -34614,11 +44636,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34644,11 +44674,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34674,11 +44712,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34700,11 +44746,15 @@ "get": { "operationId": "getAll", "summary": "Get all details", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get details for all tokens in an ERC-1155 contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "example": "0", "in": "query", "name": "start", @@ -34712,7 +44762,9 @@ "description": "The start token ID for paginated results. Defaults to 0." }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "example": "20", "in": "query", "name": "count", @@ -34720,7 +44772,9 @@ "description": "The page count for paginated results. Defaults to 100." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -34728,7 +44782,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34753,60 +44810,117 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -34839,11 +44953,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34869,11 +44991,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34899,11 +45029,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -34925,11 +45063,16 @@ "get": { "operationId": "getOwned", "summary": "Get owned tokens", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get all tokens in an ERC-1155 contract owned by a specific wallet.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -34937,7 +45080,9 @@ "description": "Address of the wallet to get NFTs for" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -34945,7 +45090,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34970,60 +45118,117 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] + }, + "owner": { + "type": "string" }, - "owner": { "type": "string" }, "type": { "anyOf": [ - { "type": "string", "enum": ["ERC1155"] }, - { "type": "string", "enum": ["ERC721"] }, - { "type": "string", "enum": ["metaplex"] } + { + "type": "string", + "enum": [ + "ERC1155" + ] + }, + { + "type": "string", + "enum": [ + "ERC721" + ] + }, + { + "type": "string", + "enum": [ + "metaplex" + ] + } ] }, - "supply": { "type": "string" }, - "quantityOwned": { "type": "string" } + "supply": { + "type": "string" + }, + "quantityOwned": { + "type": "string" + } }, - "required": ["metadata", "owner", "type", "supply"] + "required": [ + "metadata", + "owner", + "type", + "supply" + ] } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -35034,7 +45239,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "owner": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "type": "ERC1155", @@ -35057,11 +45267,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35087,11 +45305,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35117,11 +45343,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35143,11 +45377,16 @@ "get": { "operationId": "balanceOf", "summary": "Get balance", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get the balance of a specific wallet address for this ERC-1155 contract.", "parameters": [ { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -35155,7 +45394,9 @@ "description": "Address of the wallet to check NFT balance" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0", "in": "query", "name": "tokenId", @@ -35163,7 +45404,9 @@ "description": "The tokenId of the NFT to check balance of" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -35171,7 +45414,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35186,9 +45432,15 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } } + "properties": { + "result": { + "type": "string" + } + } }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -35203,11 +45455,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35233,11 +45493,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35263,11 +45531,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35289,11 +45565,15 @@ "get": { "operationId": "isApproved", "summary": "Check if approved transfers", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Check if the specific wallet has approved transfers from a specific operator wallet.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -35301,7 +45581,9 @@ "description": "Address of the wallet who owns the NFT" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "operator", @@ -35309,7 +45591,9 @@ "description": "Address of the operator to check approval on" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -35317,7 +45601,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35332,9 +45619,15 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } } + "properties": { + "result": { + "type": "boolean" + } + } }, - "example": { "result": true } + "example": { + "result": true + } } } }, @@ -35349,11 +45642,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35379,11 +45680,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35409,11 +45718,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35435,11 +45752,15 @@ "get": { "operationId": "totalCount", "summary": "Get total supply", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get the total supply in circulation for this ERC-1155 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -35447,7 +45768,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35462,8 +45786,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "example": { "result": "1" } + "properties": { + "result": { + "type": "string" + } + }, + "example": { + "result": "1" + } } } } @@ -35479,11 +45809,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35509,11 +45847,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35539,11 +45885,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35565,11 +45919,15 @@ "get": { "operationId": "totalSupply", "summary": "Get total supply", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get the total supply in circulation for this ERC-1155 contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0", "in": "query", "name": "tokenId", @@ -35577,7 +45935,9 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -35585,7 +45945,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35600,8 +45963,16 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "example": [{ "result": "100000000" }] + "properties": { + "result": { + "type": "string" + } + }, + "example": [ + { + "result": "100000000" + } + ] } } } @@ -35617,11 +45988,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35647,11 +46026,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35677,11 +46064,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -35703,7 +46098,9 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -35729,36 +46126,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -35770,14 +46189,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "royaltyRecipient": { @@ -35810,7 +46235,9 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] }, "mintEndTime": { @@ -35819,11 +46246,17 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { "type": "number" } + { + "type": "number" + } ] } }, - "required": ["to", "quantity", "metadata"], + "required": [ + "to", + "quantity", + "metadata" + ], "examples": [ { "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -35844,26 +46277,59 @@ "properties": { "contractType": { "anyOf": [ - { "type": "string", "enum": ["TokenERC1155"] }, { "type": "string", - "enum": ["SignatureMintERC1155"] + "enum": [ + "TokenERC1155" + ] + }, + { + "type": "string", + "enum": [ + "SignatureMintERC1155" + ] } ] }, - "to": { "type": "string" }, - "quantity": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "number" }, - "primarySaleRecipient": { "type": "string" }, - "pricePerToken": { "type": "string" }, - "pricePerTokenWei": { "type": "string" }, - "currency": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "to": { + "type": "string" + }, + "quantity": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "number" + }, + "primarySaleRecipient": { + "type": "string" + }, + "pricePerToken": { + "type": "string" + }, + "pricePerTokenWei": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, - "required": ["to", "quantity", "validityStartTimestamp"] + "required": [ + "to", + "quantity", + "validityStartTimestamp" + ] }, { "anyOf": [ @@ -35908,24 +46374,41 @@ "items": { "type": "object", "properties": { - "trait_type": { "type": "string" }, - "value": { "type": "string" } + "trait_type": { + "type": "string" + }, + "value": { + "type": "string" + } }, - "required": ["trait_type", "value"] + "required": [ + "trait_type", + "value" + ] } } } }, - { "type": "string" } + { + "type": "string" + } ] } }, - "required": ["metadata"] + "required": [ + "metadata" + ] }, { "type": "object", - "properties": { "tokenId": { "type": "string" } }, - "required": ["tokenId"] + "properties": { + "tokenId": { + "type": "string" + } + }, + "required": [ + "tokenId" + ] } ] } @@ -35938,7 +46421,9 @@ }, "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -35946,7 +46431,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35954,7 +46442,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -35962,14 +46453,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -35977,7 +46473,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -35985,7 +46484,9 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -36008,8 +46509,12 @@ "payload": { "type": "object", "properties": { - "uri": { "type": "string" }, - "tokenId": { "type": "string" }, + "uri": { + "type": "string" + }, + "tokenId": { + "type": "string" + }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -36042,36 +46547,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -36083,14 +46610,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "currencyAddress": { @@ -36154,9 +46687,14 @@ } ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, { "type": "object", @@ -36164,18 +46702,42 @@ "payload": { "type": "object", "properties": { - "to": { "type": "string" }, - "royaltyRecipient": { "type": "string" }, - "royaltyBps": { "type": "string" }, - "primarySaleRecipient": { "type": "string" }, - "tokenId": { "type": "string" }, - "uri": { "type": "string" }, - "quantity": { "type": "string" }, - "pricePerToken": { "type": "string" }, - "currency": { "type": "string" }, - "validityStartTimestamp": { "type": "integer" }, - "validityEndTimestamp": { "type": "integer" }, - "uid": { "type": "string" } + "to": { + "type": "string" + }, + "royaltyRecipient": { + "type": "string" + }, + "royaltyBps": { + "type": "string" + }, + "primarySaleRecipient": { + "type": "string" + }, + "tokenId": { + "type": "string" + }, + "uri": { + "type": "string" + }, + "quantity": { + "type": "string" + }, + "pricePerToken": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "validityStartTimestamp": { + "type": "integer" + }, + "validityEndTimestamp": { + "type": "integer" + }, + "uid": { + "type": "string" + } }, "required": [ "to", @@ -36192,15 +46754,24 @@ "uid" ] }, - "signature": { "type": "string" } + "signature": { + "type": "string" + } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] } ] } }, - "required": ["result"], - "example": { "result": "1" } + "required": [ + "result" + ], + "example": { + "result": "1" + } } } } @@ -36216,11 +46787,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36246,11 +46825,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36276,11 +46863,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36302,25 +46897,33 @@ "get": { "operationId": "canClaim", "summary": "Check if tokens are available for claiming", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -36328,7 +46931,9 @@ "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -36336,7 +46941,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36351,8 +46959,14 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] } } } @@ -36368,11 +46982,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36398,11 +47020,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36428,11 +47058,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36454,25 +47092,40 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Get currently active claim phase for a specific token ID.", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Retrieve the currently active claim phase for a specific token ID, if any.", "parameters": [ { - "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to claim." }, { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -36480,7 +47133,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36500,14 +47156,28 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -36516,27 +47186,62 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -36549,12 +47254,23 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, - { "type": "array", "items": { "type": "string" } }, + { + "type": "null" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -36562,8 +47278,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -36584,12 +47304,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -36604,7 +47330,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -36620,11 +47348,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36650,11 +47386,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36680,11 +47424,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36706,25 +47458,40 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured for a specific token ID.", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get all the claim phases configured for a specific token ID.", "parameters": [ { - "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to get the claim conditions for." }, { - "schema": { "type": "boolean" }, + "schema": { + "type": "boolean" + }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -36732,7 +47499,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36755,8 +47525,12 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "startTime": { @@ -36765,8 +47539,12 @@ }, "price": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "currencyAddress": { @@ -36777,32 +47555,61 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "waitInSeconds": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, - "availableSupply": { "type": "string" }, - "currentMintSupply": { "type": "string" }, + "availableSupply": { + "type": "string" + }, + "currentMintSupply": { + "type": "string" + }, "currencyMetadata": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -36815,14 +47622,22 @@ }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "null" }, + { + "type": "null" + }, { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, { "type": "array", @@ -36831,8 +47646,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -36853,12 +47672,18 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } } ] @@ -36874,7 +47699,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -36890,11 +47717,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36920,11 +47755,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36950,11 +47793,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -36976,18 +47827,32 @@ "get": { "operationId": "getClaimerProofs", "summary": "Get claimer proofs", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", "parameters": [ { - "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to get the claimer proofs for." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -36995,7 +47860,9 @@ "description": "The wallet address to get the merkle proofs for." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -37003,7 +47870,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37021,11 +47891,15 @@ "properties": { "result": { "anyOf": [ - { "type": "null" }, + { + "type": "null" + }, { "type": "object", "properties": { - "price": { "type": "string" }, + "price": { + "type": "string" + }, "currencyAddress": { "description": "A contract or wallet address", "examples": [ @@ -37042,18 +47916,28 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "maxClaimable": { "type": "string" }, + "maxClaimable": { + "type": "string" + }, "proof": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } } }, - "required": ["address", "maxClaimable", "proof"] + "required": [ + "address", + "maxClaimable", + "proof" + ] } ] } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -37069,11 +47953,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37099,11 +47991,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37129,11 +48029,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37155,25 +48063,40 @@ "post": { "operationId": "getClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to check if the wallet address can claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -37181,7 +48104,9 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -37189,7 +48114,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37209,12 +48137,16 @@ "type": "array", "items": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "anyOf": [ { "type": "string", - "enum": ["There is not enough supply to claim."] + "enum": [ + "There is not enough supply to claim." + ] }, { "type": "string", @@ -37230,15 +48162,21 @@ }, { "type": "string", - "enum": ["Claim phase has not started yet."] + "enum": [ + "Claim phase has not started yet." + ] }, { "type": "string", - "enum": ["You have already claimed the token."] + "enum": [ + "You have already claimed the token." + ] }, { "type": "string", - "enum": ["Incorrect price or currency."] + "enum": [ + "Incorrect price or currency." + ] }, { "type": "string", @@ -37260,15 +48198,21 @@ }, { "type": "string", - "enum": ["There is no claim condition set."] + "enum": [ + "There is no claim condition set." + ] }, { "type": "string", - "enum": ["No wallet connected."] + "enum": [ + "No wallet connected." + ] }, { "type": "string", - "enum": ["No claim conditions found."] + "enum": [ + "No claim conditions found." + ] } ] } @@ -37276,7 +48220,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] } } } @@ -37292,11 +48238,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37322,11 +48276,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37352,11 +48314,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37378,7 +48348,9 @@ "post": { "operationId": "airdrop", "summary": "Airdrop tokens", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Airdrop ERC-1155 tokens to specific wallets.", "requestBody": { "content": { @@ -37402,9 +48374,15 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "quantity": { "default": "1", "type": "string" } + "quantity": { + "default": "1", + "type": "string" + } }, - "required": ["address", "quantity"] + "required": [ + "address", + "quantity" + ] } }, "txOverrides": { @@ -37433,7 +48411,10 @@ } } }, - "required": ["tokenId", "addresses"] + "required": [ + "tokenId", + "addresses" + ] }, "example": { "tokenId": "0", @@ -37454,14 +48435,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -37469,7 +48455,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37477,7 +48466,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -37485,14 +48477,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -37500,7 +48497,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -37524,10 +48524,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -37548,11 +48552,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37578,11 +48590,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37608,11 +48628,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37634,7 +48662,9 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Burn ERC-1155 tokens in the caller wallet.", "requestBody": { "content": { @@ -37676,23 +48706,34 @@ } } }, - "required": ["tokenId", "amount"] + "required": [ + "tokenId", + "amount" + ] }, - "example": { "tokenId": "0", "amount": "1" } + "example": { + "tokenId": "0", + "amount": "1" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -37700,7 +48741,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37708,7 +48752,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -37716,14 +48763,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -37731,7 +48783,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -37755,10 +48810,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -37779,11 +48838,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37809,11 +48876,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37839,11 +48914,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -37865,7 +48948,9 @@ "post": { "operationId": "burnBatch", "summary": "Burn tokens (batch)", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Burn a batch of ERC-1155 tokens in the caller wallet.", "requestBody": { "content": { @@ -37913,23 +48998,40 @@ } } }, - "required": ["tokenIds", "amounts"] + "required": [ + "tokenIds", + "amounts" + ] }, - "example": { "tokenIds": ["0", "1"], "amounts": ["1", "1"] } + "example": { + "tokenIds": [ + "0", + "1" + ], + "amounts": [ + "1", + "1" + ] + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -37937,7 +49039,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37945,7 +49050,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -37953,14 +49061,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -37968,7 +49081,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -37992,10 +49108,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38016,11 +49136,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38046,11 +49174,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38076,11 +49212,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38102,7 +49246,9 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Claim ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -38148,7 +49294,11 @@ } } }, - "required": ["receiver", "tokenId", "quantity"] + "required": [ + "receiver", + "tokenId", + "quantity" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -38161,14 +49311,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -38176,7 +49331,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38184,7 +49342,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -38192,14 +49353,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -38207,7 +49373,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -38231,10 +49400,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38255,11 +49428,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38285,11 +49466,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38315,11 +49504,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38341,7 +49538,9 @@ "post": { "operationId": "lazyMint", "summary": "Lazy mint", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Lazy mint ERC-1155 tokens to be claimed in the future.", "requestBody": { "content": { @@ -38359,36 +49558,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -38400,14 +49621,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] } }, @@ -38437,7 +49664,9 @@ } } }, - "required": ["metadatas"] + "required": [ + "metadatas" + ] }, "example": { "metadatas": [ @@ -38459,14 +49688,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -38474,7 +49708,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38482,7 +49719,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -38490,14 +49730,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -38505,7 +49750,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -38529,10 +49777,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38553,11 +49805,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38583,11 +49843,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38613,11 +49881,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38639,7 +49915,9 @@ "post": { "operationId": "mintAdditionalSupplyTo", "summary": "Mint additional supply", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Mint additional supply of ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -38685,7 +49963,11 @@ } } }, - "required": ["receiver", "tokenId", "additionalSupply"] + "required": [ + "receiver", + "tokenId", + "additionalSupply" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -38698,14 +49980,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -38713,7 +50000,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38721,7 +50011,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -38729,14 +50022,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -38744,7 +50042,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -38768,10 +50069,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38792,11 +50097,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38822,11 +50135,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38852,11 +50173,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -38878,7 +50207,9 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Mint ERC-1155 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -38903,36 +50234,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -38944,19 +50297,30 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, - "supply": { "type": "string" } + "supply": { + "type": "string" + } }, - "required": ["metadata", "supply"] + "required": [ + "metadata", + "supply" + ] } }, "txOverrides": { @@ -38985,7 +50349,10 @@ } } }, - "required": ["receiver", "metadataWithSupply"] + "required": [ + "receiver", + "metadataWithSupply" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39014,14 +50381,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -39029,7 +50401,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39037,7 +50412,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39045,14 +50423,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39060,7 +50443,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39084,10 +50470,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39108,11 +50498,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39138,11 +50536,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39168,11 +50574,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39194,7 +50608,9 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Mint ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -39217,36 +50633,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -39258,19 +50696,30 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, - "supply": { "type": "string" } + "supply": { + "type": "string" + } }, - "required": ["metadata", "supply"] + "required": [ + "metadata", + "supply" + ] }, "txOverrides": { "type": "object", @@ -39298,7 +50747,10 @@ } } }, - "required": ["receiver", "metadataWithSupply"] + "required": [ + "receiver", + "metadataWithSupply" + ] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39317,14 +50769,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -39332,7 +50789,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39340,7 +50800,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39348,14 +50811,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39363,7 +50831,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39387,10 +50858,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39411,11 +50886,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39441,11 +50924,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39471,11 +50962,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39497,7 +50996,9 @@ "post": { "operationId": "setApprovalForAll", "summary": "Set approval for all", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.", "requestBody": { "content": { @@ -39539,7 +51040,10 @@ } } }, - "required": ["operator", "approved"] + "required": [ + "operator", + "approved" + ] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39551,14 +51055,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -39566,7 +51075,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39574,7 +51086,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39582,14 +51097,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39597,7 +51117,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39621,10 +51144,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39645,11 +51172,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39675,11 +51210,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39705,11 +51248,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39731,7 +51282,9 @@ "post": { "operationId": "transfer", "summary": "Transfer token", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Transfer an ERC-1155 token from the caller wallet.", "requestBody": { "content": { @@ -39777,7 +51330,11 @@ } } }, - "required": ["to", "tokenId", "amount"] + "required": [ + "to", + "tokenId", + "amount" + ] }, "example": { "to": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39790,14 +51347,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -39805,7 +51367,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39813,7 +51378,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39821,14 +51389,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39836,7 +51409,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39860,10 +51436,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39884,11 +51464,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39914,11 +51502,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39944,11 +51540,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -39970,7 +51574,9 @@ "post": { "operationId": "transferFrom", "summary": "Transfer token from wallet", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -40020,7 +51626,12 @@ } } }, - "required": ["from", "to", "tokenId", "amount"] + "required": [ + "from", + "to", + "tokenId", + "amount" + ] }, "example": { "from": "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", @@ -40034,14 +51645,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -40049,7 +51665,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40057,7 +51676,10 @@ "description": "ERC1155 contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40065,14 +51687,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40080,7 +51707,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40104,10 +51734,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40128,11 +51762,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40158,11 +51800,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40188,11 +51838,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40214,7 +51872,9 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Mint ERC-1155 tokens from a generated signature.", "requestBody": { "content": { @@ -40225,8 +51885,12 @@ "payload": { "type": "object", "properties": { - "uri": { "type": "string" }, - "tokenId": { "type": "string" }, + "uri": { + "type": "string" + }, + "tokenId": { + "type": "string" + }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -40259,36 +51923,58 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The animation url of the NFT" }, @@ -40300,14 +51986,20 @@ }, "background_color": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ], "description": "The background color of the NFT" } } }, - { "type": "string" } + { + "type": "string" + } ] }, "currencyAddress": { @@ -40367,7 +52059,9 @@ "signature": "0x674414eb46d1be3fb8f703b51049aa857b27c70c72293f054ed211be0efb843841bcd86b1245c321b20e50e2a9bebb555e70246d84778d5e76668db2f102c6401b" } }, - "signature": { "type": "string" }, + "signature": { + "type": "string" + }, "txOverrides": { "type": "object", "properties": { @@ -40394,23 +52088,34 @@ } } }, - "required": ["payload", "signature"] + "required": [ + "payload", + "signature" + ] }, - "example": { "payload": {}, "signature": "" } + "example": { + "payload": {}, + "signature": "" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -40418,7 +52123,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40426,7 +52134,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40434,14 +52145,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40449,7 +52165,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40473,10 +52192,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40497,11 +52220,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40527,11 +52258,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40557,11 +52296,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40583,7 +52330,9 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for a specific token ID..", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -40593,7 +52342,14 @@ "properties": { "tokenId": { "description": "ID of the token to set the claim conditions for", - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "claimConditionInputs": { "type": "array", @@ -40601,16 +52357,35 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -40619,24 +52394,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -40644,8 +52449,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -40666,21 +52475,31 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } } }, - "resetClaimEligibilityForAll": { "type": "boolean" }, + "resetClaimEligibilityForAll": { + "type": "boolean" + }, "txOverrides": { "type": "object", "properties": { @@ -40707,7 +52526,10 @@ } } }, - "required": ["tokenId", "claimConditionInputs"] + "required": [ + "tokenId", + "claimConditionInputs" + ] } } }, @@ -40715,14 +52537,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -40730,7 +52557,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40738,7 +52568,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40746,14 +52579,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40761,7 +52599,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40785,10 +52626,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40809,11 +52654,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40839,11 +52692,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40869,11 +52730,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -40895,7 +52764,9 @@ "post": { "operationId": "claimConditionsUpdate", "summary": "Overwrite the claim conditions for a specific token ID..", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Allows you to set claim conditions for multiple token IDs in a single transaction.", "requestBody": { "content": { @@ -40910,7 +52781,14 @@ "properties": { "tokenId": { "description": "ID of the token to set the claim conditions for", - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "claimConditions": { "type": "array", @@ -40919,20 +52797,33 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "currencyAddress": { @@ -40943,34 +52834,52 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "waitInSeconds": { "anyOf": [ - { "type": "number" }, - { "type": "string" } + { + "type": "number" + }, + { + "type": "string" + } ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, + { + "type": "string" + }, { "type": "array", - "items": { "type": "number" } + "items": { + "type": "number" + } } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, { "type": "array", @@ -40979,8 +52888,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -41001,25 +52914,38 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } } } }, - "required": ["tokenId", "claimConditions"] + "required": [ + "tokenId", + "claimConditions" + ] } }, - "resetClaimEligibilityForAll": { "type": "boolean" }, + "resetClaimEligibilityForAll": { + "type": "boolean" + }, "txOverrides": { "type": "object", "properties": { @@ -41046,7 +52972,9 @@ } } }, - "required": ["claimConditionsForToken"] + "required": [ + "claimConditionsForToken" + ] } } }, @@ -41054,14 +52982,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -41069,7 +53002,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41077,7 +53013,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -41085,14 +53024,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -41100,7 +53044,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -41124,10 +53071,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -41148,11 +53099,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41178,11 +53137,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41208,11 +53175,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41234,7 +53209,9 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration.", "requestBody": { "content": { @@ -41244,22 +53221,48 @@ "properties": { "tokenId": { "description": "Token ID to update claim phase for", - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "claimConditionInput": { "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [{ "type": "string" }, { "type": "number" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "startTime": { "anyOf": [ - { "format": "date-time", "type": "string" }, - { "type": "number" } + { + "format": "date-time", + "type": "string" + }, + { + "type": "number" + } ] }, "price": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "currencyAddress": { "description": "A contract or wallet address", @@ -41268,24 +53271,54 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "waitInSeconds": { - "anyOf": [{ "type": "number" }, { "type": "string" }] + "anyOf": [ + { + "type": "number" + }, + { + "type": "string" + } + ] }, "merkleRootHash": { "anyOf": [ - { "type": "string" }, - { "type": "array", "items": { "type": "number" } } + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "number" + } + } ] }, "metadata": { "type": "object", - "properties": { "name": { "type": "string" } } + "properties": { + "name": { + "type": "string" + } + } }, "snapshot": { "anyOf": [ - { "type": "array", "items": { "type": "string" } }, + { + "type": "array", + "items": { + "type": "string" + } + }, { "type": "array", "items": { @@ -41293,8 +53326,12 @@ "properties": { "price": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] }, "currencyAddress": { @@ -41315,15 +53352,23 @@ }, "maxClaimable": { "anyOf": [ - { "type": "string" }, - { "type": "number" } + { + "type": "string" + }, + { + "type": "number" + } ] } }, - "required": ["address"] + "required": [ + "address" + ] } }, - { "type": "null" } + { + "type": "null" + } ] } } @@ -41358,7 +53403,11 @@ } } }, - "required": ["tokenId", "claimConditionInput", "index"] + "required": [ + "tokenId", + "claimConditionInput", + "index" + ] } } }, @@ -41366,14 +53415,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -41381,7 +53435,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41389,7 +53446,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -41397,14 +53457,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -41412,7 +53477,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -41436,10 +53504,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -41460,11 +53532,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41490,11 +53570,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41520,11 +53608,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41546,7 +53642,9 @@ "post": { "operationId": "updateTokenMetadata", "summary": "Update token metadata", - "tags": ["ERC1155"], + "tags": [ + "ERC1155" + ], "description": "Update the metadata for an ERC1155 token.", "requestBody": { "content": { @@ -41564,25 +53662,59 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "description": "The description of the NFT", - "anyOf": [{ "type": "string" }, { "type": "null" }] + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "image": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The image of the NFT" }, "external_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The animation url of the NFT" }, "properties": { @@ -41592,7 +53724,14 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [{ "type": "string" }, { "type": "null" }], + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "description": "The background color of the NFT" } } @@ -41623,7 +53762,10 @@ } } }, - "required": ["tokenId", "metadata"] + "required": [ + "tokenId", + "metadata" + ] } } }, @@ -41631,14 +53773,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -41646,7 +53793,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41654,7 +53804,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -41662,14 +53815,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -41677,7 +53835,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -41701,10 +53862,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -41725,11 +53890,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41755,11 +53928,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41785,11 +53966,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -41811,46 +54000,60 @@ "get": { "operationId": "getAll", "summary": "Get all listings", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Get all direct listings for this marketplace contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -41858,7 +54061,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41912,11 +54118,21 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -41931,52 +54147,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] }, "startTimeInSeconds": { @@ -41997,7 +54272,9 @@ } } }, - "required": ["result"], + "required": [ + "result" + ], "example": [ { "result": [ @@ -42023,7 +54300,10 @@ "description": "Origin", "external_url": "", "attributes": [ - { "trait_type": "Mode", "value": "GOD" } + { + "trait_type": "Mode", + "value": "GOD" + } ] }, "status": 1, @@ -42048,11 +54328,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42078,11 +54366,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42108,11 +54404,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42134,46 +54438,60 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid listings", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -42181,7 +54499,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42235,11 +54556,21 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -42254,52 +54585,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] }, "startTimeInSeconds": { @@ -42320,7 +54710,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -42345,7 +54737,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "status": 1, "startTimeInSeconds": 1686006043, @@ -42367,11 +54764,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42397,11 +54802,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42427,11 +54840,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42453,18 +54874,24 @@ "get": { "operationId": "getListing", "summary": "Get direct listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Gets a direct listing on this marketplace contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -42472,7 +54899,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42524,11 +54954,21 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -42543,52 +54983,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] }, "startTimeInSeconds": { @@ -42608,7 +55107,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -42641,11 +55142,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42671,11 +55180,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42701,11 +55218,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42727,18 +55252,25 @@ "get": { "operationId": "isBuyerApprovedForListing", "summary": "Check approved buyer", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Check if a buyer is approved to purchase a specific direct listing.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -42746,7 +55278,9 @@ "description": "The wallet address of the buyer to check." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -42754,7 +55288,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42769,10 +55306,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] }, - "example": { "result": true } + "example": { + "result": true + } } } }, @@ -42787,11 +55332,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42817,11 +55370,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42847,11 +55408,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42873,18 +55442,25 @@ "get": { "operationId": "isCurrencyApprovedForListing", "summary": "Check approved currency", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Check if a currency is approved for a specific direct listing.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "currencyContractAddress", @@ -42892,7 +55468,9 @@ "description": "The smart contract address of the ERC20 token to check." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -42900,7 +55478,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42915,10 +55496,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] }, - "example": { "result": true } + "example": { + "result": true + } } } }, @@ -42933,11 +55522,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42963,11 +55560,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -42993,11 +55598,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43019,11 +55632,15 @@ "get": { "operationId": "getTotalCount", "summary": "Transfer token from wallet", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Get the total number of direct listings on this marketplace contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -43031,7 +55648,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43046,10 +55666,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -43064,11 +55692,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43094,11 +55730,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43124,11 +55768,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43150,46 +55802,60 @@ "get": { "operationId": "getAll", "summary": "Get all English auctions", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get all English auction listings on this marketplace contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -43197,7 +55863,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43251,11 +55920,21 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -43279,52 +55958,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -43342,7 +56080,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -43371,7 +56111,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "status": 1 } @@ -43391,11 +56136,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43421,11 +56174,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43451,11 +56212,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43477,46 +56246,60 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid English auctions", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get all valid English auction listings on this marketplace contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -43524,7 +56307,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43578,11 +56364,21 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -43606,52 +56402,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -43669,7 +56524,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -43698,7 +56555,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "status": 1 } @@ -43718,11 +56580,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43748,11 +56618,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43778,11 +56656,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -43804,18 +56690,24 @@ "get": { "operationId": "getAuction", "summary": "Get English auction", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get a specific English auction listing on this marketplace contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -43823,7 +56715,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43875,11 +56770,21 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -43903,52 +56808,111 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -43965,7 +56929,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -43998,11 +56964,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44028,11 +57002,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44058,11 +57040,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44084,18 +57074,24 @@ "get": { "operationId": "getBidBufferBps", "summary": "Get bid buffer BPS", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get the basis points of the bid buffer. \nThis is the percentage higher that a new bid must be than the current highest bid in order to be placed. \nIf there is no current bid, the bid must be at least the minimum bid amount.\nReturns the value in percentage format, e.g. 100 = 1%.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44103,7 +57099,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44124,9 +57123,13 @@ "type": "number" } }, - "required": ["result"] + "required": [ + "result" + ] }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -44141,11 +57144,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44171,11 +57182,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44201,11 +57220,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44227,18 +57254,24 @@ "get": { "operationId": "getMinimumNextBid", "summary": "Get minimum next bid", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Helper function to calculate the value that the next bid must be in order to be accepted. \nIf there is no current bid, the bid must be at least the minimum bid amount.\nIf there is a current bid, the bid must be at least the current bid amount + the bid buffer.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44246,7 +57279,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44265,11 +57301,21 @@ "result": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -44281,9 +57327,13 @@ "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." } }, - "required": ["result"] + "required": [ + "result" + ] }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -44298,11 +57348,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44328,11 +57386,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44358,11 +57424,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44384,18 +57458,24 @@ "get": { "operationId": "getWinningBid", "summary": "Get winning bid", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get the current highest bid of an active auction.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44403,7 +57483,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44441,11 +57524,21 @@ "bidAmountCurrencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." } @@ -44453,7 +57546,9 @@ } } }, - "example": { "result": "0x..." } + "example": { + "result": "0x..." + } } } }, @@ -44468,11 +57563,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44498,11 +57601,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44528,11 +57639,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44554,11 +57673,15 @@ "get": { "operationId": "getTotalCount", "summary": "Get total listings", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get the count of English auction listings on this marketplace contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44566,7 +57689,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44581,10 +57707,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -44599,11 +57733,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44629,11 +57771,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44659,11 +57809,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44685,25 +57843,33 @@ "get": { "operationId": "isWinningBid", "summary": "Check winning bid", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Check if a bid is or will be the winning bid for an auction.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "bidAmount", "required": true, "description": "The amount of the bid to check if it is the winning bid." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44711,7 +57877,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44726,10 +57895,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "boolean" } }, - "required": ["result"] + "properties": { + "result": { + "type": "boolean" + } + }, + "required": [ + "result" + ] }, - "example": { "result": true } + "example": { + "result": true + } } } }, @@ -44744,11 +57921,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44774,11 +57959,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44804,11 +57997,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44830,18 +58031,24 @@ "get": { "operationId": "getWinner", "summary": "Get winner", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Get the winner of an English auction. Can only be called after the auction has ended.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -44849,7 +58056,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44864,10 +58074,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] }, - "example": { "result": "0x..." } + "example": { + "result": "0x..." + } } } }, @@ -44882,11 +58100,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44912,11 +58138,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44942,11 +58176,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -44968,46 +58210,60 @@ "get": { "operationId": "getAll", "summary": "Get all offers", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Get all offers on this marketplace contract.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "offeror", "required": false, "description": "has offers from this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -45015,7 +58271,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45067,11 +58326,21 @@ "currencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -45090,43 +58359,72 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -45134,12 +58432,42 @@ }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -45153,7 +58481,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -45178,7 +58508,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "endTimeInSeconds": 1686610889, "status": 4 @@ -45199,11 +58534,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45229,11 +58572,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45259,11 +58610,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45285,46 +58644,60 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid offers", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted.", "parameters": [ { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "offeror", "required": false, "description": "has offers from this Address" }, { - "schema": { "type": "number" }, + "schema": { + "type": "number" + }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -45332,7 +58705,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45384,11 +58760,21 @@ "currencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -45407,43 +58793,72 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -45451,12 +58866,42 @@ }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -45470,7 +58915,9 @@ } } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -45495,7 +58942,12 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [{ "trait_type": "Mode", "value": "GOD" }] + "attributes": [ + { + "trait_type": "Mode", + "value": "GOD" + } + ] }, "endTimeInSeconds": 1686610889, "status": 4 @@ -45516,11 +58968,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45546,11 +59006,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45576,11 +59044,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45602,18 +59078,24 @@ "get": { "operationId": "getOffer", "summary": "Get offer", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Get details about an offer.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "query", "name": "offerId", "required": true, "description": "The ID of the offer to get information about." }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -45621,7 +59103,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45671,11 +59156,21 @@ "currencyValue": { "type": "object", "properties": { - "name": { "type": "string" }, - "symbol": { "type": "string" }, - "decimals": { "type": "number" }, - "value": { "type": "string" }, - "displayValue": { "type": "string" } + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "value": { + "type": "string" + }, + "displayValue": { + "type": "string" + } }, "required": [ "name", @@ -45694,43 +59189,72 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { "type": "string" }, - "uri": { "type": "string" }, + "id": { + "type": "string" + }, + "uri": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "number" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "null" + } ] }, "description": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "image": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "external_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "animation_url": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, "properties": {}, "attributes": {} }, - "required": ["id", "uri"] + "required": [ + "id", + "uri" + ] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -45738,12 +59262,42 @@ }, "status": { "anyOf": [ - { "type": "number", "enum": [0] }, - { "type": "number", "enum": [1] }, - { "type": "number", "enum": [2] }, - { "type": "number", "enum": [3] }, - { "type": "number", "enum": [4] }, - { "type": "number", "enum": [5] } + { + "type": "number", + "enum": [ + 0 + ] + }, + { + "type": "number", + "enum": [ + 1 + ] + }, + { + "type": "number", + "enum": [ + 2 + ] + }, + { + "type": "number", + "enum": [ + 3 + ] + }, + { + "type": "number", + "enum": [ + 4 + ] + }, + { + "type": "number", + "enum": [ + 5 + ] + } ] } }, @@ -45756,7 +59310,9 @@ ] } }, - "required": ["result"] + "required": [ + "result" + ] }, "example": { "result": [ @@ -45789,11 +59345,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45819,11 +59383,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45849,11 +59421,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45875,11 +59455,15 @@ "get": { "operationId": "getTotalCount", "summary": "Get total count", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Get the total number of offers on this marketplace contract.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -45887,7 +59471,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45902,10 +59489,18 @@ "application/json": { "schema": { "type": "object", - "properties": { "result": { "type": "string" } }, - "required": ["result"] + "properties": { + "result": { + "type": "string" + } + }, + "required": [ + "result" + ] }, - "example": { "result": "1" } + "example": { + "result": "1" + } } } }, @@ -45920,11 +59515,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45950,11 +59553,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -45980,11 +59591,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46006,7 +59625,9 @@ "post": { "operationId": "createListing", "summary": "Create direct listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Create a direct listing on this marketplace contract.", "requestBody": { "content": { @@ -46074,7 +59695,11 @@ } } }, - "required": ["assetContractAddress", "tokenId", "pricePerToken"] + "required": [ + "assetContractAddress", + "tokenId", + "pricePerToken" + ] }, "example": { "assetContractAddress": "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", @@ -46091,14 +59716,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -46106,7 +59736,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46114,7 +59747,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -46122,14 +59758,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -46137,7 +59778,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -46161,10 +59805,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -46185,11 +59833,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46215,11 +59871,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46245,11 +59909,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46271,7 +59943,9 @@ "post": { "operationId": "updateListing", "summary": "Update direct listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Update a direct listing on this marketplace contract.", "requestBody": { "content": { @@ -46350,21 +60024,28 @@ "pricePerToken" ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -46372,7 +60053,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46380,7 +60064,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -46388,14 +60075,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -46403,7 +60095,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -46427,10 +60122,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -46451,11 +60150,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46481,11 +60188,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46511,11 +60226,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46537,7 +60260,9 @@ "post": { "operationId": "buyFromListing", "summary": "Buy from direct listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Buy from a specific direct listing from this marketplace contract.", "requestBody": { "content": { @@ -46583,7 +60308,11 @@ } } }, - "required": ["listingId", "quantity", "buyer"] + "required": [ + "listingId", + "quantity", + "buyer" + ] }, "example": { "listingId": "0", @@ -46596,14 +60325,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -46611,7 +60345,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46619,7 +60356,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -46627,14 +60367,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -46642,7 +60387,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -46666,10 +60414,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -46690,11 +60442,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46720,11 +60480,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46750,11 +60518,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46776,7 +60552,9 @@ "post": { "operationId": "approveBuyerForReservedListing", "summary": "Approve buyer for reserved listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Approve a wallet address to buy from a reserved listing.", "requestBody": { "content": { @@ -46818,7 +60596,10 @@ } } }, - "required": ["listingId", "buyer"] + "required": [ + "listingId", + "buyer" + ] }, "example": { "listingId": "0", @@ -46830,14 +60611,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -46845,7 +60631,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46853,7 +60642,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -46861,14 +60653,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -46876,7 +60673,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -46900,10 +60700,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -46924,11 +60728,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46954,11 +60766,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -46984,11 +60804,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47010,7 +60838,9 @@ "post": { "operationId": "revokeBuyerApprovalForReservedListing", "summary": "Revoke approval for reserved listings", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Revoke approval for a buyer to purchase a reserved listing.", "requestBody": { "content": { @@ -47054,7 +60884,10 @@ } } }, - "required": ["listingId", "buyerAddress"] + "required": [ + "listingId", + "buyerAddress" + ] }, "example": { "listingId": "0", @@ -47066,14 +60899,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -47081,7 +60919,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47089,7 +60930,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -47097,14 +60941,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -47112,7 +60961,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -47136,10 +60988,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -47160,11 +61016,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47190,11 +61054,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47220,11 +61092,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47246,7 +61126,9 @@ "post": { "operationId": "revokeCurrencyApprovalForListing", "summary": "Revoke currency approval for reserved listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Revoke approval of a currency for a reserved listing.", "requestBody": { "content": { @@ -47290,7 +61172,10 @@ } } }, - "required": ["listingId", "currencyContractAddress"] + "required": [ + "listingId", + "currencyContractAddress" + ] }, "example": { "listingId": "0", @@ -47302,14 +61187,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -47317,7 +61207,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47325,7 +61218,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -47333,14 +61229,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -47348,7 +61249,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -47372,10 +61276,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -47396,11 +61304,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47426,11 +61342,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47456,11 +61380,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47482,7 +61414,9 @@ "post": { "operationId": "cancelListing", "summary": "Cancel direct listing", - "tags": ["Marketplace-DirectListings"], + "tags": [ + "Marketplace-DirectListings" + ], "description": "Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it.", "requestBody": { "content": { @@ -47520,23 +61454,32 @@ } } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -47544,7 +61487,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47552,7 +61498,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -47560,14 +61509,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -47575,7 +61529,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -47599,10 +61556,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -47623,11 +61584,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47653,11 +61622,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47683,11 +61660,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47709,7 +61694,9 @@ "post": { "operationId": "buyoutAuction", "summary": "Buyout English auction", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Buyout the listing for this auction.", "requestBody": { "content": { @@ -47722,23 +61709,32 @@ "type": "string" } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -47746,7 +61742,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47770,10 +61769,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -47794,11 +61797,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47824,11 +61835,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47854,11 +61873,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47880,7 +61907,9 @@ "post": { "operationId": "cancelAuction", "summary": "Cancel English auction", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made.", "requestBody": { "content": { @@ -47893,23 +61922,32 @@ "type": "string" } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -47917,7 +61955,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47941,10 +61982,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -47965,11 +62010,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -47995,11 +62048,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48025,11 +62086,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48051,7 +62120,9 @@ "post": { "operationId": "createAuction", "summary": "Create English auction", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Create an English auction listing on this marketplace contract.", "requestBody": { "content": { @@ -48127,14 +62198,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -48142,7 +62218,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48166,10 +62245,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48190,11 +62273,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48220,11 +62311,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48250,11 +62349,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48276,7 +62383,9 @@ "post": { "operationId": "closeAuctionForBidder", "summary": "Close English auction for bidder", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "After an auction has concluded (and a buyout did not occur),\nexecute the sale for the buyer, meaning the buyer receives the NFT(s). \nYou must also call closeAuctionForSeller to execute the sale for the seller,\nmeaning the seller receives the payment from the highest bid.", "requestBody": { "content": { @@ -48289,23 +62398,32 @@ "type": "string" } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -48313,7 +62431,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48337,10 +62458,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48361,11 +62486,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48391,11 +62524,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48421,11 +62562,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48447,7 +62596,9 @@ "post": { "operationId": "closeAuctionForSeller", "summary": "Close English auction for seller", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "After an auction has concluded (and a buyout did not occur),\nexecute the sale for the seller, meaning the seller receives the payment from the highest bid.\nYou must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s).", "requestBody": { "content": { @@ -48460,23 +62611,32 @@ "type": "string" } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -48484,7 +62644,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48508,10 +62671,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48532,11 +62699,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48562,11 +62737,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48592,11 +62775,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48618,7 +62809,9 @@ "post": { "operationId": "executeSale", "summary": "Execute sale", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Close the auction for both buyer and seller.\nThis means the NFT(s) will be transferred to the buyer and the seller will receive the funds.\nThis function can only be called after the auction has ended.", "requestBody": { "content": { @@ -48631,23 +62824,32 @@ "type": "string" } }, - "required": ["listingId"] + "required": [ + "listingId" + ] }, - "example": { "listingId": "0" } + "example": { + "listingId": "0" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -48655,7 +62857,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48679,10 +62884,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48703,11 +62912,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48733,11 +62950,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48763,11 +62988,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48789,7 +63022,9 @@ "post": { "operationId": "makeBid", "summary": "Make bid", - "tags": ["Marketplace-EnglishAuctions"], + "tags": [ + "Marketplace-EnglishAuctions" + ], "description": "Place a bid on an English auction listing.", "requestBody": { "content": { @@ -48806,23 +63041,34 @@ "type": "string" } }, - "required": ["listingId", "bidAmount"] + "required": [ + "listingId", + "bidAmount" + ] }, - "example": { "listingId": "0", "bidAmount": "0.00000001" } + "example": { + "listingId": "0", + "bidAmount": "0.00000001" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -48830,7 +63076,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48854,10 +63103,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48878,11 +63131,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48908,11 +63169,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48938,11 +63207,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -48964,7 +63241,9 @@ "post": { "operationId": "makeOffer", "summary": "Make offer", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Make an offer on a token. A valid listing is not required.", "requestBody": { "content": { @@ -49024,7 +63303,11 @@ } } }, - "required": ["assetContractAddress", "tokenId", "totalPrice"] + "required": [ + "assetContractAddress", + "tokenId", + "totalPrice" + ] }, "example": { "assetContractAddress": "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", @@ -49040,14 +63323,19 @@ }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -49055,7 +63343,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49063,7 +63354,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49071,14 +63365,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49086,7 +63385,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49110,10 +63412,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49134,11 +63440,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49164,11 +63478,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49194,11 +63516,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49220,7 +63550,9 @@ "post": { "operationId": "cancelOffer", "summary": "Cancel offer", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Cancel a valid offer made by the caller wallet.", "requestBody": { "content": { @@ -49258,23 +63590,32 @@ } } }, - "required": ["offerId"] + "required": [ + "offerId" + ] }, - "example": { "offerId": "1" } + "example": { + "offerId": "1" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -49282,7 +63623,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49290,7 +63634,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49298,14 +63645,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49313,7 +63665,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49337,10 +63692,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49361,11 +63720,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49391,11 +63758,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49421,11 +63796,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49447,7 +63830,9 @@ "post": { "operationId": "acceptOffer", "summary": "Accept offer", - "tags": ["Marketplace-Offers"], + "tags": [ + "Marketplace-Offers" + ], "description": "Accept a valid offer.", "requestBody": { "content": { @@ -49485,23 +63870,32 @@ } } }, - "required": ["offerId"] + "required": [ + "offerId" + ] }, - "example": { "offerId": "1" } + "example": { + "offerId": "1" + } } }, "required": true }, "parameters": [ { - "schema": { "default": false, "type": "boolean" }, + "schema": { + "default": false, + "type": "boolean" + }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -49509,7 +63903,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49517,7 +63914,10 @@ "description": "Contract address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49525,14 +63925,19 @@ "description": "Backend wallet address" }, { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49540,7 +63945,10 @@ "description": "Smart account address" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49564,10 +63972,14 @@ "type": "string" } }, - "required": ["queueId"] + "required": [ + "queueId" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49588,11 +64000,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49618,11 +64038,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49648,11 +64076,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49674,7 +64110,9 @@ "get": { "operationId": "getContractSubscriptions", "summary": "Get contract subscriptions", - "tags": ["Contract-Subscriptions"], + "tags": [ + "Contract-Subscriptions" + ], "description": "Get all contract subscriptions.", "responses": { "200": { @@ -49689,8 +64127,12 @@ "items": { "type": "object", "properties": { - "id": { "type": "string" }, - "chainId": { "type": "number" }, + "id": { + "type": "string" + }, + "chainId": { + "type": "number" + }, "contractAddress": { "description": "A contract or wallet address", "type": "string", @@ -49700,18 +64142,34 @@ "webhook": { "type": "object", "properties": { - "url": { "type": "string" }, + "url": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, - "secret": { "type": "string" }, - "eventType": { "type": "string" }, - "active": { "type": "boolean" }, - "createdAt": { "type": "string" }, - "id": { "type": "number" } + "secret": { + "type": "string" + }, + "eventType": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "number" + } }, "required": [ "url", @@ -49722,17 +64180,28 @@ "id" ] }, - "processEventLogs": { "type": "boolean" }, + "processEventLogs": { + "type": "boolean" + }, "filterEvents": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } + }, + "processTransactionReceipts": { + "type": "boolean" }, - "processTransactionReceipts": { "type": "boolean" }, "filterFunctions": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, - "createdAt": { "type": "string", "format": "date" } + "createdAt": { + "type": "string", + "format": "date" + } }, "required": [ "id", @@ -49747,13 +64216,17 @@ } } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": [ { "chain": "ethereum", "contractAddress": "0x....", - "webhook": { "url": "https://..." } + "webhook": { + "url": "https://..." + } } ] } @@ -49772,11 +64245,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49802,11 +64283,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49832,11 +64321,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -49858,7 +64355,9 @@ "post": { "operationId": "addContractSubscription", "summary": "Add contract subscription", - "tags": ["Contract-Subscriptions"], + "tags": [ + "Contract-Subscriptions" + ], "description": "Subscribe to event logs and transaction receipts for a contract.", "requestBody": { "content": { @@ -49888,7 +64387,9 @@ "filterEvents": { "description": "A case-sensitive list of event names to filter event logs. Parses all event logs by default.", "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "example": "Transfer" }, "processTransactionReceipts": { @@ -49898,7 +64399,9 @@ "filterFunctions": { "description": "A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default.", "type": "array", - "items": { "type": "string" }, + "items": { + "type": "string" + }, "example": "mintTo" } }, @@ -49924,8 +64427,12 @@ "result": { "type": "object", "properties": { - "id": { "type": "string" }, - "chainId": { "type": "number" }, + "id": { + "type": "string" + }, + "chainId": { + "type": "number" + }, "contractAddress": { "description": "A contract or wallet address", "type": "string", @@ -49935,18 +64442,34 @@ "webhook": { "type": "object", "properties": { - "url": { "type": "string" }, + "url": { + "type": "string" + }, "name": { "anyOf": [ - { "type": "string" }, - { "type": "null" } + { + "type": "string" + }, + { + "type": "null" + } ] }, - "secret": { "type": "string" }, - "eventType": { "type": "string" }, - "active": { "type": "boolean" }, - "createdAt": { "type": "string" }, - "id": { "type": "number" } + "secret": { + "type": "string" + }, + "eventType": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "createdAt": { + "type": "string" + }, + "id": { + "type": "number" + } }, "required": [ "url", @@ -49957,17 +64480,28 @@ "id" ] }, - "processEventLogs": { "type": "boolean" }, + "processEventLogs": { + "type": "boolean" + }, "filterEvents": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } + }, + "processTransactionReceipts": { + "type": "boolean" }, - "processTransactionReceipts": { "type": "boolean" }, "filterFunctions": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "string" + } }, - "createdAt": { "type": "string", "format": "date" } + "createdAt": { + "type": "string", + "format": "date" + } }, "required": [ "id", @@ -49981,7 +64515,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "chain": 1, @@ -50004,11 +64540,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50034,11 +64578,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50064,11 +64616,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50090,7 +64650,9 @@ "post": { "operationId": "removeContractSubscription", "summary": "Remove contract subscription", - "tags": ["Contract-Subscriptions"], + "tags": [ + "Contract-Subscriptions" + ], "description": "Remove an existing contract subscription", "requestBody": { "content": { @@ -50103,7 +64665,9 @@ "type": "string" } }, - "required": ["contractSubscriptionId"] + "required": [ + "contractSubscriptionId" + ] } } }, @@ -50119,12 +64683,24 @@ "properties": { "result": { "type": "object", - "properties": { "status": { "type": "string" } }, - "required": ["status"] + "properties": { + "status": { + "type": "string" + } + }, + "required": [ + "status" + ] } }, - "required": ["result"], - "example": { "result": { "status": "success" } } + "required": [ + "result" + ], + "example": { + "result": { + "status": "success" + } + } } } } @@ -50140,11 +64716,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50170,11 +64754,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50200,11 +64792,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50226,11 +64826,15 @@ "get": { "operationId": "getContractIndexedBlockRange", "summary": "Get subscribed contract indexed block range", - "tags": ["Contract-Subscriptions"], + "tags": [ + "Contract-Subscriptions" + ], "description": "Gets the subscribed contract's indexed block range", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "example": "80002", "in": "path", "name": "chain", @@ -50238,7 +64842,10 @@ "description": "Chain ID or name" }, { - "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "schema": { + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -50257,16 +64864,24 @@ "result": { "type": "object", "properties": { - "chain": { "type": "string" }, + "chain": { + "type": "string" + }, "contractAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "fromBlock": { "type": "number" }, - "toBlock": { "type": "number" }, - "status": { "type": "string" } + "fromBlock": { + "type": "number" + }, + "toBlock": { + "type": "number" + }, + "status": { + "type": "string" + } }, "required": [ "chain", @@ -50277,7 +64892,9 @@ ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { "result": { "chain": "ethereum", @@ -50302,11 +64919,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50332,11 +64957,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50362,11 +64995,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50388,14 +65029,22 @@ "get": { "operationId": "getLatestBlock", "summary": "Get last processed block", - "tags": ["Contract-Subscriptions"], + "tags": [ + "Contract-Subscriptions" + ], "description": "Get the last processed block for a chain.", "parameters": [ { - "schema": { "type": "string" }, + "schema": { + "type": "string" + }, "examples": { - "1": { "value": "1" }, - "ethereum": { "value": "ethereum" } + "1": { + "value": "1" + }, + "ethereum": { + "value": "ethereum" + } }, "in": "query", "name": "chain", @@ -50414,15 +65063,27 @@ "result": { "type": "object", "properties": { - "lastBlock": { "type": "number" }, - "status": { "type": "string" } + "lastBlock": { + "type": "number" + }, + "status": { + "type": "string" + } }, - "required": ["lastBlock", "status"] + "required": [ + "lastBlock", + "status" + ] } }, - "required": ["result"], + "required": [ + "result" + ], "example": { - "result": { "lastBlock": 100, "status": "success" } + "result": { + "lastBlock": 100, + "status": "success" + } } } } @@ -50439,11 +65100,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50469,11 +65138,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50499,11 +65176,19 @@ "error": { "type": "object", "properties": { - "message": { "type": "string" }, + "message": { + "type": "string" + }, "reason": {}, - "code": { "type": "string" }, - "stack": { "type": "string" }, - "statusCode": { "type": "number" } + "code": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "statusCode": { + "type": "number" + } } } } @@ -50522,5 +65207,9 @@ } } }, - "security": [{ "bearerAuth": [] }] + "security": [ + { + "bearerAuth": [] + } + ] } diff --git a/sdk/src/Engine.ts b/sdk/src/Engine.ts index 72719591c..42ec5863c 100644 --- a/sdk/src/Engine.ts +++ b/sdk/src/Engine.ts @@ -2,105 +2,111 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseHttpRequest } from './core/BaseHttpRequest'; -import type { OpenAPIConfig } from './core/OpenAPI'; -import { FetchHttpRequest } from './core/FetchHttpRequest'; +import type { BaseHttpRequest } from "./core/BaseHttpRequest"; +import type { OpenAPIConfig } from "./core/OpenAPI"; +import { FetchHttpRequest } from "./core/FetchHttpRequest"; -import { AccessTokensService } from './services/AccessTokensService'; -import { AccountService } from './services/AccountService'; -import { AccountFactoryService } from './services/AccountFactoryService'; -import { BackendWalletService } from './services/BackendWalletService'; -import { ChainService } from './services/ChainService'; -import { ConfigurationService } from './services/ConfigurationService'; -import { ContractService } from './services/ContractService'; -import { ContractEventsService } from './services/ContractEventsService'; -import { ContractMetadataService } from './services/ContractMetadataService'; -import { ContractRolesService } from './services/ContractRolesService'; -import { ContractRoyaltiesService } from './services/ContractRoyaltiesService'; -import { ContractSubscriptionsService } from './services/ContractSubscriptionsService'; -import { DefaultService } from './services/DefaultService'; -import { DeployService } from './services/DeployService'; -import { Erc1155Service } from './services/Erc1155Service'; -import { Erc20Service } from './services/Erc20Service'; -import { Erc721Service } from './services/Erc721Service'; -import { KeypairService } from './services/KeypairService'; -import { MarketplaceDirectListingsService } from './services/MarketplaceDirectListingsService'; -import { MarketplaceEnglishAuctionsService } from './services/MarketplaceEnglishAuctionsService'; -import { MarketplaceOffersService } from './services/MarketplaceOffersService'; -import { PermissionsService } from './services/PermissionsService'; -import { RelayerService } from './services/RelayerService'; -import { TransactionService } from './services/TransactionService'; -import { WebhooksService } from './services/WebhooksService'; +import { AccessTokensService } from "./services/AccessTokensService"; +import { AccountService } from "./services/AccountService"; +import { AccountFactoryService } from "./services/AccountFactoryService"; +import { BackendWalletService } from "./services/BackendWalletService"; +import { ChainService } from "./services/ChainService"; +import { ConfigurationService } from "./services/ConfigurationService"; +import { ContractService } from "./services/ContractService"; +import { ContractEventsService } from "./services/ContractEventsService"; +import { ContractMetadataService } from "./services/ContractMetadataService"; +import { ContractRolesService } from "./services/ContractRolesService"; +import { ContractRoyaltiesService } from "./services/ContractRoyaltiesService"; +import { ContractSubscriptionsService } from "./services/ContractSubscriptionsService"; +import { DefaultService } from "./services/DefaultService"; +import { DeployService } from "./services/DeployService"; +import { Erc1155Service } from "./services/Erc1155Service"; +import { Erc20Service } from "./services/Erc20Service"; +import { Erc721Service } from "./services/Erc721Service"; +import { KeypairService } from "./services/KeypairService"; +import { MarketplaceDirectListingsService } from "./services/MarketplaceDirectListingsService"; +import { MarketplaceEnglishAuctionsService } from "./services/MarketplaceEnglishAuctionsService"; +import { MarketplaceOffersService } from "./services/MarketplaceOffersService"; +import { PermissionsService } from "./services/PermissionsService"; +import { RelayerService } from "./services/RelayerService"; +import { TransactionService } from "./services/TransactionService"; +import { WebhooksService } from "./services/WebhooksService"; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class Engine { + public readonly accessTokens: AccessTokensService; + public readonly account: AccountService; + public readonly accountFactory: AccountFactoryService; + public readonly backendWallet: BackendWalletService; + public readonly chain: ChainService; + public readonly configuration: ConfigurationService; + public readonly contract: ContractService; + public readonly contractEvents: ContractEventsService; + public readonly contractMetadata: ContractMetadataService; + public readonly contractRoles: ContractRolesService; + public readonly contractRoyalties: ContractRoyaltiesService; + public readonly contractSubscriptions: ContractSubscriptionsService; + public readonly default: DefaultService; + public readonly deploy: DeployService; + public readonly erc1155: Erc1155Service; + public readonly erc20: Erc20Service; + public readonly erc721: Erc721Service; + public readonly keypair: KeypairService; + public readonly marketplaceDirectListings: MarketplaceDirectListingsService; + public readonly marketplaceEnglishAuctions: MarketplaceEnglishAuctionsService; + public readonly marketplaceOffers: MarketplaceOffersService; + public readonly permissions: PermissionsService; + public readonly relayer: RelayerService; + public readonly transaction: TransactionService; + public readonly webhooks: WebhooksService; - public readonly accessTokens: AccessTokensService; - public readonly account: AccountService; - public readonly accountFactory: AccountFactoryService; - public readonly backendWallet: BackendWalletService; - public readonly chain: ChainService; - public readonly configuration: ConfigurationService; - public readonly contract: ContractService; - public readonly contractEvents: ContractEventsService; - public readonly contractMetadata: ContractMetadataService; - public readonly contractRoles: ContractRolesService; - public readonly contractRoyalties: ContractRoyaltiesService; - public readonly contractSubscriptions: ContractSubscriptionsService; - public readonly default: DefaultService; - public readonly deploy: DeployService; - public readonly erc1155: Erc1155Service; - public readonly erc20: Erc20Service; - public readonly erc721: Erc721Service; - public readonly keypair: KeypairService; - public readonly marketplaceDirectListings: MarketplaceDirectListingsService; - public readonly marketplaceEnglishAuctions: MarketplaceEnglishAuctionsService; - public readonly marketplaceOffers: MarketplaceOffersService; - public readonly permissions: PermissionsService; - public readonly relayer: RelayerService; - public readonly transaction: TransactionService; - public readonly webhooks: WebhooksService; + public readonly request: BaseHttpRequest; - public readonly request: BaseHttpRequest; + constructor( + config?: Partial, + HttpRequest: HttpRequestConstructor = FetchHttpRequest, + ) { + this.request = new HttpRequest({ + BASE: config?.BASE ?? "", + VERSION: config?.VERSION ?? "1.0.0", + WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, + CREDENTIALS: config?.CREDENTIALS ?? "include", + TOKEN: config?.TOKEN, + USERNAME: config?.USERNAME, + PASSWORD: config?.PASSWORD, + HEADERS: config?.HEADERS, + ENCODE_PATH: config?.ENCODE_PATH, + }); - constructor(config?: Partial, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? '', - VERSION: config?.VERSION ?? '1.0.0', - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? 'include', - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); - - this.accessTokens = new AccessTokensService(this.request); - this.account = new AccountService(this.request); - this.accountFactory = new AccountFactoryService(this.request); - this.backendWallet = new BackendWalletService(this.request); - this.chain = new ChainService(this.request); - this.configuration = new ConfigurationService(this.request); - this.contract = new ContractService(this.request); - this.contractEvents = new ContractEventsService(this.request); - this.contractMetadata = new ContractMetadataService(this.request); - this.contractRoles = new ContractRolesService(this.request); - this.contractRoyalties = new ContractRoyaltiesService(this.request); - this.contractSubscriptions = new ContractSubscriptionsService(this.request); - this.default = new DefaultService(this.request); - this.deploy = new DeployService(this.request); - this.erc1155 = new Erc1155Service(this.request); - this.erc20 = new Erc20Service(this.request); - this.erc721 = new Erc721Service(this.request); - this.keypair = new KeypairService(this.request); - this.marketplaceDirectListings = new MarketplaceDirectListingsService(this.request); - this.marketplaceEnglishAuctions = new MarketplaceEnglishAuctionsService(this.request); - this.marketplaceOffers = new MarketplaceOffersService(this.request); - this.permissions = new PermissionsService(this.request); - this.relayer = new RelayerService(this.request); - this.transaction = new TransactionService(this.request); - this.webhooks = new WebhooksService(this.request); - } + this.accessTokens = new AccessTokensService(this.request); + this.account = new AccountService(this.request); + this.accountFactory = new AccountFactoryService(this.request); + this.backendWallet = new BackendWalletService(this.request); + this.chain = new ChainService(this.request); + this.configuration = new ConfigurationService(this.request); + this.contract = new ContractService(this.request); + this.contractEvents = new ContractEventsService(this.request); + this.contractMetadata = new ContractMetadataService(this.request); + this.contractRoles = new ContractRolesService(this.request); + this.contractRoyalties = new ContractRoyaltiesService(this.request); + this.contractSubscriptions = new ContractSubscriptionsService(this.request); + this.default = new DefaultService(this.request); + this.deploy = new DeployService(this.request); + this.erc1155 = new Erc1155Service(this.request); + this.erc20 = new Erc20Service(this.request); + this.erc721 = new Erc721Service(this.request); + this.keypair = new KeypairService(this.request); + this.marketplaceDirectListings = new MarketplaceDirectListingsService( + this.request, + ); + this.marketplaceEnglishAuctions = new MarketplaceEnglishAuctionsService( + this.request, + ); + this.marketplaceOffers = new MarketplaceOffersService(this.request); + this.permissions = new PermissionsService(this.request); + this.relayer = new RelayerService(this.request); + this.transaction = new TransactionService(this.request); + this.webhooks = new WebhooksService(this.request); + } } diff --git a/sdk/src/core/ApiError.ts b/sdk/src/core/ApiError.ts index d6b8fcc3a..ebc11612f 100644 --- a/sdk/src/core/ApiError.ts +++ b/sdk/src/core/ApiError.ts @@ -2,24 +2,28 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiResult } from "./ApiResult"; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super(message); - this.name = 'ApiError'; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = "ApiError"; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/sdk/src/core/ApiRequestOptions.ts b/sdk/src/core/ApiRequestOptions.ts index c19adcc94..ac9a2ca2f 100644 --- a/sdk/src/core/ApiRequestOptions.ts +++ b/sdk/src/core/ApiRequestOptions.ts @@ -3,15 +3,22 @@ /* tslint:disable */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | "GET" + | "PUT" + | "POST" + | "DELETE" + | "OPTIONS" + | "HEAD" + | "PATCH"; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/sdk/src/core/ApiResult.ts b/sdk/src/core/ApiResult.ts index ad8fef2bc..63ed6c447 100644 --- a/sdk/src/core/ApiResult.ts +++ b/sdk/src/core/ApiResult.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; }; diff --git a/sdk/src/core/BaseHttpRequest.ts b/sdk/src/core/BaseHttpRequest.ts index 8da3f4df7..f07811512 100644 --- a/sdk/src/core/BaseHttpRequest.ts +++ b/sdk/src/core/BaseHttpRequest.ts @@ -2,13 +2,12 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { CancelablePromise } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; export abstract class BaseHttpRequest { + constructor(public readonly config: OpenAPIConfig) {} - constructor(public readonly config: OpenAPIConfig) {} - - public abstract request(options: ApiRequestOptions): CancelablePromise; + public abstract request(options: ApiRequestOptions): CancelablePromise; } diff --git a/sdk/src/core/CancelablePromise.ts b/sdk/src/core/CancelablePromise.ts index 55fef8517..45ea82a09 100644 --- a/sdk/src/core/CancelablePromise.ts +++ b/sdk/src/core/CancelablePromise.ts @@ -1,131 +1,131 @@ /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ + /* eslint-disable */ export class CancelError extends Error { - - constructor(message: string) { - super(message); - this.name = 'CancelError'; - } - - public get isCancelled(): boolean { - return true; - } + constructor(message: string) { + super(message); + this.name = "CancelError"; + } + + public get isCancelled(): boolean { + return true; + } } export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - #isResolved: boolean; - #isRejected: boolean; - #isCancelled: boolean; - readonly #cancelHandlers: (() => void)[]; - readonly #promise: Promise; - #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel - ) => void - ) { - this.#isResolved = false; - this.#isRejected = false; - this.#isCancelled = false; - this.#cancelHandlers = []; - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve; - this.#reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isResolved = true; - this.#resolve?.(value); - }; - - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isRejected = true; - this.#reject?.(reason); - }; - - const onCancel = (cancelHandler: () => void): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, 'isResolved', { - get: (): boolean => this.#isResolved, - }); - - Object.defineProperty(onCancel, 'isRejected', { - get: (): boolean => this.#isRejected, - }); - - Object.defineProperty(onCancel, 'isCancelled', { - get: (): boolean => this.#isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null - ): Promise { - return this.#promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null - ): Promise { - return this.#promise.catch(onRejected); - } + #isResolved: boolean; + #isRejected: boolean; + #isCancelled: boolean; + readonly #cancelHandlers: (() => void)[]; + readonly #promise: Promise; + #resolve?: (value: T | PromiseLike) => void; + #reject?: (reason?: any) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: any) => void, + onCancel: OnCancel, + ) => void, + ) { + this.#isResolved = false; + this.#isRejected = false; + this.#isCancelled = false; + this.#cancelHandlers = []; + this.#promise = new Promise((resolve, reject) => { + this.#resolve = resolve; + this.#reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isResolved = true; + this.#resolve?.(value); + }; - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally); - } + const onReject = (reason?: any): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isRejected = true; + this.#reject?.(reason); + }; - public cancel(): void { + const onCancel = (cancelHandler: () => void): void => { if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; + return; } - this.#isCancelled = true; - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler(); - } - } catch (error) { - console.warn('Cancellation threw an error', error); - return; - } + this.#cancelHandlers.push(cancelHandler); + }; + + Object.defineProperty(onCancel, "isResolved", { + get: (): boolean => this.#isResolved, + }); + + Object.defineProperty(onCancel, "isRejected", { + get: (): boolean => this.#isRejected, + }); + + Object.defineProperty(onCancel, "isCancelled", { + get: (): boolean => this.#isCancelled, + }); + + return executor(onResolve, onReject, onCancel as OnCancel); + }); + } + + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, + ): Promise { + return this.#promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: any) => TResult | PromiseLike) | null, + ): Promise { + return this.#promise.catch(onRejected); + } + + public finally(onFinally?: (() => void) | null): Promise { + return this.#promise.finally(onFinally); + } + + public cancel(): void { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isCancelled = true; + if (this.#cancelHandlers.length) { + try { + for (const cancelHandler of this.#cancelHandlers) { + cancelHandler(); } - this.#cancelHandlers.length = 0; - this.#reject?.(new CancelError('Request aborted')); + } catch (error) { + console.warn("Cancellation threw an error", error); + return; + } } + this.#cancelHandlers.length = 0; + this.#reject?.(new CancelError("Request aborted")); + } - public get isCancelled(): boolean { - return this.#isCancelled; - } + public get isCancelled(): boolean { + return this.#isCancelled; + } } diff --git a/sdk/src/core/FetchHttpRequest.ts b/sdk/src/core/FetchHttpRequest.ts index b1083b2a3..3683c4435 100644 --- a/sdk/src/core/FetchHttpRequest.ts +++ b/sdk/src/core/FetchHttpRequest.ts @@ -2,25 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; -import { BaseHttpRequest } from './BaseHttpRequest'; -import type { CancelablePromise } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; -import { request as __request } from './request'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import { BaseHttpRequest } from "./BaseHttpRequest"; +import type { CancelablePromise } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; +import { request as __request } from "./request"; export class FetchHttpRequest extends BaseHttpRequest { + constructor(config: OpenAPIConfig) { + super(config); + } - constructor(config: OpenAPIConfig) { - super(config); - } - - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.config, options); - } + /** + * Request method + * @param options The request options from the service + * @returns CancelablePromise + * @throws ApiError + */ + public override request(options: ApiRequestOptions): CancelablePromise { + return __request(this.config, options); + } } diff --git a/sdk/src/core/OpenAPI.ts b/sdk/src/core/OpenAPI.ts index 52c1bc25b..5cc0d3708 100644 --- a/sdk/src/core/OpenAPI.ts +++ b/sdk/src/core/OpenAPI.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiRequestOptions } from "./ApiRequestOptions"; type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: 'include' | 'omit' | 'same-origin'; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | undefined; - ENCODE_PATH?: ((path: string) => string) | undefined; + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: "include" | "omit" | "same-origin"; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + HEADERS?: Headers | Resolver | undefined; + ENCODE_PATH?: ((path: string) => string) | undefined; }; export const OpenAPI: OpenAPIConfig = { - BASE: '', - VERSION: '1.0.0', - WITH_CREDENTIALS: false, - CREDENTIALS: 'include', - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, + BASE: "", + VERSION: "1.0.0", + WITH_CREDENTIALS: false, + CREDENTIALS: "include", + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, + ENCODE_PATH: undefined, }; diff --git a/sdk/src/core/request.ts b/sdk/src/core/request.ts index b018a07ca..72ed0140a 100644 --- a/sdk/src/core/request.ts +++ b/sdk/src/core/request.ts @@ -2,283 +2,310 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import { ApiError } from './ApiError'; -import type { ApiRequestOptions } from './ApiRequestOptions'; -import type { ApiResult } from './ApiResult'; -import { CancelablePromise } from './CancelablePromise'; -import type { OnCancel } from './CancelablePromise'; -import type { OpenAPIConfig } from './OpenAPI'; - -export const isDefined = (value: T | null | undefined): value is Exclude => { - return value !== undefined && value !== null; +import { ApiError } from "./ApiError"; +import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiResult } from "./ApiResult"; +import { CancelablePromise } from "./CancelablePromise"; +import type { OnCancel } from "./CancelablePromise"; +import type { OpenAPIConfig } from "./OpenAPI"; + +export const isDefined = ( + value: T | null | undefined, +): value is Exclude => { + return value !== undefined && value !== null; }; export const isString = (value: any): value is string => { - return typeof value === 'string'; + return typeof value === "string"; }; export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ''; + return isString(value) && value !== ""; }; export const isBlob = (value: any): value is Blob => { - return ( - typeof value === 'object' && - typeof value.type === 'string' && - typeof value.stream === 'function' && - typeof value.arrayBuffer === 'function' && - typeof value.constructor === 'function' && - typeof value.constructor.name === 'string' && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ); + return ( + typeof value === "object" && + typeof value.type === "string" && + typeof value.stream === "function" && + typeof value.arrayBuffer === "function" && + typeof value.constructor === "function" && + typeof value.constructor.name === "string" && + /^(Blob|File)$/.test(value.constructor.name) && + /^(Blob|File)$/.test(value[Symbol.toStringTag]) + ); }; export const isFormData = (value: any): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString('base64'); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString("base64"); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: any) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach(v => { - process(key, v); - }); - } else if (typeof value === 'object') { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } - } - }; + const process = (key: string, value: any) => { + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach((v) => { + process(key, v); + }); + } else if (typeof value === "object") { + Object.entries(value).forEach(([k, v]) => { + process(`${key}[${k}]`, v); + }); + } else { + append(key, value); + } + } + }; - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); + Object.entries(params).forEach(([key, value]) => { + process(key, value); + }); - if (qs.length > 0) { - return `?${qs.join('&')}`; - } + if (qs.length > 0) { + return `?${qs.join("&")}`; + } - return ''; + return ""; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace('{api-version}', config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace("{api-version}", config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; + const url = `${config.BASE}${path}`; + if (options.query) { + return `${url}${getQueryString(options.query)}`; + } + return url; }; -export const getFormData = (options: ApiRequestOptions): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); +export const getFormData = ( + options: ApiRequestOptions, +): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; + const process = (key: string, value: any) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach(v => process(key, v)); - } else { - process(key, value); - } - }); - - return formData; - } - return undefined; + Object.entries(options.formData) + .filter(([_, value]) => isDefined(value)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach((v) => process(key, v)); + } else { + process(key, value); + } + }); + + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { - if (typeof resolver === 'function') { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async ( + options: ApiRequestOptions, + resolver?: T | Resolver, +): Promise => { + if (typeof resolver === "function") { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { - const token = await resolve(options, config.TOKEN); - const username = await resolve(options, config.USERNAME); - const password = await resolve(options, config.PASSWORD); - const additionalHeaders = await resolve(options, config.HEADERS); - - const headers = Object.entries({ - Accept: 'application/json', - ...additionalHeaders, - ...options.headers, - }) - .filter(([_, value]) => isDefined(value)) - .reduce((headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), {} as Record); - - if (isStringWithValue(token)) { - headers['Authorization'] = `Bearer ${token}`; - } +export const getHeaders = async ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): Promise => { + const token = await resolve(options, config.TOKEN); + const username = await resolve(options, config.USERNAME); + const password = await resolve(options, config.PASSWORD); + const additionalHeaders = await resolve(options, config.HEADERS); + + const headers = Object.entries({ + Accept: "application/json", + ...additionalHeaders, + ...options.headers, + }) + .filter(([_, value]) => isDefined(value)) + .reduce( + (headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), + {} as Record, + ); - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers['Authorization'] = `Basic ${credentials}`; + if (isStringWithValue(token)) { + headers["Authorization"] = `Bearer ${token}`; + } + + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers["Authorization"] = `Basic ${credentials}`; + } + + if (options.body) { + if (options.mediaType) { + headers["Content-Type"] = options.mediaType; + } else if (isBlob(options.body)) { + headers["Content-Type"] = options.body.type || "application/octet-stream"; + } else if (isString(options.body)) { + headers["Content-Type"] = "text/plain"; + } else if (!isFormData(options.body)) { + headers["Content-Type"] = "application/json"; } + } - if (options.body) { - if (options.mediaType) { - headers['Content-Type'] = options.mediaType; - } else if (isBlob(options.body)) { - headers['Content-Type'] = options.body.type || 'application/octet-stream'; - } else if (isString(options.body)) { - headers['Content-Type'] = 'text/plain'; - } else if (!isFormData(options.body)) { - headers['Content-Type'] = 'application/json'; - } - } - - return new Headers(headers); + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body !== undefined) { - if (options.mediaType?.includes('/json')) { - return JSON.stringify(options.body) - } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { - return options.body; - } else { - return JSON.stringify(options.body); - } + if (options.body !== undefined) { + if (options.mediaType?.includes("/json")) { + return JSON.stringify(options.body); + } else if ( + isString(options.body) || + isBlob(options.body) || + isFormData(options.body) + ) { + return options.body; + } else { + return JSON.stringify(options.body); } - return undefined; + } + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel, ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - const request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + const request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; - } +export const getResponseHeader = ( + response: Response, + responseHeader?: string, +): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; } - return undefined; + } + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get('Content-Type'); - if (contentType) { - const jsonTypes = ['application/json', 'application/problem+json'] - const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type)); - if (isJSON) { - return await response.json(); - } else { - return await response.text(); - } - } - } catch (error) { - console.error(error); + if (response.status !== 204) { + try { + const contentType = response.headers.get("Content-Type"); + if (contentType) { + const jsonTypes = ["application/json", "application/problem+json"]; + const isJSON = jsonTypes.some((type) => + contentType.toLowerCase().startsWith(type), + ); + if (isJSON) { + return await response.json(); + } else { + return await response.text(); } + } + } catch (error) { + console.error(error); } - return undefined; + } + return undefined; }; -export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { - const errors: Record = { - 400: 'Bad Request', - 401: 'Unauthorized', - 403: 'Forbidden', - 404: 'Not Found', - 500: 'Internal Server Error', - 502: 'Bad Gateway', - 503: 'Service Unavailable', - ...options.errors, - } - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? 'unknown'; - const errorStatusText = result.statusText ?? 'unknown'; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError(options, result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` - ); - } +export const catchErrorCodes = ( + options: ApiRequestOptions, + result: ApiResult, +): void => { + const errors: Record = { + 400: "Bad Request", + 401: "Unauthorized", + 403: "Forbidden", + 404: "Not Found", + 500: "Internal Server Error", + 502: "Bad Gateway", + 503: "Service Unavailable", + ...options.errors, + }; + + const error = errors[result.status]; + if (error) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + const errorStatus = result.status ?? "unknown"; + const errorStatusText = result.statusText ?? "unknown"; + const errorBody = (() => { + try { + return JSON.stringify(result.body, null, 2); + } catch (e) { + return undefined; + } + })(); + + throw new ApiError( + options, + result, + `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, + ); + } }; /** @@ -288,33 +315,47 @@ export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): * @returns CancelablePromise * @throws ApiError */ -export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - const response = await sendRequest(config, options, url, body, formData, headers, onCancel); - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader(response, options.responseHeader); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); +export const request = ( + config: OpenAPIConfig, + options: ApiRequestOptions, +): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + const response = await sendRequest( + config, + options, + url, + body, + formData, + headers, + onCancel, + ); + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader( + response, + options.responseHeader, + ); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/sdk/src/index.ts b/sdk/src/index.ts index bb6705eab..13c025fc8 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -2,36 +2,36 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { Engine } from './Engine'; +export { Engine } from "./Engine"; -export { ApiError } from './core/ApiError'; -export { BaseHttpRequest } from './core/BaseHttpRequest'; -export { CancelablePromise, CancelError } from './core/CancelablePromise'; -export { OpenAPI } from './core/OpenAPI'; -export type { OpenAPIConfig } from './core/OpenAPI'; +export { ApiError } from "./core/ApiError"; +export { BaseHttpRequest } from "./core/BaseHttpRequest"; +export { CancelablePromise, CancelError } from "./core/CancelablePromise"; +export { OpenAPI } from "./core/OpenAPI"; +export type { OpenAPIConfig } from "./core/OpenAPI"; -export { AccessTokensService } from './services/AccessTokensService'; -export { AccountService } from './services/AccountService'; -export { AccountFactoryService } from './services/AccountFactoryService'; -export { BackendWalletService } from './services/BackendWalletService'; -export { ChainService } from './services/ChainService'; -export { ConfigurationService } from './services/ConfigurationService'; -export { ContractService } from './services/ContractService'; -export { ContractEventsService } from './services/ContractEventsService'; -export { ContractMetadataService } from './services/ContractMetadataService'; -export { ContractRolesService } from './services/ContractRolesService'; -export { ContractRoyaltiesService } from './services/ContractRoyaltiesService'; -export { ContractSubscriptionsService } from './services/ContractSubscriptionsService'; -export { DefaultService } from './services/DefaultService'; -export { DeployService } from './services/DeployService'; -export { Erc1155Service } from './services/Erc1155Service'; -export { Erc20Service } from './services/Erc20Service'; -export { Erc721Service } from './services/Erc721Service'; -export { KeypairService } from './services/KeypairService'; -export { MarketplaceDirectListingsService } from './services/MarketplaceDirectListingsService'; -export { MarketplaceEnglishAuctionsService } from './services/MarketplaceEnglishAuctionsService'; -export { MarketplaceOffersService } from './services/MarketplaceOffersService'; -export { PermissionsService } from './services/PermissionsService'; -export { RelayerService } from './services/RelayerService'; -export { TransactionService } from './services/TransactionService'; -export { WebhooksService } from './services/WebhooksService'; +export { AccessTokensService } from "./services/AccessTokensService"; +export { AccountService } from "./services/AccountService"; +export { AccountFactoryService } from "./services/AccountFactoryService"; +export { BackendWalletService } from "./services/BackendWalletService"; +export { ChainService } from "./services/ChainService"; +export { ConfigurationService } from "./services/ConfigurationService"; +export { ContractService } from "./services/ContractService"; +export { ContractEventsService } from "./services/ContractEventsService"; +export { ContractMetadataService } from "./services/ContractMetadataService"; +export { ContractRolesService } from "./services/ContractRolesService"; +export { ContractRoyaltiesService } from "./services/ContractRoyaltiesService"; +export { ContractSubscriptionsService } from "./services/ContractSubscriptionsService"; +export { DefaultService } from "./services/DefaultService"; +export { DeployService } from "./services/DeployService"; +export { Erc1155Service } from "./services/Erc1155Service"; +export { Erc20Service } from "./services/Erc20Service"; +export { Erc721Service } from "./services/Erc721Service"; +export { KeypairService } from "./services/KeypairService"; +export { MarketplaceDirectListingsService } from "./services/MarketplaceDirectListingsService"; +export { MarketplaceEnglishAuctionsService } from "./services/MarketplaceEnglishAuctionsService"; +export { MarketplaceOffersService } from "./services/MarketplaceOffersService"; +export { PermissionsService } from "./services/PermissionsService"; +export { RelayerService } from "./services/RelayerService"; +export { TransactionService } from "./services/TransactionService"; +export { WebhooksService } from "./services/WebhooksService"; diff --git a/sdk/src/services/AccessTokensService.ts b/sdk/src/services/AccessTokensService.ts index e01ce2764..595acb586 100644 --- a/sdk/src/services/AccessTokensService.ts +++ b/sdk/src/services/AccessTokensService.ts @@ -2,138 +2,128 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class AccessTokensService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all access tokens + * Get all access tokens + * @returns any Default Response + * @throws ApiError + */ + public listAccessTokens(): CancelablePromise<{ + result: Array<{ + id: string; + tokenMask: string; + /** + * A contract or wallet address + */ + walletAddress: string; + createdAt: string; + expiresAt: string; + label: string | null; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/auth/access-tokens/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all access tokens - * Get all access tokens - * @returns any Default Response - * @throws ApiError - */ - public listAccessTokens(): CancelablePromise<{ -result: Array<{ -id: string; -tokenMask: string; -/** - * A contract or wallet address - */ -walletAddress: string; -createdAt: string; -expiresAt: string; -label: (string | null); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/auth/access-tokens/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create a new access token + * Create a new access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public createAccessToken(requestBody?: { + label?: string; + }): CancelablePromise<{ + result: { + id: string; + tokenMask: string; + /** + * A contract or wallet address + */ + walletAddress: string; + createdAt: string; + expiresAt: string; + label: string | null; + accessToken: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/access-tokens/create", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create a new access token - * Create a new access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public createAccessToken( -requestBody?: { -label?: string; -}, -): CancelablePromise<{ -result: { -id: string; -tokenMask: string; -/** - * A contract or wallet address - */ -walletAddress: string; -createdAt: string; -expiresAt: string; -label: (string | null); -accessToken: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/access-tokens/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke an access token - * Revoke an access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeAccessTokens( -requestBody: { -id: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/access-tokens/revoke', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update an access token - * Update an access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateAccessTokens( -requestBody: { -id: string; -label?: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/access-tokens/update', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke an access token + * Revoke an access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeAccessTokens(requestBody: { id: string }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/access-tokens/revoke", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update an access token + * Update an access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateAccessTokens(requestBody: { + id: string; + label?: string; + }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/access-tokens/update", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/AccountFactoryService.ts b/sdk/src/services/AccountFactoryService.ts index 2787e8d5d..624621317 100644 --- a/sdk/src/services/AccountFactoryService.ts +++ b/sdk/src/services/AccountFactoryService.ts @@ -2,252 +2,256 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class AccountFactoryService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get all smart accounts - * Get all the smart accounts for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAllAccounts( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The account addresses of all the accounts in this factory - */ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account-factory/get-all-accounts', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + /** + * Get all smart accounts + * Get all the smart accounts for this account factory. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAllAccounts( + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Get associated smart accounts - * Get all the smart accounts for this account factory associated with the specific admin wallet. - * @param signerAddress The address of the signer to get associated accounts from - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * The account addresses of all the accounts in this factory */ - public getAssociatedAccounts( -signerAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The account addresses of all the accounts with a specific signer in this factory - */ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'signerAddress': signerAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account-factory/get-all-accounts", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get associated smart accounts + * Get all the smart accounts for this account factory associated with the specific admin wallet. + * @param signerAddress The address of the signer to get associated accounts from + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAssociatedAccounts( + signerAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Check if deployed - * Check if a smart account has been deployed to the blockchain. - * @param adminAddress The address of the admin to check if the account address is deployed - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param extraData Extra data to use in predicting the account address - * @returns any Default Response - * @throws ApiError + * The account addresses of all the accounts with a specific signer in this factory */ - public isAccountDeployed( -adminAddress: string, -chain: string, -contractAddress: string, -extraData?: string, -): CancelablePromise<{ -/** - * Whether or not the account has been deployed - */ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account-factory/is-account-deployed', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'adminAddress': adminAddress, - 'extraData': extraData, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + signerAddress: signerAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Check if deployed + * Check if a smart account has been deployed to the blockchain. + * @param adminAddress The address of the admin to check if the account address is deployed + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param extraData Extra data to use in predicting the account address + * @returns any Default Response + * @throws ApiError + */ + public isAccountDeployed( + adminAddress: string, + chain: string, + contractAddress: string, + extraData?: string, + ): CancelablePromise<{ /** - * Predict smart account address - * Get the counterfactual address of a smart account. - * @param adminAddress The address of the admin to predict the account address for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param extraData Extra data (account salt) to add to use in predicting the account address - * @returns any Default Response - * @throws ApiError + * Whether or not the account has been deployed */ - public predictAccountAddress( -adminAddress: string, -chain: string, -contractAddress: string, -extraData?: string, -): CancelablePromise<{ -/** - * New account counter-factual address. - */ -result: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account-factory/predict-account-address', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'adminAddress': adminAddress, - 'extraData': extraData, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account-factory/is-account-deployed", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + adminAddress: adminAddress, + extraData: extraData, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Predict smart account address + * Get the counterfactual address of a smart account. + * @param adminAddress The address of the admin to predict the account address for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param extraData Extra data (account salt) to add to use in predicting the account address + * @returns any Default Response + * @throws ApiError + */ + public predictAccountAddress( + adminAddress: string, + chain: string, + contractAddress: string, + extraData?: string, + ): CancelablePromise<{ /** - * Create smart account - * Create a smart account for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError + * New account counter-factual address. */ - public createAccount( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The admin address to create an account for - */ -adminAddress: string; -/** - * Extra data to add to use in creating the account address - */ -extraData?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account-factory/create-account', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account-factory/predict-account-address", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + adminAddress: adminAddress, + extraData: extraData, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Create smart account + * Create a smart account for this account factory. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public createAccount( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The admin address to create an account for + */ + adminAddress: string; + /** + * Extra data to add to use in creating the account address + */ + extraData?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account-factory/create-account", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 6369ba214..3cc2d8b3b 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -2,524 +2,552 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class AccountService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - + /** + * Get all admins + * Get all admins for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAllAdmins( + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Get all admins - * Get all admins for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * The address of the admins on this account */ - public getAllAdmins( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The address of the admins on this account - */ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account/admins/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account/admins/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all session keys - * Get all session keys for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAllSessions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -signerAddress: string; -startDate: string; -expirationDate: string; -nativeTokenLimitPerTransaction: string; -approvedCallTargets: Array; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/account/sessions/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all session keys + * Get all session keys for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAllSessions( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + signerAddress: string; + startDate: string; + expirationDate: string; + nativeTokenLimitPerTransaction: string; + approvedCallTargets: Array; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/account/sessions/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Grant admin - * Grant a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public grantAccountAdmin( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to grant admin permissions to - */ -signerAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account/admins/grant', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke admin - * Revoke a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeAccountAdmin( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to revoke admin permissions from - */ -walletAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account/admins/revoke', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Grant admin + * Grant a smart account's admin permission. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public grantAccountAdmin( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to grant admin permissions to + */ + signerAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account/admins/grant", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create session key - * Create a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public grantAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -signerAddress: string; -startDate: string; -expirationDate: string; -nativeTokenLimitPerTransaction: string; -approvedCallTargets: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account/sessions/create', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke admin + * Revoke a smart account's admin permission. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeAccountAdmin( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to revoke admin permissions from + */ + walletAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account/admins/revoke", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke session key - * Revoke a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to revoke session from - */ -walletAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account/sessions/revoke', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create session key + * Create a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public grantAccountSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + signerAddress: string; + startDate: string; + expirationDate: string; + nativeTokenLimitPerTransaction: string; + approvedCallTargets: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account/sessions/create", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update session key - * Update a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public updateAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -signerAddress: string; -approvedCallTargets: Array; -startDate?: string; -expirationDate?: string; -nativeTokenLimitPerTransaction?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/account/sessions/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke session key + * Revoke a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeAccountSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to revoke session from + */ + walletAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account/sessions/revoke", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update session key + * Update a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public updateAccountSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + signerAddress: string; + approvedCallTargets: Array; + startDate?: string; + expirationDate?: string; + nativeTokenLimitPerTransaction?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/account/sessions/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/BackendWalletService.ts b/sdk/src/services/BackendWalletService.ts index 1ccad8f2d..e8d0a049c 100644 --- a/sdk/src/services/BackendWalletService.ts +++ b/sdk/src/services/BackendWalletService.ts @@ -2,1041 +2,1079 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class BackendWalletService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - + /** + * Create backend wallet + * Create a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public create(requestBody?: { + label?: string; /** - * Create backend wallet - * Create a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default + * wallet type will be used. */ - public create( -requestBody?: { -label?: string; -/** - * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. - */ -type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -}, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + type?: + | "local" + | "aws-kms" + | "gcp-kms" + | "smart:aws-kms" + | "smart:gcp-kms" + | "smart:local"; + }): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + type: + | "local" + | "aws-kms" + | "gcp-kms" + | "smart:aws-kms" + | "smart:gcp-kms" + | "smart:local"; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/create", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove backend wallet - * Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are transferred out before removing a local wallet. - * @param walletAddress A contract or wallet address - * @returns any Default Response - * @throws ApiError - */ - public removeBackendWallet( -walletAddress: string, -): CancelablePromise<{ -result: { -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/backend-wallet/{walletAddress}', - path: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Remove backend wallet + * Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are + * transferred out before removing a local wallet. + * @param walletAddress A contract or wallet address + * @returns any Default Response + * @throws ApiError + */ + public removeBackendWallet(walletAddress: string): CancelablePromise<{ + result: { + status: string; + }; + }> { + return this.httpRequest.request({ + method: "DELETE", + url: "/backend-wallet/{walletAddress}", + path: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Import backend wallet - * Import an existing wallet as a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public import( -requestBody?: ({ -/** - * Optional label for the imported wallet - */ -label?: string; -} & ({ -/** - * AWS KMS key ARN - */ -awsKmsArn: string; -/** - * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). - */ -credentials?: { -/** - * AWS Access Key ID - */ -awsAccessKeyId: string; -/** - * AWS Secret Access Key - */ -awsSecretAccessKey: string; -}; -} | { -/** - * GCP KMS key ID - */ -gcpKmsKeyId: string; -/** - * GCP KMS key version ID - */ -gcpKmsKeyVersionId: string; -/** - * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). - */ -credentials?: { -/** - * GCP service account email - */ -email: string; -/** - * GCP service account private key - */ -privateKey: string; -}; -} | { -/** - * The private key of the wallet to import - */ -privateKey: string; -} | { -/** - * The mnemonic phrase of the wallet to import - */ -mnemonic: string; -} | { -/** - * The encrypted JSON of the wallet to import - */ -encryptedJson: string; -/** - * The password used to encrypt the encrypted JSON - */ -password: string; -})), -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/import', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Import backend wallet + * Import an existing wallet as a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public import( + requestBody?: { + /** + * Optional label for the imported wallet + */ + label?: string; + } & ( + | { + /** + * AWS KMS key ARN + */ + awsKmsArn: string; + /** + * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be + * used (if available). + */ + credentials?: { + /** + * AWS Access Key ID + */ + awsAccessKeyId: string; + /** + * AWS Secret Access Key + */ + awsSecretAccessKey: string; + }; + } + | { + /** + * GCP KMS key ID + */ + gcpKmsKeyId: string; + /** + * GCP KMS key version ID + */ + gcpKmsKeyVersionId: string; + /** + * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be + * used (if available). + */ + credentials?: { + /** + * GCP service account email + */ + email: string; + /** + * GCP service account private key + */ + privateKey: string; + }; + } + | { + /** + * The private key of the wallet to import + */ + privateKey: string; + } + | { + /** + * The mnemonic phrase of the wallet to import + */ + mnemonic: string; + } + | { + /** + * The encrypted JSON of the wallet to import + */ + encryptedJson: string; + /** + * The password used to encrypt the encrypted JSON + */ + password: string; + } + ), + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/import", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update backend wallet + * Update a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public update(requestBody: { /** - * Update backend wallet - * Update a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError + * A contract or wallet address */ - public update( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -label?: string; -}, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/update', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + walletAddress: string; + label?: string; + }): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/update", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get balance - * Get the native balance for a backend wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @returns any Default Response - * @throws ApiError - */ - public getBalance( -chain: string, -walletAddress: string, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/backend-wallet/{chain}/{walletAddress}/get-balance', - path: { - 'chain': chain, - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get balance + * Get the native balance for a backend wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @returns any Default Response + * @throws ApiError + */ + public getBalance( + chain: string, + walletAddress: string, + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/backend-wallet/{chain}/{walletAddress}/get-balance", + path: { + chain: chain, + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all backend wallets - * Get all backend wallets. - * @param page The page of wallets to get. - * @param limit The number of wallets to get per page. - * @returns any Default Response - * @throws ApiError - */ - public getAll( -page: number = 1, -limit: number = 10, -): CancelablePromise<{ -result: Array<{ -/** - * Wallet Address - */ -address: string; -/** - * Wallet Type - */ -type: string; -label: (string | null); -awsKmsKeyId: (string | null); -awsKmsArn: (string | null); -gcpKmsKeyId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyVersionId: (string | null); -gcpKmsResourcePath: (string | null); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/backend-wallet/get-all', - query: { - 'page': page, - 'limit': limit, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all backend wallets + * Get all backend wallets. + * @param page The page of wallets to get. + * @param limit The number of wallets to get per page. + * @returns any Default Response + * @throws ApiError + */ + public getAll( + page: number = 1, + limit: number = 10, + ): CancelablePromise<{ + result: Array<{ + /** + * Wallet Address + */ + address: string; + /** + * Wallet Type + */ + type: string; + label: string | null; + awsKmsKeyId: string | null; + awsKmsArn: string | null; + gcpKmsKeyId: string | null; + gcpKmsKeyRingId: string | null; + gcpKmsLocationId: string | null; + gcpKmsKeyVersionId: string | null; + gcpKmsResourcePath: string | null; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/backend-wallet/get-all", + query: { + page: page, + limit: limit, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens - * Transfer native currency or ERC20 tokens to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public transfer( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient wallet address. - */ -to: string; -/** - * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). - */ -currencyAddress?: string; -/** - * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/{chain}/transfer', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Withdraw funds - * Withdraw all funds from this wallet to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public withdraw( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to withdraw all funds to - */ -toAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -/** - * An amount in native token (decimals allowed). Example: "0.1" - */ -amount: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/{chain}/withdraw', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens + * Transfer native currency or ERC20 tokens to another wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public transfer( + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient wallet address. + */ + to: string; + /** + * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). + */ + currencyAddress?: string; + /** + * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/{chain}/transfer", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a transaction - * Send a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public sendTransaction( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -toAddress?: string; -data: string; -value: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/{chain}/send-transaction', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Withdraw funds + * Withdraw all funds from this wallet to another wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public withdraw( + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to withdraw all funds to + */ + toAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + /** + * An amount in native token (decimals allowed). Example: "0.1" + */ + amount: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/{chain}/withdraw", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a batch of raw transactions - * Send a batch of raw transactions with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public sendTransactionBatch( -chain: string, -xBackendWalletAddress: string, -xIdempotencyKey?: string, -requestBody?: Array<{ -/** - * A contract or wallet address - */ -toAddress?: string; -data: string; -value: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}>, -): CancelablePromise<{ -result: { -queueIds: Array; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/{chain}/send-transaction-batch', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a transaction + * Send a transaction with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public sendTransaction( + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + toAddress?: string; + data: string; + value: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/{chain}/send-transaction", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign a transaction - * Sign a transaction - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signTransaction( -xBackendWalletAddress: string, -requestBody: { -transaction: { -to?: string; -nonce?: string; -gasLimit?: string; -gasPrice?: string; -data?: string; -value?: string; -chainId?: number; -type?: number; -accessList?: any; -maxFeePerGas?: string; -maxPriorityFeePerGas?: string; -ccipReadEnabled?: boolean; -}; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/sign-transaction', - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a batch of raw transactions + * Send a batch of raw transactions with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public sendTransactionBatch( + chain: string, + xBackendWalletAddress: string, + xIdempotencyKey?: string, + requestBody?: Array<{ + /** + * A contract or wallet address + */ + toAddress?: string; + data: string; + value: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }>, + ): CancelablePromise<{ + result: { + queueIds: Array; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/{chain}/send-transaction-batch", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign a message - * Send a message - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signMessage( -xBackendWalletAddress: string, -requestBody: { -message: string; -isBytes?: boolean; -chainId?: number; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/sign-message', - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign a transaction + * Sign a transaction + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signTransaction( + xBackendWalletAddress: string, + requestBody: { + transaction: { + to?: string; + nonce?: string; + gasLimit?: string; + gasPrice?: string; + data?: string; + value?: string; + chainId?: number; + type?: number; + accessList?: any; + maxFeePerGas?: string; + maxPriorityFeePerGas?: string; + ccipReadEnabled?: boolean; + }; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/sign-transaction", + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign an EIP-712 message - * Send an EIP-712 message ("typed data") - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signTypedData( -xBackendWalletAddress: string, -requestBody: { -domain: Record; -types: Record; -value: Record; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/sign-typed-data', - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign a message + * Send a message + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signMessage( + xBackendWalletAddress: string, + requestBody: { + message: string; + isBytes?: boolean; + chainId?: number; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/sign-message", + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get recent transactions - * Get recent transactions for this backend wallet. - * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @param page Specify the page number. - * @param limit Specify the number of results to return per page. - * @returns any Default Response - * @throws ApiError - */ - public getTransactionsForBackendWallet( -status: ('queued' | 'mined' | 'cancelled' | 'errored'), -chain: string, -walletAddress: string, -page: number = 1, -limit: number = 100, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/backend-wallet/{chain}/{walletAddress}/get-all-transactions', - path: { - 'chain': chain, - 'walletAddress': walletAddress, - }, - query: { - 'page': page, - 'limit': limit, - 'status': status, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign an EIP-712 message + * Send an EIP-712 message ("typed data") + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signTypedData( + xBackendWalletAddress: string, + requestBody: { + domain: Record; + types: Record; + value: Record; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/sign-typed-data", + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get recent transactions by nonce - * Get recent transactions for this backend wallet, sorted by descending nonce. - * @param fromNonce The earliest nonce, inclusive. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. - * @returns any Default Response - * @throws ApiError - */ - public getTransactionsForBackendWalletByNonce( -fromNonce: number, -chain: string, -walletAddress: string, -toNonce?: number, -): CancelablePromise<{ -result: Array<{ -nonce: number; -transaction: ({ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -} | string); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce', - path: { - 'chain': chain, - 'walletAddress': walletAddress, - }, - query: { - 'fromNonce': fromNonce, - 'toNonce': toNonce, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get recent transactions + * Get recent transactions for this backend wallet. + * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @param page Specify the page number. + * @param limit Specify the number of results to return per page. + * @returns any Default Response + * @throws ApiError + */ + public getTransactionsForBackendWallet( + status: "queued" | "mined" | "cancelled" | "errored", + chain: string, + walletAddress: string, + page: number = 1, + limit: number = 100, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: string | null; + /** + * The current state of the transaction. + */ + status: "queued" | "sent" | "mined" | "errored" | "cancelled"; + chainId: string | null; + fromAddress: string | null; + toAddress: string | null; + data: string | null; + extension: string | null; + value: string | null; + nonce: number | string | null; + gasLimit: string | null; + gasPrice: string | null; + maxFeePerGas: string | null; + maxPriorityFeePerGas: string | null; + transactionType: number | null; + transactionHash: string | null; + queuedAt: string | null; + sentAt: string | null; + minedAt: string | null; + cancelledAt: string | null; + deployedContractAddress: string | null; + deployedContractType: string | null; + errorMessage: string | null; + sentAtBlockNumber: number | null; + blockNumber: number | null; + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: boolean | null; + retryMaxFeePerGas: string | null; + retryMaxPriorityFeePerGas: string | null; + signerAddress: string | null; + accountAddress: string | null; + accountSalt: string | null; + accountFactoryAddress: string | null; + target: string | null; + sender: string | null; + initCode: string | null; + callData: string | null; + callGasLimit: string | null; + verificationGasLimit: string | null; + preVerificationGas: string | null; + paymasterAndData: string | null; + userOpHash: string | null; + functionName: string | null; + functionArgs: string | null; + onChainTxStatus: number | null; + onchainStatus: "success" | "reverted" | null; + effectiveGasPrice: string | null; + cumulativeGasUsed: string | null; + }>; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/backend-wallet/{chain}/{walletAddress}/get-all-transactions", + path: { + chain: chain, + walletAddress: walletAddress, + }, + query: { + page: page, + limit: limit, + status: status, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Reset nonces - * Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens. - * @returns any Default Response - * @throws ApiError - */ - public resetNonces(): CancelablePromise<{ -result: { -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/reset-nonces', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get recent transactions by nonce + * Get recent transactions for this backend wallet, sorted by descending nonce. + * @param fromNonce The earliest nonce, inclusive. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. + * @returns any Default Response + * @throws ApiError + */ + public getTransactionsForBackendWalletByNonce( + fromNonce: number, + chain: string, + walletAddress: string, + toNonce?: number, + ): CancelablePromise<{ + result: Array<{ + nonce: number; + transaction: + | { + queueId: string | null; + /** + * The current state of the transaction. + */ + status: "queued" | "sent" | "mined" | "errored" | "cancelled"; + chainId: string | null; + fromAddress: string | null; + toAddress: string | null; + data: string | null; + extension: string | null; + value: string | null; + nonce: number | string | null; + gasLimit: string | null; + gasPrice: string | null; + maxFeePerGas: string | null; + maxPriorityFeePerGas: string | null; + transactionType: number | null; + transactionHash: string | null; + queuedAt: string | null; + sentAt: string | null; + minedAt: string | null; + cancelledAt: string | null; + deployedContractAddress: string | null; + deployedContractType: string | null; + errorMessage: string | null; + sentAtBlockNumber: number | null; + blockNumber: number | null; + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: boolean | null; + retryMaxFeePerGas: string | null; + retryMaxPriorityFeePerGas: string | null; + signerAddress: string | null; + accountAddress: string | null; + accountSalt: string | null; + accountFactoryAddress: string | null; + target: string | null; + sender: string | null; + initCode: string | null; + callData: string | null; + callGasLimit: string | null; + verificationGasLimit: string | null; + preVerificationGas: string | null; + paymasterAndData: string | null; + userOpHash: string | null; + functionName: string | null; + functionArgs: string | null; + onChainTxStatus: number | null; + onchainStatus: "success" | "reverted" | null; + effectiveGasPrice: string | null; + cumulativeGasUsed: string | null; + } + | string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce", + path: { + chain: chain, + walletAddress: walletAddress, + }, + query: { + fromNonce: fromNonce, + toNonce: toNonce, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get nonce - * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @returns any Default Response - * @throws ApiError - */ - public getNonce( -chain: string, -walletAddress: string, -): CancelablePromise<{ -result: { -nonce: number; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/backend-wallet/{chain}/{walletAddress}/get-nonce', - path: { - 'chain': chain, - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Reset nonces + * Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens. + * @returns any Default Response + * @throws ApiError + */ + public resetNonces(): CancelablePromise<{ + result: { + status: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/reset-nonces", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Simulate a transaction - * Simulate a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public simulateTransaction( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The contract address - */ -toAddress: string; -/** - * The amount of native currency in wei - */ -value?: string; -/** - * The function to call on the contract - */ -functionName?: string; -/** - * The arguments to call for this function - */ -args?: Array<(string | number | boolean)>; -/** - * Raw calldata - */ -data?: string; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Simulation Success - */ -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/backend-wallet/{chain}/simulate-transaction', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get nonce + * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. + * Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @returns any Default Response + * @throws ApiError + */ + public getNonce( + chain: string, + walletAddress: string, + ): CancelablePromise<{ + result: { + nonce: number; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/backend-wallet/{chain}/{walletAddress}/get-nonce", + path: { + chain: chain, + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Simulate a transaction + * Simulate a transaction with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public simulateTransaction( + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The contract address + */ + toAddress: string; + /** + * The amount of native currency in wei + */ + value?: string; + /** + * The function to call on the contract + */ + functionName?: string; + /** + * The arguments to call for this function + */ + args?: Array; + /** + * Raw calldata + */ + data?: string; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Simulation Success + */ + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/backend-wallet/{chain}/simulate-transaction", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index df7913cd6..70ff60b95 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -2,137 +2,133 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ChainService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get chain details - * Get details about a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @returns any Default Response - * @throws ApiError - */ - public getChain( -chain: string, -): CancelablePromise<{ -result: { -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/chain/get', - query: { - 'chain': chain, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get all chain details - * Get details about all supported chains. - * @returns any Default Response - * @throws ApiError - */ - public listChains(): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/chain/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get chain details + * Get details about a chain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @returns any Default Response + * @throws ApiError + */ + public getChain(chain: string): CancelablePromise<{ + result: { + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/chain/get", + query: { + chain: chain, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get all chain details + * Get details about all supported chains. + * @returns any Default Response + * @throws ApiError + */ + public listChains(): CancelablePromise<{ + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/chain/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ConfigurationService.ts b/sdk/src/services/ConfigurationService.ts index 01e611807..89b586528 100644 --- a/sdk/src/services/ConfigurationService.ts +++ b/sdk/src/services/ConfigurationService.ts @@ -2,696 +2,690 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ConfigurationService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get wallets configuration + * Get wallets configuration + * @returns any Default Response + * @throws ApiError + */ + public getWalletsConfiguration(): CancelablePromise<{ + result: { + type: + | "local" + | "aws-kms" + | "gcp-kms" + | "smart:aws-kms" + | "smart:gcp-kms" + | "smart:local"; + awsAccessKeyId: string | null; + awsRegion: string | null; + gcpApplicationProjectId: string | null; + gcpKmsLocationId: string | null; + gcpKmsKeyRingId: string | null; + gcpApplicationCredentialEmail: string | null; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/wallets", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get wallets configuration - * Get wallets configuration - * @returns any Default Response - * @throws ApiError - */ - public getWalletsConfiguration(): CancelablePromise<{ -result: { -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -awsAccessKeyId: (string | null); -awsRegion: (string | null); -gcpApplicationProjectId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpApplicationCredentialEmail: (string | null); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/wallets', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update wallets configuration + * Update wallets configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateWalletsConfiguration( + requestBody?: + | { + awsAccessKeyId: string; + awsSecretAccessKey: string; + awsRegion: string; + } + | { + gcpApplicationProjectId: string; + gcpKmsLocationId: string; + gcpKmsKeyRingId: string; + gcpApplicationCredentialEmail: string; + gcpApplicationCredentialPrivateKey: string; + }, + ): CancelablePromise<{ + result: { + type: + | "local" + | "aws-kms" + | "gcp-kms" + | "smart:aws-kms" + | "smart:gcp-kms" + | "smart:local"; + awsAccessKeyId: string | null; + awsRegion: string | null; + gcpApplicationProjectId: string | null; + gcpKmsLocationId: string | null; + gcpKmsKeyRingId: string | null; + gcpApplicationCredentialEmail: string | null; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/wallets", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update wallets configuration - * Update wallets configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateWalletsConfiguration( -requestBody?: ({ -awsAccessKeyId: string; -awsSecretAccessKey: string; -awsRegion: string; -} | { -gcpApplicationProjectId: string; -gcpKmsLocationId: string; -gcpKmsKeyRingId: string; -gcpApplicationCredentialEmail: string; -gcpApplicationCredentialPrivateKey: string; -}), -): CancelablePromise<{ -result: { -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -awsAccessKeyId: (string | null); -awsRegion: (string | null); -gcpApplicationProjectId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpApplicationCredentialEmail: (string | null); -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/wallets', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get chain overrides configuration + * Get chain overrides configuration + * @returns any Default Response + * @throws ApiError + */ + public getChainsConfiguration(): CancelablePromise<{ + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/chains", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get chain overrides configuration - * Get chain overrides configuration - * @returns any Default Response - * @throws ApiError - */ - public getChainsConfiguration(): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/chains', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update chain overrides configuration + * Update chain overrides configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateChainsConfiguration(requestBody: { + chainOverrides: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }): CancelablePromise<{ + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/chains", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update chain overrides configuration - * Update chain overrides configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateChainsConfiguration( -requestBody: { -chainOverrides: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}, -): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/chains', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction processing configuration + * Get transactions processing configuration + * @returns any Default Response + * @throws ApiError + */ + public getTransactionConfiguration(): CancelablePromise<{ + result: { + minTxsToProcess: number; + maxTxsToProcess: number; + minedTxListenerCronSchedule: string | null; + maxTxsToUpdate: number; + retryTxListenerCronSchedule: string | null; + minEllapsedBlocksBeforeRetry: number; + maxFeePerGasForRetries: string; + maxPriorityFeePerGasForRetries: string; + maxRetriesPerTx: number; + clearCacheCronSchedule: string | null; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/transactions", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction processing configuration - * Get transactions processing configuration - * @returns any Default Response - * @throws ApiError - */ - public getTransactionConfiguration(): CancelablePromise<{ -result: { -minTxsToProcess: number; -maxTxsToProcess: number; -minedTxListenerCronSchedule: (string | null); -maxTxsToUpdate: number; -retryTxListenerCronSchedule: (string | null); -minEllapsedBlocksBeforeRetry: number; -maxFeePerGasForRetries: string; -maxPriorityFeePerGasForRetries: string; -maxRetriesPerTx: number; -clearCacheCronSchedule: (string | null); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/transactions', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update transaction processing configuration - * Update transaction processing configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateTransactionConfiguration( -requestBody?: { -maxTxsToProcess?: number; -maxTxsToUpdate?: number; -minedTxListenerCronSchedule?: (string | null); -retryTxListenerCronSchedule?: (string | null); -minEllapsedBlocksBeforeRetry?: number; -maxFeePerGasForRetries?: string; -maxRetriesPerTx?: number; -}, -): CancelablePromise<{ -result: { -minTxsToProcess: number; -maxTxsToProcess: number; -minedTxListenerCronSchedule: (string | null); -maxTxsToUpdate: number; -retryTxListenerCronSchedule: (string | null); -minEllapsedBlocksBeforeRetry: number; -maxFeePerGasForRetries: string; -maxPriorityFeePerGasForRetries: string; -maxRetriesPerTx: number; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/transactions', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update transaction processing configuration + * Update transaction processing configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateTransactionConfiguration(requestBody?: { + maxTxsToProcess?: number; + maxTxsToUpdate?: number; + minedTxListenerCronSchedule?: string | null; + retryTxListenerCronSchedule?: string | null; + minEllapsedBlocksBeforeRetry?: number; + maxFeePerGasForRetries?: string; + maxRetriesPerTx?: number; + }): CancelablePromise<{ + result: { + minTxsToProcess: number; + maxTxsToProcess: number; + minedTxListenerCronSchedule: string | null; + maxTxsToUpdate: number; + retryTxListenerCronSchedule: string | null; + minEllapsedBlocksBeforeRetry: number; + maxFeePerGasForRetries: string; + maxPriorityFeePerGasForRetries: string; + maxRetriesPerTx: number; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/transactions", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get auth configuration - * Get auth configuration - * @returns any Default Response - * @throws ApiError - */ - public getAuthConfiguration(): CancelablePromise<{ -result: { -domain: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/auth', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get auth configuration + * Get auth configuration + * @returns any Default Response + * @throws ApiError + */ + public getAuthConfiguration(): CancelablePromise<{ + result: { + domain: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/auth", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update auth configuration - * Update auth configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateAuthConfiguration( -requestBody: { -domain: string; -}, -): CancelablePromise<{ -result: { -domain: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/auth', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update auth configuration + * Update auth configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateAuthConfiguration(requestBody: { + domain: string; + }): CancelablePromise<{ + result: { + domain: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/auth", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get wallet-balance configuration - * Get wallet-balance configuration - * @returns any Default Response - * @throws ApiError - */ - public getBackendWalletBalanceConfiguration(): CancelablePromise<{ -result: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/backend-wallet-balance', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallet-balance configuration + * Get wallet-balance configuration + * @returns any Default Response + * @throws ApiError + */ + public getBackendWalletBalanceConfiguration(): CancelablePromise<{ + result: { + /** + * Minimum wallet balance in wei + */ + minWalletBalance: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/backend-wallet-balance", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update backend wallet balance configuration + * Update backend wallet balance configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateBackendWalletBalanceConfiguration(requestBody?: { /** - * Update backend wallet balance configuration - * Update backend wallet balance configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Minimum wallet balance in wei */ - public updateBackendWalletBalanceConfiguration( -requestBody?: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance?: string; -}, -): CancelablePromise<{ -result: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/backend-wallet-balance', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + minWalletBalance?: string; + }): CancelablePromise<{ + result: { + /** + * Minimum wallet balance in wei + */ + minWalletBalance: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/backend-wallet-balance", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get CORS configuration - * Get CORS configuration - * @returns any Default Response - * @throws ApiError - */ - public getCorsConfiguration(): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/cors', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get CORS configuration + * Get CORS configuration + * @returns any Default Response + * @throws ApiError + */ + public getCorsConfiguration(): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/cors", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Add a CORS URL - * Add a URL to allow client-side calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public addUrlToCorsConfiguration( -requestBody: { -urlsToAdd: Array; -}, -): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/cors', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Add a CORS URL + * Add a URL to allow client-side calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public addUrlToCorsConfiguration(requestBody: { + urlsToAdd: Array; + }): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/cors", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove CORS URLs - * Remove URLs from CORS configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public removeUrlToCorsConfiguration( -requestBody: { -urlsToRemove: Array; -}, -): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'DELETE', - url: '/configuration/cors', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Remove CORS URLs + * Remove URLs from CORS configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public removeUrlToCorsConfiguration(requestBody: { + urlsToRemove: Array; + }): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "DELETE", + url: "/configuration/cors", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set CORS URLs - * Replaces the CORS URLs to allow client-side calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public setUrlsToCorsConfiguration( -requestBody: { -urls: Array; -}, -): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'PUT', - url: '/configuration/cors', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set CORS URLs + * Replaces the CORS URLs to allow client-side calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public setUrlsToCorsConfiguration(requestBody: { + urls: Array; + }): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "PUT", + url: "/configuration/cors", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get cache configuration - * Get cache configuration - * @returns any Default Response - * @throws ApiError - */ - public getCacheConfiguration(): CancelablePromise<{ -result: { -clearCacheCronSchedule: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/cache', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get cache configuration + * Get cache configuration + * @returns any Default Response + * @throws ApiError + */ + public getCacheConfiguration(): CancelablePromise<{ + result: { + clearCacheCronSchedule: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/cache", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update cache configuration + * Update cache configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateCacheConfiguration(requestBody: { /** - * Update cache configuration - * Update cache configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is + * minutes and hh is hours. Seconds should not be '*' or less than 10 */ - public updateCacheConfiguration( -requestBody: { -/** - * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 - */ -clearCacheCronSchedule: string; -}, -): CancelablePromise<{ -result: { -clearCacheCronSchedule: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/cache', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + clearCacheCronSchedule: string; + }): CancelablePromise<{ + result: { + clearCacheCronSchedule: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/cache", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get Contract Subscriptions configuration - * Get the configuration for Contract Subscriptions - * @returns any Default Response - * @throws ApiError - */ - public getContractSubscriptionsConfiguration(): CancelablePromise<{ -result: { -maxBlocksToIndex: number; -contractSubscriptionsRequeryDelaySeconds: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/contract-subscriptions', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get Contract Subscriptions configuration + * Get the configuration for Contract Subscriptions + * @returns any Default Response + * @throws ApiError + */ + public getContractSubscriptionsConfiguration(): CancelablePromise<{ + result: { + maxBlocksToIndex: number; + contractSubscriptionsRequeryDelaySeconds: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/contract-subscriptions", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update Contract Subscriptions configuration + * Update the configuration for Contract Subscriptions + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateContractSubscriptionsConfiguration(requestBody?: { + maxBlocksToIndex?: number; /** - * Update Contract Subscriptions configuration - * Update the configuration for Contract Subscriptions - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after + * 2s and 10s. */ - public updateContractSubscriptionsConfiguration( -requestBody?: { -maxBlocksToIndex?: number; -/** - * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after 2s and 10s. - */ -contractSubscriptionsRequeryDelaySeconds?: string; -}, -): CancelablePromise<{ -result: { -maxBlocksToIndex: number; -contractSubscriptionsRequeryDelaySeconds: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/configuration/contract-subscriptions', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + contractSubscriptionsRequeryDelaySeconds?: string; + }): CancelablePromise<{ + result: { + maxBlocksToIndex: number; + contractSubscriptionsRequeryDelaySeconds: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/configuration/contract-subscriptions", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get Allowed IP Addresses - * Get the list of allowed IP addresses - * @returns any Default Response - * @throws ApiError - */ - public getIpAllowlist(): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/configuration/ip-allowlist', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get Allowed IP Addresses + * Get the list of allowed IP addresses + * @returns any Default Response + * @throws ApiError + */ + public getIpAllowlist(): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/configuration/ip-allowlist", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Set IP Allowlist + * Replaces the IP Allowlist array to allow calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public setIpAllowlist(requestBody: { /** - * Set IP Allowlist - * Replaces the IP Allowlist array to allow calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Array of IP addresses to allowlist */ - public setIpAllowlist( -requestBody: { -/** - * Array of IP addresses to allowlist - */ -ips: Array; -}, -): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'PUT', - url: '/configuration/ip-allowlist', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + ips: Array; + }): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "PUT", + url: "/configuration/ip-allowlist", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ContractEventsService.ts b/sdk/src/services/ContractEventsService.ts index 1cc310498..8e75af83e 100644 --- a/sdk/src/services/ContractEventsService.ts +++ b/sdk/src/services/ContractEventsService.ts @@ -2,90 +2,88 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ContractEventsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Get all events - * Get a list of all blockchain events for this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param fromBlock - * @param toBlock - * @param order - * @returns any Default Response - * @throws ApiError - */ - public getAllEvents( -chain: string, -contractAddress: string, -fromBlock?: (number | string), -toBlock?: (number | string), -order?: ('asc' | 'desc'), -): CancelablePromise<{ -result: Array>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/events/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'fromBlock': fromBlock, - 'toBlock': toBlock, - 'order': order, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get events - * Get a list of specific blockchain events emitted from this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks - * @returns any Default Response - * @throws ApiError - */ - public getEvents( -chain: string, -contractAddress: string, -requestBody: { -eventName: string; -fromBlock?: (number | string); -toBlock?: (number | string); -order?: ('asc' | 'desc'); -filters?: any; -}, -): CancelablePromise<{ -result: Array>; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/events/get', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all events + * Get a list of all blockchain events for this contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param fromBlock + * @param toBlock + * @param order + * @returns any Default Response + * @throws ApiError + */ + public getAllEvents( + chain: string, + contractAddress: string, + fromBlock?: number | string, + toBlock?: number | string, + order?: "asc" | "desc", + ): CancelablePromise<{ + result: Array>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/events/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + fromBlock: fromBlock, + toBlock: toBlock, + order: order, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get events + * Get a list of specific blockchain events emitted from this contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks + * @returns any Default Response + * @throws ApiError + */ + public getEvents( + chain: string, + contractAddress: string, + requestBody: { + eventName: string; + fromBlock?: number | string; + toBlock?: number | string; + order?: "asc" | "desc"; + filters?: any; + }, + ): CancelablePromise<{ + result: Array>; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/events/get", + path: { + chain: chain, + contractAddress: contractAddress, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index b0d7df83c..9c520d82d 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -2,208 +2,206 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ContractMetadataService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get ABI + * Get the ABI of a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAbi( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + type: string; + name?: string; + inputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + stateMutability?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/metadata/abi", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get ABI - * Get the ABI of a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAbi( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -type: string; -name?: string; -inputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -stateMutability?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/metadata/abi', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get events - * Get details of all events implemented by a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getContractEvents( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -name: string; -inputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -comment?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/metadata/events', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get extensions - * Get all detected extensions for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getExtensions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * Array of detected extension names - */ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/metadata/extensions', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get events + * Get details of all events implemented by a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getContractEvents( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + name: string; + inputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + comment?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/metadata/events", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get extensions + * Get all detected extensions for a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getExtensions( + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Get functions - * Get details of all functions implemented by the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * Array of detected extension names */ - public getFunctions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -name: string; -inputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -comment?: string; -signature: string; -stateMutability: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/metadata/functions', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/metadata/extensions", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get functions + * Get details of all functions implemented by the contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getFunctions( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + name: string; + inputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + comment?: string; + signature: string; + stateMutability: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/metadata/functions", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index 186047017..571ba2b5c 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -1,267 +1,277 @@ /* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; export class ContractRolesService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get wallets for role + * Get all wallets with a specific role for a contract. + * @param role The role to list wallet members + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getContractRole( + role: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/roles/get", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + role: role, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get wallets for role - * Get all wallets with a specific role for a contract. - * @param role The role to list wallet members - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getContractRole( -role: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/roles/get', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'role': role, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallets for all roles + * Get all wallets in each role for a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public listContractRoles( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + admin: Array; + transfer: Array; + minter: Array; + pauser: Array; + lister: Array; + asset: Array; + unwrap: Array; + factory: Array; + signer: Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/roles/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get wallets for all roles - * Get all wallets in each role for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public listContractRoles( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -admin: Array; -transfer: Array; -minter: Array; -pauser: Array; -lister: Array; -asset: Array; -unwrap: Array; -factory: Array; -signer: Array; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/roles/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Grant role - * Grant a role to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public grantContractRole( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The role to grant - */ -role: string; -/** - * The address to grant the role to - */ -address: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/roles/grant', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke role - * Revoke a role from a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeContractRole( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The role to revoke - */ -role: string; -/** - * The address to revoke the role from - */ -address: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/roles/revoke', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Grant role + * Grant a role to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public grantContractRole( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The role to grant + */ + role: string; + /** + * The address to grant the role to + */ + address: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/roles/grant", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Revoke role + * Revoke a role from a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeContractRole( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The role to revoke + */ + role: string; + /** + * The address to revoke the role from + */ + address: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/roles/revoke", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ContractRoyaltiesService.ts b/sdk/src/services/ContractRoyaltiesService.ts index e7f8ec92f..be9a39c53 100644 --- a/sdk/src/services/ContractRoyaltiesService.ts +++ b/sdk/src/services/ContractRoyaltiesService.ts @@ -2,276 +2,286 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ContractRoyaltiesService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get royalty details + * Gets the royalty recipient and BPS (basis points) of the smart contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDefaultRoyaltyInfo( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get royalty details - * Gets the royalty recipient and BPS (basis points) of the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDefaultRoyaltyInfo( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token royalty details + * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. + * @param tokenId + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getTokenRoyaltyInfo( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}", + path: { + tokenId: tokenId, + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token royalty details - * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. - * @param tokenId - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getTokenRoyaltyInfo( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}', - path: { - 'tokenId': tokenId, - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Set royalty details - * Set the royalty recipient and fee for the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public setDefaultRoyaltyInfo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Set token royalty details - * Set the royalty recipient and fee for a particular token in the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public setTokenRoyaltyInfo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -/** - * The token ID to set the royalty info for. - */ -token_id: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set royalty details + * Set the royalty recipient and fee for the smart contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public setDefaultRoyaltyInfo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Set token royalty details + * Set the royalty recipient and fee for a particular token in the contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public setTokenRoyaltyInfo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + /** + * The token ID to set the royalty info for. + */ + token_id: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/ContractService.ts b/sdk/src/services/ContractService.ts index da8876320..1b6a37a11 100644 --- a/sdk/src/services/ContractService.ts +++ b/sdk/src/services/ContractService.ts @@ -2,161 +2,167 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ContractService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} - - /** - * Read from contract - * Call a read function on a contract. - * @param functionName Name of the function to call on Contract - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param args Arguments for the function. Comma Separated - * @returns any Default Response - * @throws ApiError - */ - public read( -functionName: string, -chain: string, -contractAddress: string, -args?: string, -): CancelablePromise<{ -result: any; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/read', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'functionName': functionName, - 'args': args, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Write to contract - * Call a write function on a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public write( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The function to call on the contract. It is highly recommended to provide a full function signature, such as "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. - */ -functionName: string; -/** - * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects - */ -args: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -abi?: Array<{ -type: string; -name?: string; -inputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -stateMutability?: string; -}>; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/write', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - }); - } + /** + * Read from contract + * Call a read function on a contract. + * @param functionName Name of the function to call on Contract + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param args Arguments for the function. Comma Separated + * @returns any Default Response + * @throws ApiError + */ + public read( + functionName: string, + chain: string, + contractAddress: string, + args?: string, + ): CancelablePromise<{ + result: any; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/read", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + functionName: functionName, + args: args, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Write to contract + * Call a write function on a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public write( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The function to call on the contract. It is highly recommended to provide a full function signature, such as + * "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. + */ + functionName: string; + /** + * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: + * BigNumber, bigint, Date objects + */ + args: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + abi?: Array<{ + type: string; + name?: string; + inputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + stateMutability?: string; + }>; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/write", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + }); + } } diff --git a/sdk/src/services/ContractSubscriptionsService.ts b/sdk/src/services/ContractSubscriptionsService.ts index 93120f56d..fa8bd43c4 100644 --- a/sdk/src/services/ContractSubscriptionsService.ts +++ b/sdk/src/services/ContractSubscriptionsService.ts @@ -2,229 +2,222 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ContractSubscriptionsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get contract subscriptions + * Get all contract subscriptions. + * @returns any Default Response + * @throws ApiError + */ + public getContractSubscriptions(): CancelablePromise<{ + result: Array<{ + id: string; + chainId: number; + /** + * A contract or wallet address + */ + contractAddress: string; + webhook?: { + id: number; + url: string; + name: string | null; + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + }; + processEventLogs: boolean; + filterEvents: Array; + processTransactionReceipts: boolean; + filterFunctions: Array; + createdAt: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract-subscriptions/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Add contract subscription + * Subscribe to event logs and transaction receipts for a contract. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public addContractSubscription(requestBody: { /** - * Get contract subscriptions - * Get all contract subscriptions. - * @returns any Default Response - * @throws ApiError + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. */ - public getContractSubscriptions(): CancelablePromise<{ -result: Array<{ -id: string; -chainId: number; -/** - * A contract or wallet address - */ -contractAddress: string; -webhook?: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -processEventLogs: boolean; -filterEvents: Array; -processTransactionReceipts: boolean; -filterFunctions: Array; -createdAt: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract-subscriptions/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + chain: string; /** - * Add contract subscription - * Subscribe to event logs and transaction receipts for a contract. - * @param requestBody - * @returns any Default Response - * @throws ApiError + * The address for the contract. */ - public addContractSubscription( -requestBody: { -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * The address for the contract. - */ -contractAddress: string; -/** - * Webhook URL - */ -webhookUrl?: string; -/** - * If true, parse event logs for this contract. - */ -processEventLogs: boolean; -/** - * A case-sensitive list of event names to filter event logs. Parses all event logs by default. - */ -filterEvents?: Array; -/** - * If true, parse transaction receipts for this contract. - */ -processTransactionReceipts: boolean; -/** - * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. - */ -filterFunctions?: Array; -}, -): CancelablePromise<{ -result: { -id: string; -chainId: number; -/** - * A contract or wallet address - */ -contractAddress: string; -webhook?: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -processEventLogs: boolean; -filterEvents: Array; -processTransactionReceipts: boolean; -filterFunctions: Array; -createdAt: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract-subscriptions/add', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + contractAddress: string; /** - * Remove contract subscription - * Remove an existing contract subscription - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Webhook URL */ - public removeContractSubscription( -requestBody: { -/** - * The ID for an existing contract subscription. - */ -contractSubscriptionId: string; -}, -): CancelablePromise<{ -result: { -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract-subscriptions/remove', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + webhookUrl?: string; + /** + * If true, parse event logs for this contract. + */ + processEventLogs: boolean; /** - * Get subscribed contract indexed block range - * Gets the subscribed contract's indexed block range - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * A case-sensitive list of event names to filter event logs. Parses all event logs by default. */ - public getContractIndexedBlockRange( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * A contract or wallet address - */ -contractAddress: string; -fromBlock: number; -toBlock: number; -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + filterEvents?: Array; + /** + * If true, parse transaction receipts for this contract. + */ + processTransactionReceipts: boolean; + /** + * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by + * default. + */ + filterFunctions?: Array; + }): CancelablePromise<{ + result: { + id: string; + chainId: number; + /** + * A contract or wallet address + */ + contractAddress: string; + webhook?: { + id: number; + url: string; + name: string | null; + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + }; + processEventLogs: boolean; + filterEvents: Array; + processTransactionReceipts: boolean; + filterFunctions: Array; + createdAt: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract-subscriptions/add", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Remove contract subscription + * Remove an existing contract subscription + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public removeContractSubscription(requestBody: { /** - * Get last processed block - * Get the last processed block for a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @returns any Default Response - * @throws ApiError + * The ID for an existing contract subscription. */ - public getLatestBlock( -chain: string, -): CancelablePromise<{ -result: { -lastBlock: number; -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract-subscriptions/last-block', - query: { - 'chain': chain, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + contractSubscriptionId: string; + }): CancelablePromise<{ + result: { + status: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract-subscriptions/remove", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get subscribed contract indexed block range + * Gets the subscribed contract's indexed block range + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getContractIndexedBlockRange( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ + chain: string; + /** + * A contract or wallet address + */ + contractAddress: string; + fromBlock: number; + toBlock: number; + status: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get last processed block + * Get the last processed block for a chain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @returns any Default Response + * @throws ApiError + */ + public getLatestBlock(chain: string): CancelablePromise<{ + result: { + lastBlock: number; + status: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract-subscriptions/last-block", + query: { + chain: chain, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/DefaultService.ts b/sdk/src/services/DefaultService.ts index 54389d7a7..1fa92e628 100644 --- a/sdk/src/services/DefaultService.ts +++ b/sdk/src/services/DefaultService.ts @@ -2,44 +2,42 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class DefaultService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson(): CancelablePromise { + return this.httpRequest.request({ + method: "GET", + url: "/json", + }); + } - /** - * @returns any Default Response - * @throws ApiError - */ - public getJson(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/json', - }); - } - - /** - * @returns any Default Response - * @throws ApiError - */ - public getOpenapiJson(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/openapi.json', - }); - } - - /** - * @returns any Default Response - * @throws ApiError - */ - public getJson1(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/json/', - }); - } + /** + * @returns any Default Response + * @throws ApiError + */ + public getOpenapiJson(): CancelablePromise { + return this.httpRequest.request({ + method: "GET", + url: "/openapi.json", + }); + } + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson1(): CancelablePromise { + return this.httpRequest.request({ + method: "GET", + url: "/json/", + }); + } } diff --git a/sdk/src/services/DeployService.ts b/sdk/src/services/DeployService.ts index f343f5a31..f59a4e073 100644 --- a/sdk/src/services/DeployService.ts +++ b/sdk/src/services/DeployService.ts @@ -2,1346 +2,1409 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class DeployService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Deploy Edition + * Deploy an Edition contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployEdition( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/edition", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Edition - * Deploy an Edition contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployEdition( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/edition', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Deploy Edition Drop - * Deploy an Edition Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployEditionDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/edition-drop', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Deploy Marketplace - * Deploy a Marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployMarketplaceV3( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/marketplace-v3', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Edition Drop + * Deploy an Edition Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployEditionDrop( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/edition-drop", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Multiwrap - * Deploy a Multiwrap contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployMultiwrap( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/multiwrap', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Marketplace + * Deploy a Marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployMarketplaceV3( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/marketplace-v3", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy NFT Collection - * Deploy an NFT Collection contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployNftCollection( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/nft-collection', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Multiwrap + * Deploy a Multiwrap contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployMultiwrap( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/multiwrap", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy NFT Drop - * Deploy an NFT Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployNftDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/nft-drop', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy NFT Collection + * Deploy an NFT Collection contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployNftCollection( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/nft-collection", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Pack - * Deploy a Pack contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployPack( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/pack', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy NFT Drop + * Deploy an NFT Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployNftDrop( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/nft-drop", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Signature Drop - * Deploy a Signature Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deploySignatureDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/signature-drop', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Pack + * Deploy a Pack contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployPack( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/pack", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Split - * Deploy a Split contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deploySplit( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -recipients: Array<{ -/** - * A contract or wallet address - */ -address: string; -sharesBps: number; -}>; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/split', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Signature Drop + * Deploy a Signature Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deploySignatureDrop( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/signature-drop", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Token - * Deploy a Token contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployToken( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/token', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Split + * Deploy a Split contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deploySplit( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + recipients: Array<{ + /** + * A contract or wallet address + */ + address: string; + sharesBps: number; + }>; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/split", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Token Drop - * Deploy a Token Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployTokenDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/token-drop', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Token + * Deploy a Token contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployToken( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/token", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Vote - * Deploy a Vote contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployVote( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -voting_delay_in_blocks: number; -voting_period_in_blocks: number; -/** - * A contract or wallet address - */ -voting_token_address: string; -voting_quorum_fraction: number; -proposal_token_threshold: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/prebuilts/vote', - path: { - 'chain': chain, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Token Drop + * Deploy a Token Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployTokenDrop( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/token-drop", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy published contract - * Deploy a published contract to the blockchain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param publisher Address or ENS of the publisher of the contract - * @param contractName Name of the published contract to deploy - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public deployPublished( -chain: string, -publisher: string, -contractName: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -/** - * Constructor arguments for the deployment. - */ -constructorParams: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -queueId?: string; -/** - * Not all contracts return a deployed address. - */ -deployedAddress?: string; -message?: string; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/deploy/{chain}/{publisher}/{contractName}', - path: { - 'chain': chain, - 'publisher': publisher, - 'contractName': contractName, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Vote + * Deploy a Vote contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployVote( + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + voting_delay_in_blocks: number; + voting_period_in_blocks: number; + /** + * A contract or wallet address + */ + voting_token_address: string; + voting_quorum_fraction: number; + proposal_token_threshold: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/prebuilts/vote", + path: { + chain: chain, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Deploy published contract + * Deploy a published contract to the blockchain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param publisher Address or ENS of the publisher of the contract + * @param contractName Name of the published contract to deploy + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public deployPublished( + chain: string, + publisher: string, + contractName: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: "zksolc"; + compilerVersion?: string; + evmVersion?: string; + }; + /** + * Constructor arguments for the deployment. + */ + constructorParams: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + queueId?: string; /** - * Get contract types - * Get all prebuilt contract types. - * @returns any Default Response - * @throws ApiError + * Not all contracts return a deployed address. */ - public contractTypes(): CancelablePromise<{ -result: Array; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/deploy/contract-types', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + deployedAddress?: string; + message?: string; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/deploy/{chain}/{publisher}/{contractName}", + path: { + chain: chain, + publisher: publisher, + contractName: contractName, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get contract types + * Get all prebuilt contract types. + * @returns any Default Response + * @throws ApiError + */ + public contractTypes(): CancelablePromise<{ + result: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/deploy/contract-types", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index bb7c7f54e..e3b7e6591 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -2,2535 +2,2690 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class Erc1155Service { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get details + * Get the details for a token in an ERC-1155 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155Get( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/get", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get details - * Get the details for a token in an ERC-1155 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155Get( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/get', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all details + * Get details for all tokens in an ERC-1155 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param start The start token ID for paginated results. Defaults to 0. + * @param count The page count for paginated results. Defaults to 100. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetAll( + chain: string, + contractAddress: string, + start?: number, + count?: number, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + start: start, + count: count, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all details - * Get details for all tokens in an ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param start The start token ID for paginated results. Defaults to 0. - * @param count The page count for paginated results. Defaults to 100. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetAll( -chain: string, -contractAddress: string, -start?: number, -count?: number, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'start': start, - 'count': count, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get owned tokens + * Get all tokens in an ERC-1155 contract owned by a specific wallet. + * @param walletAddress Address of the wallet to get NFTs for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetOwned( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/get-owned", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get owned tokens - * Get all tokens in an ERC-1155 contract owned by a specific wallet. - * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetOwned( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/get-owned', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get balance + * Get the balance of a specific wallet address for this ERC-1155 contract. + * @param walletAddress Address of the wallet to check NFT balance + * @param tokenId The tokenId of the NFT to check balance of + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155BalanceOf( + walletAddress: string, + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/balance-of", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get balance - * Get the balance of a specific wallet address for this ERC-1155 contract. - * @param walletAddress Address of the wallet to check NFT balance - * @param tokenId The tokenId of the NFT to check balance of - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155BalanceOf( -walletAddress: string, -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/balance-of', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if approved transfers + * Check if the specific wallet has approved transfers from a specific operator wallet. + * @param ownerWallet Address of the wallet who owns the NFT + * @param operator Address of the operator to check approval on + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155IsApproved( + ownerWallet: string, + operator: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/is-approved", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + ownerWallet: ownerWallet, + operator: operator, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if approved transfers - * Check if the specific wallet has approved transfers from a specific operator wallet. - * @param ownerWallet Address of the wallet who owns the NFT - * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155IsApproved( -ownerWallet: string, -operator: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/is-approved', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'ownerWallet': ownerWallet, - 'operator': operator, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-1155 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155TotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/total-count", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155TotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/total-count', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-1155 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155TotalSupply( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/total-supply", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-1155 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155TotalSupply( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/total-supply', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is + * typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc1155SignatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: + | { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address + * of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps?: number; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults + * to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: string | number; + mintEndTime?: string | number; + } + | ({ + contractType?: "TokenERC1155" | "SignatureMintERC1155"; + to: string; + quantity: string; + royaltyRecipient?: string; + royaltyBps?: number; + primarySaleRecipient?: string; + /** + * An amount in native token (decimals allowed). Example: "0.1" + */ + pricePerToken?: string; + /** + * An amount in wei (no decimals). Example: "50000000000" + */ + pricePerTokenWei?: string; + currency?: string; + validityStartTimestamp: number; + validityEndTimestamp?: number; + uid?: string; + } & ( + | { + metadata: + | { + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + } + | string; + } + | { + tokenId: string; + } + )), + ): CancelablePromise<{ + result: + | { + payload: { + uri: string; + tokenId: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient + * address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } + | { + payload: { + to: string; + royaltyRecipient: string; + royaltyBps: string; + primarySaleRecipient: string; + tokenId: string; + uri: string; + quantity: string; + pricePerToken: string; + currency: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/signature/generate", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + "x-thirdweb-sdk-version": xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc1155SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps?: number; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | ({ -contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); -to: string; -quantity: string; -royaltyRecipient?: string; -royaltyBps?: number; -primarySaleRecipient?: string; -/** - * An amount in native token (decimals allowed). Example: "0.1" - */ -pricePerToken?: string; -/** - * An amount in wei (no decimals). Example: "50000000000" - */ -pricePerTokenWei?: string; -currency?: string; -validityStartTimestamp: number; -validityEndTimestamp?: number; -uid?: string; -} & ({ -metadata: ({ -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -} | string); -} | { -tokenId: string; -}))), -): CancelablePromise<{ -result: ({ -payload: { -uri: string; -tokenId: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -to: string; -royaltyRecipient: string; -royaltyBps: string; -primarySaleRecipient: string; -tokenId: string; -uri: string; -quantity: string; -pricePerToken: string; -currency: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/signature/generate', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - 'x-thirdweb-sdk-version': xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can + * claim. + * @param quantity The amount of tokens to claim. + * @param tokenId The token ID of the NFT you want to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active + * claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc1155CanClaim( + quantity: string, + tokenId: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + quantity: quantity, + tokenId: tokenId, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. - * @param quantity The amount of tokens to claim. - * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc1155CanClaim( -quantity: string, -tokenId: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'quantity': quantity, - 'tokenId': tokenId, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get currently active claim phase for a specific token ID. + * Retrieve the currently active claim phase for a specific token ID, if any. + * @param tokenId The token ID of the NFT you want to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetActiveClaimConditions( + tokenId: string | number, + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get currently active claim phase for a specific token ID. - * Retrieve the currently active claim phase for a specific token ID, if any. - * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetActiveClaimConditions( -tokenId: (string | number), -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured for a specific token ID. + * Get all the claim phases configured for a specific token ID. + * @param tokenId The token ID of the NFT you want to get the claim conditions for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetAllClaimConditions( + tokenId: string | number, + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured for a specific token ID. - * Get all the claim phases configured for a specific token ID. - * @param tokenId The token ID of the NFT you want to get the claim conditions for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetAllClaimConditions( -tokenId: (string | number), -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for + * the given wallet address. + * @param tokenId The token ID of the NFT you want to get the claimer proofs for. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetClaimerProofs( + tokenId: string | number, + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. - * @param tokenId The token ID of the NFT you want to get the claimer proofs for. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetClaimerProofs( -tokenId: (string | number), -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetClaimIneligibilityReasons( + tokenId: string | number, + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array< + | string + | ( + | "There is not enough supply to claim." + | "This address is not on the allowlist." + | "Not enough time since last claim transaction. Please wait." + | "Claim phase has not started yet." + | "You have already claimed the token." + | "Incorrect price or currency." + | "Cannot claim more than maximum allowed quantity." + | "There are not enough tokens in the wallet to pay for the claim." + | "There is no active claim phase at the moment. Please check back in later." + | "There is no claim condition set." + | "No wallet connected." + | "No claim conditions found." + ) + >; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + quantity: quantity, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetClaimIneligibilityReasons( -tokenId: (string | number), -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - 'quantity': quantity, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Airdrop tokens + * Airdrop ERC-1155 tokens to specific wallets. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Airdrop( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID of the NFT to airdrop + */ + tokenId: string; + /** + * Addresses and quantities to airdrop to + */ + addresses: Array<{ + /** + * A contract or wallet address + */ + address: string; + quantity: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/airdrop", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Airdrop tokens - * Airdrop ERC-1155 tokens to specific wallets. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Airdrop( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID of the NFT to airdrop - */ -tokenId: string; -/** - * Addresses and quantities to airdrop to - */ -addresses: Array<{ -/** - * A contract or wallet address - */ -address: string; -quantity: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/airdrop', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-1155 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The token ID to burn + */ + tokenId: string; + /** + * The amount of tokens to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/burn", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The token ID to burn - */ -tokenId: string; -/** - * The amount of tokens to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/burn', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn tokens (batch) + * Burn a batch of ERC-1155 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155BurnBatch( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + tokenIds: Array; + amounts: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/burn-batch", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn tokens (batch) - * Burn a batch of ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155BurnBatch( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -tokenIds: Array; -amounts: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/burn-batch', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155ClaimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to claim the NFT to + */ + receiver: string; + /** + * Token ID of the NFT to claim + */ + tokenId: string; + /** + * Quantity of NFTs to mint + */ + quantity: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to claim the NFT to - */ -receiver: string; -/** - * Token ID of the NFT to claim - */ -tokenId: string; -/** - * Quantity of NFTs to mint - */ -quantity: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Lazy mint + * Lazy mint ERC-1155 tokens to be claimed in the future. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155LazyMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + metadatas: Array< + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string + >; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/lazy-mint", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Lazy mint - * Lazy mint ERC-1155 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155LazyMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/lazy-mint', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint additional supply + * Mint additional supply of ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintAdditionalSupplyTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + /** + * Token ID to mint additional supply to + */ + tokenId: string; + /** + * The amount of supply to mint + */ + additionalSupply: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint additional supply - * Mint additional supply of ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintAdditionalSupplyTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -/** - * Token ID to mint additional supply to - */ -tokenId: string; -/** - * The amount of supply to mint - */ -additionalSupply: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-1155 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadataWithSupply: Array<{ + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + supply: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/mint-batch-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-1155 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadataWithSupply: Array<{ -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -supply: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/mint-batch-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadataWithSupply: { + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + supply: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/mint-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadataWithSupply: { -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -supply: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/mint-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for all + * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for + * any token owned by the caller. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SetApprovalForAll( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * whether to approve or revoke approval + */ + approved: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for all - * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SetApprovalForAll( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * whether to approve or revoke approval - */ -approved: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token + * Transfer an ERC-1155 token from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + /** + * A valid hex string + */ + data?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/transfer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token - * Transfer an ERC-1155 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -/** - * A valid hex string - */ -data?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/transfer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155TransferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + from: string; + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + /** + * A valid hex string + */ + data?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/transfer-from", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -from: string; -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -/** - * A valid hex string - */ -data?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/transfer-from', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-1155 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SignatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: { + uri: string; + tokenId: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient + * address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/signature/mint", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-1155 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: { -uri: string; -tokenId: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/signature/mint', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for a specific token ID.. + * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default + * being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SetClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * ID of the token to set the claim conditions for + */ + tokenId: string | number; + claimConditionInputs: Array<{ + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for a specific token ID.. - * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * ID of the token to set the claim conditions for - */ -tokenId: (string | number); -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for a specific token ID.. + * Allows you to set claim conditions for multiple token IDs in a single transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155ClaimConditionsUpdate( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionsForToken: Array<{ + /** + * ID of the token to set the claim conditions for + */ + tokenId: string | number; + claimConditions: Array<{ + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }>; + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for a specific token ID.. - * Allows you to set claim conditions for multiple token IDs in a single transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155ClaimConditionsUpdate( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionsForToken: Array<{ -/** - * ID of the token to set the claim conditions for - */ -tokenId: (string | number); -claimConditions: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update a single claim phase. - * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update claim phase for - */ -tokenId: (string | number); -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update token metadata - * Update the metadata for an ERC1155 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155UpdateTokenMetadata( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update metadata - */ -tokenId: string; -metadata: { -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc1155/token/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update a single claim phase. + * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase + * configuration. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155UpdateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update claim phase for + */ + tokenId: string | number; + claimConditionInput: { + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update token metadata + * Update the metadata for an ERC1155 token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155UpdateTokenMetadata( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update metadata + */ + tokenId: string; + metadata: { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc1155/token/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index 743d72f2b..5164ee2bf 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -2,1623 +2,1731 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class Erc20Service { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get token allowance + * Get the allowance of a specific wallet for an ERC-20 contract. + * @param ownerWallet Address of the wallet who owns the funds + * @param spenderWallet Address of the wallet to check token allowance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20AllowanceOf( + ownerWallet: string, + spenderWallet: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/allowance-of", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + ownerWallet: ownerWallet, + spenderWallet: spenderWallet, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token allowance - * Get the allowance of a specific wallet for an ERC-20 contract. - * @param ownerWallet Address of the wallet who owns the funds - * @param spenderWallet Address of the wallet to check token allowance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20AllowanceOf( -ownerWallet: string, -spenderWallet: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/allowance-of', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'ownerWallet': ownerWallet, - 'spenderWallet': spenderWallet, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token balance + * Get the balance of a specific wallet address for this ERC-20 contract. + * @param walletAddress Address of the wallet to check token balance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20BalanceOf( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/balance-of", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + wallet_address: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token balance - * Get the balance of a specific wallet address for this ERC-20 contract. - * @param walletAddress Address of the wallet to check token balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20BalanceOf( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/balance-of', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'wallet_address': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token details + * Get details for this ERC-20 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20Get( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/get", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token details - * Get details for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20Get( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/get', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-20 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20TotalSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/total-supply", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20TotalSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/total-supply', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is + * typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc20SignatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: + | { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults + * to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: string | number; + mintEndTime?: string | number; + } + | ({ + to: string; + primarySaleRecipient?: string; + price?: string; + priceInWei?: string; + currency?: string; + validityStartTimestamp: number; + validityEndTimestamp?: number; + uid?: string; + } & ( + | { + quantity: string; + } + | { + quantityWei: string; + } + )), + ): CancelablePromise<{ + result: + | { + payload: { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } + | { + payload: { + to: string; + primarySaleRecipient: string; + quantity: string; + price: string; + currency: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/signature/generate", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + "x-thirdweb-sdk-version": xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc20SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | ({ -to: string; -primarySaleRecipient?: string; -price?: string; -priceInWei?: string; -currency?: string; -validityStartTimestamp: number; -validityEndTimestamp?: number; -uid?: string; -} & ({ -quantity: string; -} | { -quantityWei: string; -}))), -): CancelablePromise<{ -result: ({ -payload: { -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -to: string; -primarySaleRecipient: string; -quantity: string; -price: string; -currency: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/signature/generate', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - 'x-thirdweb-sdk-version': xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can + * claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active + * claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc20CanClaim( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + quantity: quantity, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc20CanClaim( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'quantity': quantity, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Retrieve the currently active claim phase, if any. + * Retrieve the currently active claim phase, if any. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc20GetActiveClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retrieve the currently active claim phase, if any. - * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc20GetActiveClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured. + * Get all the claim phases configured on the drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc20GetAllClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured. - * Get all the claim phases configured on the drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc20GetAllClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimConditionsGetClaimIneligibilityReasons( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array< + | string + | ( + | "There is not enough supply to claim." + | "This address is not on the allowlist." + | "Not enough time since last claim transaction. Please wait." + | "Claim phase has not started yet." + | "You have already claimed the token." + | "Incorrect price or currency." + | "Cannot claim more than maximum allowed quantity." + | "There are not enough tokens in the wallet to pay for the claim." + | "There is no active claim phase at the moment. Please check back in later." + | "There is no claim condition set." + | "No wallet connected." + | "No claim conditions found." + ) + >; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + quantity: quantity, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimConditionsGetClaimIneligibilityReasons( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'quantity': quantity, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for + * the given wallet address. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimConditionsGetClaimerProofs( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimConditionsGetClaimerProofs( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set allowance + * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SetAllowance( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to allow transfers from + */ + spenderAddress: string; + /** + * The number of tokens to give as allowance + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/set-allowance", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set allowance - * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SetAllowance( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to allow transfers from - */ -spenderAddress: string; -/** - * The number of tokens to give as allowance - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/set-allowance', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens + * Transfer ERC-20 tokens from the caller wallet to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20Transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + toAddress: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/transfer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens - * Transfer ERC-20 tokens from the caller wallet to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -toAddress: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/transfer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens from wallet + * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20TransferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + fromAddress: string; + /** + * The recipient address. + */ + toAddress: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/transfer-from", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens from wallet - * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -fromAddress: string; -/** - * The recipient address. - */ -toAddress: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/transfer-from', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-20 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20Burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The amount of tokens you want to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/burn", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-20 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The amount of tokens you want to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/burn', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token from wallet + * Burn ERC-20 tokens in a specific wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20BurnFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet sending the tokens + */ + holderAddress: string; + /** + * The amount of this token you want to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/burn-from", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token from wallet - * Burn ERC-20 tokens in a specific wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20BurnFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet sending the tokens - */ -holderAddress: string; -/** - * The amount of this token you want to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/burn-from', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-20 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The wallet address to receive the claimed tokens. + */ + recipient: string; + /** + * The amount of tokens to claim. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/claim-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The wallet address to receive the claimed tokens. - */ -recipient: string; -/** - * The amount of tokens to claim. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/claim-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-20 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20MintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + data: Array<{ + /** + * The address to mint tokens to + */ + toAddress: string; + /** + * The number of tokens to mint to the specific address. + */ + amount: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/mint-batch-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-20 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -data: Array<{ -/** - * The address to mint tokens to - */ -toAddress: string; -/** - * The number of tokens to mint to the specific address. - */ -amount: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/mint-batch-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-20 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20MintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint tokens to + */ + toAddress: string; + /** + * The amount of tokens you want to send + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/mint-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint tokens to - */ -toAddress: string; -/** - * The amount of tokens you want to send - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/mint-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-20 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SignatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/signature/mint", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-20 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: { -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/signature/mint', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Overwrite the claim conditions for the drop. - * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/set', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update a single claim phase. - * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for the drop. + * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a + * free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SetClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInputs: Array<{ + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/set", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update a single claim phase. + * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index + * is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, + * the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, + * with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20UpdateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInput: { + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 8ae8559f4..15565cd1e 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -2,2419 +2,2570 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class Erc721Service { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get details + * Get the details for a token in an ERC-721 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721Get( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/get", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get details - * Get the details for a token in an ERC-721 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721Get( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/get', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all details + * Get details for all tokens in an ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param start The start token id for paginated results. Defaults to 0. + * @param count The page count for paginated results. Defaults to 100. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetAll( + chain: string, + contractAddress: string, + start?: number, + count?: number, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + start: start, + count: count, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all details - * Get details for all tokens in an ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param start The start token id for paginated results. Defaults to 0. - * @param count The page count for paginated results. Defaults to 100. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetAll( -chain: string, -contractAddress: string, -start?: number, -count?: number, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'start': start, - 'count': count, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get owned tokens + * Get all tokens in an ERC-721 contract owned by a specific wallet. + * @param walletAddress Address of the wallet to get NFTs for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721GetOwned( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: "ERC1155" | "ERC721" | "metaplex"; + supply: string; + quantityOwned?: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/get-owned", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get owned tokens - * Get all tokens in an ERC-721 contract owned by a specific wallet. - * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721GetOwned( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/get-owned', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token balance + * Get the balance of a specific wallet address for this ERC-721 contract. + * @param walletAddress Address of the wallet to check NFT balance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721BalanceOf( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/balance-of", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token balance - * Get the balance of a specific wallet address for this ERC-721 contract. - * @param walletAddress Address of the wallet to check NFT balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721BalanceOf( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/balance-of', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if approved transfers + * Check if the specific wallet has approved transfers from a specific operator wallet. + * @param ownerWallet Address of the wallet who owns the NFT + * @param operator Address of the operator to check approval on + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721IsApproved( + ownerWallet: string, + operator: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/is-approved", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + ownerWallet: ownerWallet, + operator: operator, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if approved transfers - * Check if the specific wallet has approved transfers from a specific operator wallet. - * @param ownerWallet Address of the wallet who owns the NFT - * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721IsApproved( -ownerWallet: string, -operator: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/is-approved', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'ownerWallet': ownerWallet, - 'operator': operator, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/total-count", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/total-count', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimed supply + * Get the claimed supply for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalClaimedSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/total-claimed-supply", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimed supply - * Get the claimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalClaimedSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/total-claimed-supply', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get unclaimed supply + * Get the unclaimed supply for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalUnclaimedSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get unclaimed supply - * Get the unclaimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalUnclaimedSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can + * claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active + * claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc721CanClaim( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + quantity: quantity, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc721CanClaim( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'quantity': quantity, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Retrieve the currently active claim phase, if any. + * Retrieve the currently active claim phase, if any. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetActiveClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retrieve the currently active claim phase, if any. - * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetActiveClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured for the drop. + * Get all the claim phases configured for the drop. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetAllClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: string | number; + startTime: string; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash: string | Array; + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: null | Array; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + withAllowList: withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured for the drop. - * Get all the claim phases configured for the drop. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetAllClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'withAllowList': withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetClaimIneligibilityReasons( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array< + | string + | ( + | "There is not enough supply to claim." + | "This address is not on the allowlist." + | "Not enough time since last claim transaction. Please wait." + | "Claim phase has not started yet." + | "You have already claimed the token." + | "Incorrect price or currency." + | "Cannot claim more than maximum allowed quantity." + | "There are not enough tokens in the wallet to pay for the claim." + | "There is no active claim phase at the moment. Please check back in later." + | "There is no claim condition set." + | "No wallet connected." + | "No claim conditions found." + ) + >; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + quantity: quantity, + addressToCheck: addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetClaimIneligibilityReasons( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'quantity': quantity, - 'addressToCheck': addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for + * the given wallet address. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721GetClaimerProofs( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721GetClaimerProofs( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for all + * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for + * any token owned by the caller. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetApprovalForAll( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * whether to approve or revoke approval + */ + approved: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/set-approval-for-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for all - * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetApprovalForAll( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * whether to approve or revoke approval - */ -approved: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for token + * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetApprovalForToken( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * the tokenId to give approval for + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/set-approval-for-token", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for token - * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetApprovalForToken( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * the tokenId to give approval for - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-token', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token + * Transfer an ERC-721 token from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721Transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/transfer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token - * Transfer an ERC-721 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/transfer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721TransferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + from: string; + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/transfer-from", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -from: string; -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/transfer-from', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-721 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721MintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/mint-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/mint-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-721 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721MintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadatas: Array< + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string + >; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/mint-batch-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-721 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/mint-batch-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-721 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721Burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The token ID to burn + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/burn", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-721 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The token ID to burn - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/burn', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Lazy mint + * Lazy mint ERC-721 tokens to be claimed in the future. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721LazyMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + metadatas: Array< + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string + >; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/lazy-mint", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Lazy mint - * Lazy mint ERC-721 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721LazyMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/lazy-mint', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-721 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721ClaimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to claim the NFT to + */ + receiver: string; + /** + * Quantity of NFTs to mint + */ + quantity: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/claim-to", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to claim the NFT to - */ -receiver: string; -/** - * Quantity of NFTs to mint - */ -quantity: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/claim-to', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is + * typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc721SignatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: + | { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address + * of the contract. + */ + royaltyRecipient?: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps?: number; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults + * to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: string | number; + mintEndTime?: string | number; + } + | { + metadata: + | string + | { + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + }; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The amount of the "currency" token this token costs. Example: "0.1" + */ + price?: string; + /** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for + * the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ + priceInWei?: string; + /** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ + currency?: string; + /** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the + * "primarySaleRecipient" address of the contract. + */ + primarySaleRecipient?: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" + * address of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ + royaltyBps?: number; + /** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ + validityStartTimestamp?: number; + /** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ + validityEndTimestamp?: number; + /** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once + * on-chain. + */ + uid?: string; + }, + ): CancelablePromise<{ + result: + | { + payload: { + uri: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient + * address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } + | { + payload: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/signature/generate", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + "x-thirdweb-sdk-version": xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc721SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient?: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps?: number; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | { -metadata: (string | { -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -}); -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The amount of the "currency" token this token costs. Example: "0.1" - */ -price?: string; -/** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ -priceInWei?: string; -/** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ -currency?: string; -/** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ -primarySaleRecipient?: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ -royaltyBps?: number; -/** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ -validityStartTimestamp?: number; -/** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ -validityEndTimestamp?: number; -/** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ -uid?: string; -}), -): CancelablePromise<{ -result: ({ -payload: { -uri: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/signature/generate', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - 'x-thirdweb-sdk-version': xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-721 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SignatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: + | { + uri: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient + * address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the + * primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: + | { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + } + | string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). + * Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + } + | { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/signature/mint", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-721 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: ({ -uri: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -} | { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}); -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/signature/mint', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for the drop. + * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a + * free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInputs: Array<{ + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/set", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for the drop. - * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/set', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update a single claim phase. + * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index + * is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, + * the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, + * with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721UpdateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInput: { + maxClaimableSupply?: string | number; + startTime?: string | number; + price?: number | string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: number | string; + waitInSeconds?: number | string; + merkleRootHash?: string | Array; + metadata?: { + name?: string; + }; + snapshot?: Array | null; + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update a single claim phase. - * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Prepare signature - * Prepares a payload for a wallet to generate a signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc721SignaturePrepare( -chain: string, -contractAddress: string, -requestBody: { -metadata: (string | { -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -}); -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The amount of the "currency" token this token costs. Example: "0.1" - */ -price?: string; -/** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ -priceInWei?: string; -/** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ -currency?: string; -/** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ -primarySaleRecipient?: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ -royaltyBps?: number; -/** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ -validityStartTimestamp?: number; -/** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ -validityEndTimestamp?: number; -/** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ -uid?: string; -}, -): CancelablePromise<{ -result: { -mintPayload: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -/** - * The payload to sign with a wallet's `signTypedData` method. - */ -typedDataPayload: { -/** - * Specifies the contextual information used to prevent signature reuse across different contexts. - */ -domain: { -name: string; -version: string; -chainId: number; -verifyingContract: string; -}; -/** - * Defines the structure of the data types used in the message. - */ -types: { -EIP712Domain: Array<{ -name: string; -type: string; -}>; -MintRequest: Array<{ -name: string; -type: string; -}>; -}; -/** - * The structured data to be signed. - */ -message: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -/** - * The main type of the data in the message corresponding to a defined type in the `types` field. - */ -primaryType: 'MintRequest'; -}; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/signature/prepare', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Update token metadata - * Update the metadata for an ERC721 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721UpdateTokenMetadata( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update metadata - */ -tokenId: string; -metadata: { -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/contract/{chain}/{contractAddress}/erc721/token/update', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Prepare signature + * Prepares a payload for a wallet to generate a signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc721SignaturePrepare( + chain: string, + contractAddress: string, + requestBody: { + metadata: + | string + | { + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + }; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from + * intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The amount of the "currency" token this token costs. Example: "0.1" + */ + price?: string; + /** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for + * the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ + priceInWei?: string; + /** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ + currency?: string; + /** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the + * "primarySaleRecipient" address of the contract. + */ + primarySaleRecipient?: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" + * address of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ + royaltyBps?: number; + /** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ + validityStartTimestamp?: number; + /** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ + validityEndTimestamp?: number; + /** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once + * on-chain. + */ + uid?: string; + }, + ): CancelablePromise<{ + result: { + mintPayload: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + /** + * The payload to sign with a wallet's `signTypedData` method. + */ + typedDataPayload: { + /** + * Specifies the contextual information used to prevent signature reuse across different contexts. + */ + domain: { + name: string; + version: string; + chainId: number; + verifyingContract: string; + }; + /** + * Defines the structure of the data types used in the message. + */ + types: { + EIP712Domain: Array<{ + name: string; + type: string; + }>; + MintRequest: Array<{ + name: string; + type: string; + }>; + }; + /** + * The structured data to be signed. + */ + message: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + /** + * The main type of the data in the message corresponding to a defined type in the `types` field. + */ + primaryType: "MintRequest"; + }; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/signature/prepare", + path: { + chain: chain, + contractAddress: contractAddress, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update token metadata + * Update the metadata for an ERC721 token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721UpdateTokenMetadata( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update metadata + */ + tokenId: string; + metadata: { + /** + * The name of the NFT + */ + name?: string | number | null; + /** + * The description of the NFT + */ + description?: string | null; + /** + * The image of the NFT + */ + image?: string | null; + /** + * The external url of the NFT + */ + external_url?: string | null; + /** + * The animation url of the NFT + */ + animation_url?: string | null; + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: string | null; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/contract/{chain}/{contractAddress}/erc721/token/update", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/KeypairService.ts b/sdk/src/services/KeypairService.ts index 27094c3b7..c63e7fcac 100644 --- a/sdk/src/services/KeypairService.ts +++ b/sdk/src/services/KeypairService.ts @@ -2,144 +2,145 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class KeypairService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * List public keys + * List the public keys configured with Engine + * @returns any Default Response + * @throws ApiError + */ + public list(): CancelablePromise<{ + result: Array<{ + /** + * A unique identifier for the keypair + */ + hash: string; + /** + * The public key + */ + publicKey: string; + /** + * The keypair algorithm. + */ + algorithm: string; + /** + * A description for the keypair. + */ + label?: string; + /** + * When the keypair was added + */ + createdAt: string; + /** + * When the keypair was updated + */ + updatedAt: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/auth/keypair/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Add public key + * Add the public key for a keypair + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public add(requestBody: { /** - * List public keys - * List the public keys configured with Engine - * @returns any Default Response - * @throws ApiError + * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. */ - public list(): CancelablePromise<{ -result: Array<{ -/** - * A unique identifier for the keypair - */ -hash: string; -/** - * The public key - */ -publicKey: string; -/** - * The keypair algorithm. - */ -algorithm: string; -/** - * A description for the keypair. - */ -label?: string; -/** - * When the keypair was added - */ -createdAt: string; -/** - * When the keypair was updated - */ -updatedAt: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/auth/keypair/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Add public key - * Add the public key for a keypair - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public add( -requestBody: { -/** - * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. - */ -publicKey: string; -algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); -label?: string; -}, -): CancelablePromise<{ -result: { -keypair: { -/** - * A unique identifier for the keypair - */ -hash: string; -/** - * The public key - */ -publicKey: string; -/** - * The keypair algorithm. - */ -algorithm: string; -/** - * A description for the keypair. - */ -label?: string; -/** - * When the keypair was added - */ -createdAt: string; -/** - * When the keypair was updated - */ -updatedAt: string; -}; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/keypair/add', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Remove public key - * Remove the public key for a keypair - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public remove( -requestBody: { -hash: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/keypair/remove', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + publicKey: string; + algorithm: + | "RS256" + | "RS384" + | "RS512" + | "ES256" + | "ES384" + | "ES512" + | "PS256" + | "PS384" + | "PS512"; + label?: string; + }): CancelablePromise<{ + result: { + keypair: { + /** + * A unique identifier for the keypair + */ + hash: string; + /** + * The public key + */ + publicKey: string; + /** + * The keypair algorithm. + */ + algorithm: string; + /** + * A description for the keypair. + */ + label?: string; + /** + * When the keypair was added + */ + createdAt: string; + /** + * When the keypair was updated + */ + updatedAt: string; + }; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/keypair/add", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Remove public key + * Remove the public key for a keypair + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public remove(requestBody: { hash: string }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/keypair/remove", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index a9d72f07f..32d1f91cd 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -2,1076 +2,1122 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class MarketplaceDirectListingsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all listings + * Get all direct listings for this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllDirectListings( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + seller: seller, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all listings - * Get all direct listings for this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllDirectListings( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'seller': seller, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid listings + * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, + * and the creator still owns & has approved Marketplace to transfer the listed NFTs. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidDirectListings( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + seller: seller, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all valid listings - * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidDirectListings( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'seller': seller, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get direct listing + * Gets a direct listing on this marketplace contract. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDirectListing( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get direct listing - * Gets a direct listing on this marketplace contract. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDirectListing( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check approved buyer + * Check if a buyer is approved to purchase a specific direct listing. + * @param listingId The id of the listing to retrieve. + * @param walletAddress The wallet address of the buyer to check. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isBuyerApprovedForDirectListings( + listingId: string, + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + walletAddress: walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check approved buyer - * Check if a buyer is approved to purchase a specific direct listing. - * @param listingId The id of the listing to retrieve. - * @param walletAddress The wallet address of the buyer to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isBuyerApprovedForDirectListings( -listingId: string, -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - 'walletAddress': walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check approved currency + * Check if a currency is approved for a specific direct listing. + * @param listingId The id of the listing to retrieve. + * @param currencyContractAddress The smart contract address of the ERC20 token to check. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isCurrencyApprovedForDirectListings( + listingId: string, + currencyContractAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + currencyContractAddress: currencyContractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check approved currency - * Check if a currency is approved for a specific direct listing. - * @param listingId The id of the listing to retrieve. - * @param currencyContractAddress The smart contract address of the ERC20 token to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isCurrencyApprovedForDirectListings( -listingId: string, -currencyContractAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - 'currencyContractAddress': currencyContractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Get the total number of direct listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDirectListingsTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Get the total number of direct listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDirectListingsTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create direct listing + * Create a direct listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public createDirectListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/create-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create direct listing - * Create a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public createDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/create-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update direct listing + * Update a direct listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public updateDirectListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to update. + */ + listingId: string; + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/update-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update direct listing - * Update a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public updateDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to update. - */ -listingId: string; -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/update-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Buy from direct listing + * Buy from a specific direct listing from this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public buyFromDirectListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The number of tokens to buy (default is 1 for ERC721 NFTs). + */ + quantity: string; + /** + * The wallet address of the buyer. + */ + buyer: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Buy from direct listing - * Buy from a specific direct listing from this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public buyFromDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The number of tokens to buy (default is 1 for ERC721 NFTs). - */ -quantity: string; -/** - * The wallet address of the buyer. - */ -buyer: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Approve buyer for reserved listing + * Approve a wallet address to buy from a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public approveBuyerForReservedListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + buyer: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Approve buyer for reserved listing - * Approve a wallet address to buy from a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public approveBuyerForReservedListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -buyer: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke approval for reserved listings + * Revoke approval for a buyer to purchase a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeBuyerApprovalForReservedListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + buyerAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke approval for reserved listings - * Revoke approval for a buyer to purchase a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeBuyerApprovalForReservedListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -buyerAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke currency approval for reserved listing - * Revoke approval of a currency for a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeCurrencyApprovalForListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -currencyContractAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Cancel direct listing - * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public cancelDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to cancel. - */ -listingId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke currency approval for reserved listing + * Revoke approval of a currency for a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeCurrencyApprovalForListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + currencyContractAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Cancel direct listing + * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public cancelDirectListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to cancel. + */ + listingId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index 4570b18fa..6bf34f03c 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -2,937 +2,949 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class MarketplaceEnglishAuctionsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all English auctions + * Get all English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllEnglishAuctions( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + seller: seller, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all English auctions - * Get all English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllEnglishAuctions( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'seller': seller, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid English auctions + * Get all valid English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidEnglishAuctions( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + seller: seller, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all valid English auctions - * Get all valid English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidEnglishAuctions( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'seller': seller, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get English auction + * Get a specific English auction listing on this marketplace contract. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuction( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-auction", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get bid buffer BPS + * Get the basis points of the bid buffer. + * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. + * If there is no current bid, the bid must be at least the minimum bid amount. + * Returns the value in percentage format, e.g. 100 = 1%. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsBidBufferBps( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Get English auction - * Get a specific English auction listing on this marketplace contract. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * Returns a number representing the basis points of the bid buffer. */ - public getEnglishAuction( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-auction', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: number; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get minimum next bid + * Helper function to calculate the value that the next bid must be in order to be accepted. + * If there is no current bid, the bid must be at least the minimum bid amount. + * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsMinimumNextBid( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ /** - * Get bid buffer BPS - * Get the basis points of the bid buffer. - * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. - * If there is no current bid, the bid must be at least the minimum bid amount. - * Returns the value in percentage format, e.g. 100 = 1%. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError + * The `CurrencyValue` of the listing. Useful for displaying the price information. */ - public getEnglishAuctionsBidBufferBps( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * Returns a number representing the basis points of the bid buffer. - */ -result: number; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + result: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get minimum next bid - * Helper function to calculate the value that the next bid must be in order to be accepted. - * If there is no current bid, the bid must be at least the minimum bid amount. - * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsMinimumNextBid( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -result: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get winning bid + * Get the current highest bid of an active auction. + * @param listingId The ID of the listing to retrieve the winner for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsWinningBid( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: { + /** + * The id of the auction. + */ + auctionId?: string; + /** + * The address of the buyer who made the offer. + */ + bidderAddress?: string; + /** + * The currency contract address of the offer token. + */ + currencyContractAddress?: string; + /** + * The amount of coins offered per token. + */ + bidAmount?: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + bidAmountCurrencyValue?: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get winning bid - * Get the current highest bid of an active auction. - * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsWinningBid( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: { -/** - * The id of the auction. - */ -auctionId?: string; -/** - * The address of the buyer who made the offer. - */ -bidderAddress?: string; -/** - * The currency contract address of the offer token. - */ -currencyContractAddress?: string; -/** - * The amount of coins offered per token. - */ -bidAmount?: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -bidAmountCurrencyValue?: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total listings + * Get the count of English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total listings - * Get the count of English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Check winning bid - * Check if a bid is or will be the winning bid for an auction. - * @param listingId The ID of the listing to retrieve the winner for. - * @param bidAmount The amount of the bid to check if it is the winning bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isEnglishAuctionsWinningBid( -listingId: string, -bidAmount: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - 'bidAmount': bidAmount, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get winner - * Get the winner of an English auction. Can only be called after the auction has ended. - * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsWinner( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winner', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'listingId': listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check winning bid + * Check if a bid is or will be the winning bid for an auction. + * @param listingId The ID of the listing to retrieve the winner for. + * @param bidAmount The amount of the bid to check if it is the winning bid. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isEnglishAuctionsWinningBid( + listingId: string, + bidAmount: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + bidAmount: bidAmount, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Buyout English auction - * Buyout the listing for this auction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public buyoutEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to buy NFT(s) from. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get winner + * Get the winner of an English auction. Can only be called after the auction has ended. + * @param listingId The ID of the listing to retrieve the winner for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsWinner( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-winner", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + listingId: listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Cancel English auction - * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public cancelEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to cancel auction. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Buyout English auction + * Buyout the listing for this auction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public buyoutEnglishAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to buy NFT(s) from. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create English auction - * Create an English auction listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public createEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -/** - * amount to buy the NFT and close the listing. - */ -buyoutBidAmount: string; -/** - * Minimum amount that bids must be to placed - */ -minimumBidAmount: string; -/** - * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) - */ -bidBufferBps?: string; -/** - * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) - */ -timeBufferInSeconds?: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/create-auction', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Cancel English auction + * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled + * once a bid has been made. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public cancelEnglishAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to cancel auction. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Close English auction for bidder - * After an auction has concluded (and a buyout did not occur), - * execute the sale for the buyer, meaning the buyer receives the NFT(s). - * You must also call closeAuctionForSeller to execute the sale for the seller, - * meaning the seller receives the payment from the highest bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public closeEnglishAuctionForBidder( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create English auction + * Create an English auction listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public createEnglishAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + /** + * amount to buy the NFT and close the listing. + */ + buyoutBidAmount: string; + /** + * Minimum amount that bids must be to placed + */ + minimumBidAmount: string; + /** + * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) + */ + bidBufferBps?: string; + /** + * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in + * seconds) + */ + timeBufferInSeconds?: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/create-auction", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Close English auction for seller - * After an auction has concluded (and a buyout did not occur), - * execute the sale for the seller, meaning the seller receives the payment from the highest bid. - * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public closeEnglishAuctionForSeller( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Close English auction for bidder + * After an auction has concluded (and a buyout did not occur), + * execute the sale for the buyer, meaning the buyer receives the NFT(s). + * You must also call closeAuctionForSeller to execute the sale for the seller, + * meaning the seller receives the payment from the highest bid. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public closeEnglishAuctionForBidder( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Execute sale - * Close the auction for both buyer and seller. - * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. - * This function can only be called after the auction has ended. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public executeEnglishAuctionSale( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Close English auction for seller + * After an auction has concluded (and a buyout did not occur), + * execute the sale for the seller, meaning the seller receives the payment from the highest bid. + * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public closeEnglishAuctionForSeller( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Make bid - * Place a bid on an English auction listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public makeEnglishAuctionBid( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to place a bid on. - */ -listingId: string; -/** - * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. - */ -bidAmount: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/english-auctions/make-bid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Execute sale + * Close the auction for both buyer and seller. + * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. + * This function can only be called after the auction has ended. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public executeEnglishAuctionSale( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Make bid + * Place a bid on an English auction listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public makeEnglishAuctionBid( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to place a bid on. + */ + listingId: string; + /** + * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount + * for the next bid. + */ + bidAmount: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/english-auctions/make-bid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index 89e3f71f3..15519deb3 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -2,582 +2,603 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class MarketplaceOffersService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all offers + * Get all offers on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param offeror has offers from this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllMarketplaceOffers( + chain: string, + contractAddress: string, + count?: number, + offeror?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/offers/get-all", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + offeror: offeror, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all offers - * Get all offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param offeror has offers from this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllMarketplaceOffers( -chain: string, -contractAddress: string, -count?: number, -offeror?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/offers/get-all', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'offeror': offeror, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid offers + * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, + * or been accepted. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param offeror has offers from this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidMarketplaceOffers( + chain: string, + contractAddress: string, + count?: number, + offeror?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/offers/get-all-valid", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + count: count, + offeror: offeror, + start: start, + tokenContract: tokenContract, + tokenId: tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all valid offers - * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param offeror has offers from this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidMarketplaceOffers( -chain: string, -contractAddress: string, -count?: number, -offeror?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/offers/get-all-valid', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'count': count, - 'offeror': offeror, - 'start': start, - 'tokenContract': tokenContract, - 'tokenId': tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get offer + * Get details about an offer. + * @param offerId The ID of the offer to get information about. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getMarketplaceOffer( + offerId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: 0 | 1 | 2 | 3 | 4 | 5; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/offers/get-offer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + query: { + offerId: offerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get offer - * Get details about an offer. - * @param offerId The ID of the offer to get information about. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getMarketplaceOffer( -offerId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/offers/get-offer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - query: { - 'offerId': offerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total count + * Get the total number of offers on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getMarketplaceOffersTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/marketplace/{chain}/{contractAddress}/offers/get-total-count", + path: { + chain: chain, + contractAddress: contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total count - * Get the total number of offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getMarketplaceOffersTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/marketplace/{chain}/{contractAddress}/offers/get-total-count', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Make offer + * Make an offer on a token. A valid listing is not required. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public makeMarketplaceOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will + * be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * the price to offer in the currency specified + */ + totalPrice: string; + /** + * Defaults to 10 years from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/offers/make-offer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Make offer - * Make an offer on a token. A valid listing is not required. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public makeMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * the price to offer in the currency specified - */ -totalPrice: string; -/** - * Defaults to 10 years from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/offers/make-offer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Cancel offer - * Cancel a valid offer made by the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public cancelMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. - */ -offerId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/offers/cancel-offer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Accept offer - * Accept a valid offer. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. - * @returns any Default Response - * @throws ApiError - */ - public acceptMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the offer to accept. You can view all offers with getAll or getAllValid. - */ -offerId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/marketplace/{chain}/{contractAddress}/offers/accept-offer', - path: { - 'chain': chain, - 'contractAddress': contractAddress, - }, - headers: { - 'x-backend-wallet-address': xBackendWalletAddress, - 'x-idempotency-key': xIdempotencyKey, - 'x-account-address': xAccountAddress, - 'x-account-factory-address': xAccountFactoryAddress, - 'x-account-salt': xAccountSalt, - }, - query: { - 'simulateTx': simulateTx, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Cancel offer + * Cancel a valid offer made by the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public cancelMarketplaceOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. + */ + offerId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/offers/cancel-offer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Accept offer + * Accept a valid offer. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails + * simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last + * 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the + * contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful + * when creating multiple accounts with the same admin and only needed when deploying the account as part of a + * userop. + * @returns any Default Response + * @throws ApiError + */ + public acceptMarketplaceOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the offer to accept. You can view all offers with getAll or getAllValid. + */ + offerId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the + * transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/marketplace/{chain}/{contractAddress}/offers/accept-offer", + path: { + chain: chain, + contractAddress: contractAddress, + }, + headers: { + "x-backend-wallet-address": xBackendWalletAddress, + "x-idempotency-key": xIdempotencyKey, + "x-account-address": xAccountAddress, + "x-account-factory-address": xAccountFactoryAddress, + "x-account-salt": xAccountSalt, + }, + query: { + simulateTx: simulateTx, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/PermissionsService.ts b/sdk/src/services/PermissionsService.ts index dc1348060..1c9ec3028 100644 --- a/sdk/src/services/PermissionsService.ts +++ b/sdk/src/services/PermissionsService.ts @@ -2,104 +2,98 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class PermissionsService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all permissions + * Get all users with their corresponding permissions + * @returns any Default Response + * @throws ApiError + */ + public listAdmins(): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + walletAddress: string; + permissions: string; + label: string | null; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/auth/permissions/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Grant permissions to user + * Grant permissions to a user + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public grantAdmin(requestBody: { /** - * Get all permissions - * Get all users with their corresponding permissions - * @returns any Default Response - * @throws ApiError + * A contract or wallet address */ - public listAdmins(): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -walletAddress: string; -permissions: string; -label: (string | null); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/auth/permissions/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + walletAddress: string; + permissions: "ADMIN" | "OWNER"; + label?: string; + }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/permissions/grant", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Revoke permissions from user + * Revoke a user's permissions + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeAdmin(requestBody: { /** - * Grant permissions to user - * Grant permissions to a user - * @param requestBody - * @returns any Default Response - * @throws ApiError + * A contract or wallet address */ - public grantAdmin( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -permissions: ('ADMIN' | 'OWNER'); -label?: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/permissions/grant', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke permissions from user - * Revoke a user's permissions - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeAdmin( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/auth/permissions/revoke', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + walletAddress: string; + }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/auth/permissions/revoke", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 3c91ffe1d..4a5343065 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -2,219 +2,212 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class RelayerService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all meta-transaction relayers + * Get all meta-transaction relayers + * @returns any Default Response + * @throws ApiError + */ + public listRelayers(): CancelablePromise<{ + result: Array<{ + id: string; + name: string | null; + chainId: string; + /** + * A contract or wallet address + */ + backendWalletAddress: string; + allowedContracts: Array | null; + allowedForwarders: Array | null; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/relayer/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Create a new meta-transaction relayer + * Create a new meta-transaction relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public createRelayer(requestBody: { + name?: string; /** - * Get all meta-transaction relayers - * Get all meta-transaction relayers - * @returns any Default Response - * @throws ApiError + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. */ - public listRelayers(): CancelablePromise<{ -result: Array<{ -id: string; -name: (string | null); -chainId: string; -/** - * A contract or wallet address - */ -backendWalletAddress: string; -allowedContracts: (Array | null); -allowedForwarders: (Array | null); -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/relayer/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + chain: string; /** - * Create a new meta-transaction relayer - * Create a new meta-transaction relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError + * The address of the backend wallet to use for relaying transactions. */ - public createRelayer( -requestBody: { -name?: string; -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * The address of the backend wallet to use for relaying transactions. - */ -backendWalletAddress: string; -allowedContracts?: Array; -allowedForwarders?: Array; -}, -): CancelablePromise<{ -result: { -relayerId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/relayer/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + backendWalletAddress: string; + allowedContracts?: Array; + allowedForwarders?: Array; + }): CancelablePromise<{ + result: { + relayerId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/relayer/create", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke a relayer - * Revoke a relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeRelayer( -requestBody: { -id: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/relayer/revoke', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke a relayer + * Revoke a relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeRelayer(requestBody: { id: string }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/relayer/revoke", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Update a relayer + * Update a relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateRelayer(requestBody: { + id: string; + name?: string; /** - * Update a relayer - * Update a relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. */ - public updateRelayer( -requestBody: { -id: string; -name?: string; -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain?: string; -/** - * A contract or wallet address - */ -backendWalletAddress?: string; -allowedContracts?: Array; -allowedForwarders?: Array; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/relayer/update', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - + chain?: string; /** - * Relay a meta-transaction - * Relay an EIP-2771 meta-transaction - * @param relayerId - * @param requestBody - * @returns any Default Response - * @throws ApiError + * A contract or wallet address */ - public relay( -relayerId: string, -requestBody?: ({ -type: 'forward'; -request: { -from: string; -to: string; -value: string; -gas: string; -nonce: string; -data: string; -chainid?: string; -}; -signature: string; -/** - * A contract or wallet address - */ -forwarderAddress: string; -} | { -type: 'permit'; -request: { -to: string; -owner: string; -spender: string; -value: string; -nonce: string; -deadline: string; -}; -signature: string; -} | { -type: 'execute-meta-transaction'; -request: { -from: string; -to: string; -data: string; -}; -signature: string; -}), -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/relayer/{relayerId}', - path: { - 'relayerId': relayerId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + backendWalletAddress?: string; + allowedContracts?: Array; + allowedForwarders?: Array; + }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/relayer/update", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Relay a meta-transaction + * Relay an EIP-2771 meta-transaction + * @param relayerId + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public relay( + relayerId: string, + requestBody?: + | { + type: "forward"; + request: { + from: string; + to: string; + value: string; + gas: string; + nonce: string; + data: string; + chainid?: string; + }; + signature: string; + /** + * A contract or wallet address + */ + forwarderAddress: string; + } + | { + type: "permit"; + request: { + to: string; + owner: string; + spender: string; + value: string; + nonce: string; + deadline: string; + }; + signature: string; + } + | { + type: "execute-meta-transaction"; + request: { + from: string; + to: string; + data: string; + }; + signature: string; + }, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/relayer/{relayerId}", + path: { + relayerId: relayerId, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index f9aede094..6f1b7faea 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -2,599 +2,594 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class TransactionService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all transactions + * Get all transaction requests. + * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' + * @param page Specify the page number. + * @param limit Specify the number of results to return per page. + * @returns any Default Response + * @throws ApiError + */ + public listTransactions( + status: "queued" | "mined" | "cancelled" | "errored", + page: number = 1, + limit: number = 100, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: string | null; + /** + * The current state of the transaction. + */ + status: "queued" | "sent" | "mined" | "errored" | "cancelled"; + chainId: string | null; + fromAddress: string | null; + toAddress: string | null; + data: string | null; + extension: string | null; + value: string | null; + nonce: number | string | null; + gasLimit: string | null; + gasPrice: string | null; + maxFeePerGas: string | null; + maxPriorityFeePerGas: string | null; + transactionType: number | null; + transactionHash: string | null; + queuedAt: string | null; + sentAt: string | null; + minedAt: string | null; + cancelledAt: string | null; + deployedContractAddress: string | null; + deployedContractType: string | null; + errorMessage: string | null; + sentAtBlockNumber: number | null; + blockNumber: number | null; + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: boolean | null; + retryMaxFeePerGas: string | null; + retryMaxPriorityFeePerGas: string | null; + signerAddress: string | null; + accountAddress: string | null; + accountSalt: string | null; + accountFactoryAddress: string | null; + target: string | null; + sender: string | null; + initCode: string | null; + callData: string | null; + callGasLimit: string | null; + verificationGasLimit: string | null; + preVerificationGas: string | null; + paymasterAndData: string | null; + userOpHash: string | null; + functionName: string | null; + functionArgs: string | null; + onChainTxStatus: number | null; + onchainStatus: "success" | "reverted" | null; + effectiveGasPrice: string | null; + cumulativeGasUsed: string | null; + }>; + totalCount: number; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/get-all", + query: { + page: page, + limit: limit, + status: status, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all transactions - * Get all transaction requests. - * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param page Specify the page number. - * @param limit Specify the number of results to return per page. - * @returns any Default Response - * @throws ApiError - */ - public listTransactions( -status: ('queued' | 'mined' | 'cancelled' | 'errored'), -page: number = 1, -limit: number = 100, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -totalCount: number; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/get-all', - query: { - 'page': page, - 'limit': limit, - 'status': status, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get transaction status - * Get the status for a transaction request. - * @param queueId Transaction queue ID - * @returns any Default Response - * @throws ApiError - */ - public status( -queueId: string, -): CancelablePromise<{ -result: { -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/status/{queueId}', - path: { - 'queueId': queueId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction status + * Get the status for a transaction request. + * @param queueId Transaction queue ID + * @returns any Default Response + * @throws ApiError + */ + public status(queueId: string): CancelablePromise<{ + result: { + queueId: string | null; + /** + * The current state of the transaction. + */ + status: "queued" | "sent" | "mined" | "errored" | "cancelled"; + chainId: string | null; + fromAddress: string | null; + toAddress: string | null; + data: string | null; + extension: string | null; + value: string | null; + nonce: number | string | null; + gasLimit: string | null; + gasPrice: string | null; + maxFeePerGas: string | null; + maxPriorityFeePerGas: string | null; + transactionType: number | null; + transactionHash: string | null; + queuedAt: string | null; + sentAt: string | null; + minedAt: string | null; + cancelledAt: string | null; + deployedContractAddress: string | null; + deployedContractType: string | null; + errorMessage: string | null; + sentAtBlockNumber: number | null; + blockNumber: number | null; + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: boolean | null; + retryMaxFeePerGas: string | null; + retryMaxPriorityFeePerGas: string | null; + signerAddress: string | null; + accountAddress: string | null; + accountSalt: string | null; + accountFactoryAddress: string | null; + target: string | null; + sender: string | null; + initCode: string | null; + callData: string | null; + callGasLimit: string | null; + verificationGasLimit: string | null; + preVerificationGas: string | null; + paymasterAndData: string | null; + userOpHash: string | null; + functionName: string | null; + functionArgs: string | null; + onChainTxStatus: number | null; + onchainStatus: "success" | "reverted" | null; + effectiveGasPrice: string | null; + cumulativeGasUsed: string | null; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/status/{queueId}", + path: { + queueId: queueId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all deployment transactions - * Get all transaction requests to deploy contracts. - * @param page Specify the page number for pagination. - * @param limit Specify the number of transactions to return per page. - * @returns any Default Response - * @throws ApiError - */ - public getAllDeployedContracts( -page: number = 1, -limit: number = 10, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -totalCount: number; -}; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/get-all-deployed-contracts', - query: { - 'page': page, - 'limit': limit, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Retry transaction (synchronous) - * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public syncRetry( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -maxFeePerGas?: string; -maxPriorityFeePerGas?: string; -}, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/transaction/sync-retry', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all deployment transactions + * Get all transaction requests to deploy contracts. + * @param page Specify the page number for pagination. + * @param limit Specify the number of transactions to return per page. + * @returns any Default Response + * @throws ApiError + */ + public getAllDeployedContracts( + page: number = 1, + limit: number = 10, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: string | null; + /** + * The current state of the transaction. + */ + status: "queued" | "sent" | "mined" | "errored" | "cancelled"; + chainId: string | null; + fromAddress: string | null; + toAddress: string | null; + data: string | null; + extension: string | null; + value: string | null; + nonce: number | string | null; + gasLimit: string | null; + gasPrice: string | null; + maxFeePerGas: string | null; + maxPriorityFeePerGas: string | null; + transactionType: number | null; + transactionHash: string | null; + queuedAt: string | null; + sentAt: string | null; + minedAt: string | null; + cancelledAt: string | null; + deployedContractAddress: string | null; + deployedContractType: string | null; + errorMessage: string | null; + sentAtBlockNumber: number | null; + blockNumber: number | null; + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: boolean | null; + retryMaxFeePerGas: string | null; + retryMaxPriorityFeePerGas: string | null; + signerAddress: string | null; + accountAddress: string | null; + accountSalt: string | null; + accountFactoryAddress: string | null; + target: string | null; + sender: string | null; + initCode: string | null; + callData: string | null; + callGasLimit: string | null; + verificationGasLimit: string | null; + preVerificationGas: string | null; + paymasterAndData: string | null; + userOpHash: string | null; + functionName: string | null; + functionArgs: string | null; + onChainTxStatus: number | null; + onchainStatus: "success" | "reverted" | null; + effectiveGasPrice: string | null; + cumulativeGasUsed: string | null; + }>; + totalCount: number; + }; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/get-all-deployed-contracts", + query: { + page: page, + limit: limit, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Retry transaction (synchronous) + * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public syncRetry(requestBody: { /** - * Retry failed transaction - * Retry a failed transaction - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Transaction queue ID */ - public retryFailed( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -}, -): CancelablePromise<{ -result: { -message: string; -status: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/transaction/retry-failed', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + queueId: string; + maxFeePerGas?: string; + maxPriorityFeePerGas?: string; + }): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/transaction/sync-retry", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Retry failed transaction + * Retry a failed transaction + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public retryFailed(requestBody: { /** - * Cancel transaction - * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled. - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Transaction queue ID */ - public cancel( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -}, -): CancelablePromise<{ -result: { -/** - * Transaction queue ID - */ -queueId: string; -/** - * Response status - */ -status: string; -/** - * Response message - */ -message: string; -/** - * A transaction hash - */ -transactionHash?: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/transaction/cancel', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + queueId: string; + }): CancelablePromise<{ + result: { + message: string; + status: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/transaction/retry-failed", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Cancel transaction + * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not + * guaranteed to be cancelled. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public cancel(requestBody: { /** - * Send a signed transaction - * Send a signed transaction - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody - * @returns any Default Response - * @throws ApiError + * Transaction queue ID */ - public sendRawTransaction( -chain: string, -requestBody: { -signedTransaction: string; -}, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/transaction/{chain}/send-signed-transaction', - path: { - 'chain': chain, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + queueId: string; + }): CancelablePromise<{ + result: { + /** + * Transaction queue ID + */ + queueId: string; + /** + * Response status + */ + status: string; + /** + * Response message + */ + message: string; + /** + * A transaction hash + */ + transactionHash?: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/transaction/cancel", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a signed user operation - * Send a signed user operation - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public sendSignedUserOp( -chain: string, -requestBody: { -signedUserOp: any; -}, -): CancelablePromise<({ -result: { -/** - * A transaction hash - */ -userOpHash: string; -}; -} | { -error: { -message: string; -}; -})> { - return this.httpRequest.request({ - method: 'POST', - url: '/transaction/{chain}/send-signed-user-op', - path: { - 'chain': chain, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a signed transaction + * Send a signed transaction + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public sendRawTransaction( + chain: string, + requestBody: { + signedTransaction: string; + }, + ): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/transaction/{chain}/send-signed-transaction", + path: { + chain: chain, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction receipt - * Get the transaction receipt from a transaction hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param transactionHash Transaction hash - * @returns any Default Response - * @throws ApiError - */ - public getTransactionReceipt( -chain: string, -transactionHash: string, -): CancelablePromise<{ -result: ({ -to?: string; -from?: string; -contractAddress?: (string | null); -transactionIndex?: number; -root?: string; -gasUsed?: string; -logsBloom?: string; -blockHash?: string; -/** - * A transaction hash - */ -transactionHash?: string; -logs?: Array; -blockNumber?: number; -confirmations?: number; -cumulativeGasUsed?: string; -effectiveGasPrice?: string; -byzantium?: boolean; -type?: number; -status?: number; -} | null); -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/{chain}/tx-hash/{transactionHash}', - path: { - 'chain': chain, - 'transactionHash': transactionHash, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a signed user operation + * Send a signed user operation + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public sendSignedUserOp( + chain: string, + requestBody: { + signedUserOp: any; + }, + ): CancelablePromise< + | { + result: { + /** + * A transaction hash + */ + userOpHash: string; + }; + } + | { + error: { + message: string; + }; + } + > { + return this.httpRequest.request({ + method: "POST", + url: "/transaction/{chain}/send-signed-user-op", + path: { + chain: chain, + }, + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction receipt from user-op hash - * Get the transaction receipt from a user-op hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param userOpHash User operation hash - * @returns any Default Response - * @throws ApiError - */ - public useropHashReceipt( -chain: string, -userOpHash: string, -): CancelablePromise<{ -result: any; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/{chain}/userop-hash/{userOpHash}', - path: { - 'chain': chain, - 'userOpHash': userOpHash, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction receipt + * Get the transaction receipt from a transaction hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param transactionHash Transaction hash + * @returns any Default Response + * @throws ApiError + */ + public getTransactionReceipt( + chain: string, + transactionHash: string, + ): CancelablePromise<{ + result: { + to?: string; + from?: string; + contractAddress?: string | null; + transactionIndex?: number; + root?: string; + gasUsed?: string; + logsBloom?: string; + blockHash?: string; + /** + * A transaction hash + */ + transactionHash?: string; + logs?: Array; + blockNumber?: number; + confirmations?: number; + cumulativeGasUsed?: string; + effectiveGasPrice?: string; + byzantium?: boolean; + type?: number; + status?: number; + } | null; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/{chain}/tx-hash/{transactionHash}", + path: { + chain: chain, + transactionHash: transactionHash, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction logs - * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param queueId The queue ID for a mined transaction. - * @param transactionHash The transaction hash for a mined transaction. - * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) - * @returns any Default Response - * @throws ApiError - */ - public getTransactionLogs( -chain: string, -queueId?: string, -transactionHash?: string, -parseLogs?: boolean, -): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -address: string; -topics: Array; -data: string; -blockNumber: string; -/** - * A transaction hash - */ -transactionHash: string; -transactionIndex: number; -blockHash: string; -logIndex: number; -removed: boolean; -/** - * Event name, only returned when `parseLogs` is true - */ -eventName?: string; -/** - * Event arguments. Only returned when `parseLogs` is true - */ -args?: any; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/transaction/logs', - query: { - 'chain': chain, - 'queueId': queueId, - 'transactionHash': transactionHash, - 'parseLogs': parseLogs, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction receipt from user-op hash + * Get the transaction receipt from a user-op hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param userOpHash User operation hash + * @returns any Default Response + * @throws ApiError + */ + public useropHashReceipt( + chain: string, + userOpHash: string, + ): CancelablePromise<{ + result: any; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/{chain}/userop-hash/{userOpHash}", + path: { + chain: chain, + userOpHash: userOpHash, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Get transaction logs + * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to + * parse the event logs. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param queueId The queue ID for a mined transaction. + * @param transactionHash The transaction hash for a mined transaction. + * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) + * @returns any Default Response + * @throws ApiError + */ + public getTransactionLogs( + chain: string, + queueId?: string, + transactionHash?: string, + parseLogs?: boolean, + ): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + address: string; + topics: Array; + data: string; + blockNumber: string; + /** + * A transaction hash + */ + transactionHash: string; + transactionIndex: number; + blockHash: string; + logIndex: number; + removed: boolean; + /** + * Event name, only returned when `parseLogs` is true + */ + eventName?: string; + /** + * Event arguments. Only returned when `parseLogs` is true + */ + args?: any; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/transaction/logs", + query: { + chain: chain, + queueId: queueId, + transactionHash: transactionHash, + parseLogs: parseLogs, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index eb025cee8..6333b2450 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -2,158 +2,167 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from '../core/CancelablePromise'; -import type { BaseHttpRequest } from '../core/BaseHttpRequest'; +import type { CancelablePromise } from "../core/CancelablePromise"; +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class WebhooksService { + constructor(public readonly httpRequest: BaseHttpRequest) {} - constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Get all webhooks configured + * Get all webhooks configuration data set up on Engine + * @returns any Default Response + * @throws ApiError + */ + public listWebhooks(): CancelablePromise<{ + result: Array<{ + id: number; + url: string; + name: string | null; + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + }>; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/webhooks/get-all", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Create a webhook + * Create a webhook to call when a specific Engine event occurs. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public createWebhook(requestBody: { /** - * Get all webhooks configured - * Get all webhooks configuration data set up on Engine - * @returns any Default Response - * @throws ApiError + * Webhook URL. Non-HTTPS URLs are not supported. */ - public listWebhooks(): CancelablePromise<{ -result: Array<{ -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/webhooks/get-all', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + url: string; + name?: string; + eventType: + | "queued_transaction" + | "sent_transaction" + | "mined_transaction" + | "errored_transaction" + | "cancelled_transaction" + | "all_transactions" + | "backend_wallet_balance" + | "auth" + | "contract_subscription"; + }): CancelablePromise<{ + result: { + id: number; + url: string; + name: string | null; + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/webhooks/create", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create a webhook - * Create a webhook to call when a specific Engine event occurs. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public createWebhook( -requestBody: { -/** - * Webhook URL. Non-HTTPS URLs are not supported. - */ -url: string; -name?: string; -eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); -}, -): CancelablePromise<{ -result: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/webhooks/create', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Revoke webhook - * Revoke a Webhook - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revoke( -requestBody: { -id: number; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/webhooks/revoke', - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke webhook + * Revoke a Webhook + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revoke(requestBody: { id: number }): CancelablePromise<{ + result: { + success: boolean; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/webhooks/revoke", + body: requestBody, + mediaType: "application/json", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get webhooks event types - * Get the all the webhooks event types - * @returns any Default Response - * @throws ApiError - */ - public getEventTypes(): CancelablePromise<{ -result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; -}> { - return this.httpRequest.request({ - method: 'GET', - url: '/webhooks/event-types', - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Test webhook - * Send a test payload to a webhook. - * @param webhookId - * @returns any Default Response - * @throws ApiError - */ - public testWebhook( -webhookId: string, -): CancelablePromise<{ -result: { -ok: boolean; -status: number; -body: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/webhooks/{webhookId}/test', - path: { - 'webhookId': webhookId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get webhooks event types + * Get the all the webhooks event types + * @returns any Default Response + * @throws ApiError + */ + public getEventTypes(): CancelablePromise<{ + result: Array< + | "queued_transaction" + | "sent_transaction" + | "mined_transaction" + | "errored_transaction" + | "cancelled_transaction" + | "all_transactions" + | "backend_wallet_balance" + | "auth" + | "contract_subscription" + >; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/webhooks/event-types", + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** + * Test webhook + * Send a test payload to a webhook. + * @param webhookId + * @returns any Default Response + * @throws ApiError + */ + public testWebhook(webhookId: string): CancelablePromise<{ + result: { + ok: boolean; + status: number; + body: string; + }; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/webhooks/{webhookId}/test", + path: { + webhookId: webhookId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } } From 2de5fd1b420dc7567b8d33ba78545214ddafec11 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 00:48:10 -0600 Subject: [PATCH 05/11] fix write descriptions in direct listings --- .../marketplaceV3/directListings/write/buyFromListing.ts | 2 +- .../write/revokeBuyerApprovalForReservedListing.ts | 4 ++-- .../directListings/write/revokeCurrencyApprovalForListing.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts index 75ff756b8..cd042ce0a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -17,7 +17,7 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: "The ID of the listing you want to buy.", }), quantity: Type.String({ description: "The number of tokens to buy (default is 1 for ERC721 NFTs).", diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts index 79cd57d3d..7e45a7ffb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -18,11 +18,11 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: "The ID of the listing you want to revoke buyer approval for.", }), buyerAddress: { ...AddressSchema, - description: "The wallet address of the buyer to approve.", + description: "The wallet address of the buyer to revoke approval for.", }, ...txOverridesWithValueSchema.properties, }); diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts index 048a81b78..f57dc6551 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -18,11 +18,11 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to approve a buyer for.", + description: "The ID of the listing you want to revoke currency approval for.", }), currencyContractAddress: { ...AddressSchema, - description: "The wallet address of the buyer to approve.", + description: "The address of the currency to revoke approval for.", }, ...txOverridesWithValueSchema.properties, }); From 8cbda94a86fa96543535367dedec393aba88972d Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 03:22:25 -0600 Subject: [PATCH 06/11] details --- .../englishAuctions/read/getMinimumNextBid.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index a8a77c48b..8f1f7499f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -24,13 +24,7 @@ const responseSchema = Type.Object({ responseSchema.examples = [ { - result: { - name: "MATIC", - symbol: "MATIC", - decimals: 18, - value: "10000000000", - displayValue: "0.00000001", - }, + result: "10000000000", }, ]; From a6cb6b9da9723eb45f56cadfd6e64c7ea857b11d Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 03:34:17 -0600 Subject: [PATCH 07/11] add missing txOverrides and headers to all write calls for english auctions --- .../englishAuctions/write/buyoutAuction.ts | 22 +++++++++++++------ .../englishAuctions/write/cancelAuction.ts | 22 +++++++++++++------ .../write/closeAuctionForBidder.ts | 22 +++++++++++++------ .../write/closeAuctionForSeller.ts | 22 +++++++++++++------ .../englishAuctions/write/createAuction.ts | 22 ++++++++++++++----- .../englishAuctions/write/executeSale.ts | 17 +++++++++----- .../englishAuctions/write/makeBid.ts | 17 +++++++++----- 7 files changed, 100 insertions(+), 44 deletions(-) diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts index 64a931d47..e383a5efc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to buy NFT(s) from.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -40,6 +43,7 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { description: "Buyout the listing for this auction.", tags: ["Marketplace-EnglishAuctions"], operationId: "buyoutEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -51,11 +55,12 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -64,14 +69,17 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { accountAddress, }); - const tx = - await contract.englishAuctions.buyoutAuction.prepare(listingId); + const tx = await contract.englishAuctions.buyoutAuction.prepare( + listingId, + ); const queueId = await queueTx({ tx, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts index df6f44c71..6cff7e0fb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to cancel auction.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -41,6 +44,7 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { "Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made.", tags: ["Marketplace-EnglishAuctions"], operationId: "cancelEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -52,11 +56,12 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -65,14 +70,17 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { accountAddress, }); - const tx = - await contract.englishAuctions.cancelAuction.prepare(listingId); + const tx = await contract.englishAuctions.cancelAuction.prepare( + listingId, + ); const queueId = await queueTx({ tx, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts index 1b5236a93..9b94e1c59 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -45,6 +48,7 @@ You must also call closeAuctionForSeller to execute the sale for the seller, meaning the seller receives the payment from the highest bid.`, tags: ["Marketplace-EnglishAuctions"], operationId: "closeEnglishAuctionForBidder", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -56,11 +60,12 @@ meaning the seller receives the payment from the highest bid.`, handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -69,14 +74,17 @@ meaning the seller receives the payment from the highest bid.`, accountAddress, }); - const tx = - await contract.englishAuctions.closeAuctionForBidder.prepare(listingId); + const tx = await contract.englishAuctions.closeAuctionForBidder.prepare( + listingId, + ); const queueId = await queueTx({ tx, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts index 32ad9f01a..13ac42e9b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -44,6 +47,7 @@ execute the sale for the seller, meaning the seller receives the payment from th You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s).`, tags: ["Marketplace-EnglishAuctions"], operationId: "closeEnglishAuctionForSeller", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -55,11 +59,12 @@ You must also call closeAuctionForBidder to execute the sale for the buyer, mean handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -68,14 +73,17 @@ You must also call closeAuctionForBidder to execute the sale for the buyer, mean accountAddress, }); - const tx = - await contract.englishAuctions.closeAuctionForSeller.prepare(listingId); + const tx = await contract.englishAuctions.closeAuctionForSeller.prepare( + listingId, + ); const queueId = await queueTx({ tx, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts index b348b1b1d..1fec9702e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/createAuction.ts @@ -1,4 +1,4 @@ -import type { Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -10,11 +10,16 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT const requestSchema = marketplaceV3ContractParamSchema; -const requestBodySchema = englishAuctionInputSchema; +const requestBodySchema = Type.Object({ + ...englishAuctionInputSchema.properties, + ...txOverridesWithValueSchema.properties, +}); requestBodySchema.examples = [ { @@ -47,6 +52,7 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { "Create an English auction listing on this marketplace contract.", tags: ["Marketplace-EnglishAuctions"], operationId: "createEnglishAuction", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -69,11 +75,13 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { endTimestamp, bidBufferBps, timeBufferInSeconds, + txOverrides, } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -100,6 +108,8 @@ export async function englishAuctionsCreateAuction(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts index 19e591eeb..c7067adc9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -17,6 +19,7 @@ const requestBodySchema = Type.Object({ listingId: Type.String({ description: "The ID of the listing to execute the sale for.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -42,6 +45,7 @@ This means the NFT(s) will be transferred to the buyer and the seller will recei This function can only be called after the auction has ended.`, tags: ["Marketplace-EnglishAuctions"], operationId: "executeEnglishAuctionSale", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -53,11 +57,12 @@ This function can only be called after the auction has ended.`, handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -73,6 +78,8 @@ This function can only be called after the auction has ended.`, chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts index 7545db42e..f21952310 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -9,6 +9,8 @@ import { standardResponseSchema, transactionWritesResponseSchema, } from "../../../../../../schemas/sharedApiSchemas"; +import { txOverridesWithValueSchema } from "../../../../../../schemas/txOverrides"; +import { walletWithAAHeaderSchema } from "../../../../../../schemas/wallet"; import { getChainIdFromChain } from "../../../../../../utils/chain"; // INPUT @@ -21,6 +23,7 @@ const requestBodySchema = Type.Object({ description: "The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid.", }), + ...txOverridesWithValueSchema.properties, }); requestBodySchema.examples = [ @@ -45,6 +48,7 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { description: "Place a bid on an English auction listing.", tags: ["Marketplace-EnglishAuctions"], operationId: "makeEnglishAuctionBid", + headers: walletWithAAHeaderSchema, params: requestSchema, body: requestBodySchema, querystring: requestQuerystringSchema, @@ -56,11 +60,12 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { handler: async (request, reply) => { const { chain, contractAddress } = request.params; const { simulateTx } = request.query; - const { listingId, bidAmount } = request.body; - const walletAddress = request.headers[ - "x-backend-wallet-address" - ] as string; - const accountAddress = request.headers["x-account-address"] as string; + const { listingId, bidAmount, txOverrides } = request.body; + const { + "x-backend-wallet-address": walletAddress, + "x-account-address": accountAddress, + "x-idempotency-key": idempotencyKey, + } = request.headers as Static; const chainId = await getChainIdFromChain(chain); const contract = await getContract({ chainId, @@ -79,6 +84,8 @@ export async function englishAuctionsMakeBid(fastify: FastifyInstance) { chainId, simulateTx, extension: "marketplace-v3-english-auctions", + idempotencyKey, + txOverrides, }); reply.status(StatusCodes.OK).send({ result: { From 498f02aed05ef86232653eb62836b75126ec1ee8 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 03:40:55 -0600 Subject: [PATCH 08/11] rebuild sdk --- sdk/src/Engine.ts | 192 +- sdk/src/core/ApiError.ts | 36 +- sdk/src/core/ApiRequestOptions.ts | 29 +- sdk/src/core/ApiResult.ts | 10 +- sdk/src/core/BaseHttpRequest.ts | 11 +- sdk/src/core/CancelablePromise.ts | 222 +- sdk/src/core/FetchHttpRequest.ts | 35 +- sdk/src/core/OpenAPI.ts | 38 +- sdk/src/core/request.ts | 529 +- sdk/src/index.ts | 62 +- sdk/src/services/AccessTokensService.ts | 246 +- sdk/src/services/AccountFactoryService.ts | 470 +- sdk/src/services/AccountService.ts | 1046 ++-- sdk/src/services/BackendWalletService.ts | 2064 ++++--- sdk/src/services/ChainService.ts | 254 +- sdk/src/services/ConfigurationService.ts | 1318 ++--- sdk/src/services/ContractEventsService.ts | 162 +- sdk/src/services/ContractMetadataService.ts | 390 +- sdk/src/services/ContractRolesService.ts | 522 +- sdk/src/services/ContractRoyaltiesService.ts | 542 +- sdk/src/services/ContractService.ts | 312 +- .../services/ContractSubscriptionsService.ts | 411 +- sdk/src/services/DefaultService.ts | 68 +- sdk/src/services/DeployService.ts | 2711 +++++---- sdk/src/services/Erc1155Service.ts | 5155 ++++++++--------- sdk/src/services/Erc20Service.ts | 3300 +++++------ sdk/src/services/Erc721Service.ts | 4921 ++++++++-------- sdk/src/services/KeypairService.ts | 267 +- .../MarketplaceDirectListingsService.ts | 2160 ++++--- .../MarketplaceEnglishAuctionsService.ts | 1834 +++--- sdk/src/services/MarketplaceOffersService.ts | 1159 ++-- sdk/src/services/PermissionsService.ts | 176 +- sdk/src/services/RelayerService.ts | 393 +- sdk/src/services/TransactionService.ts | 1147 ++-- sdk/src/services/WebhooksService.ts | 299 +- 35 files changed, 15912 insertions(+), 16579 deletions(-) diff --git a/sdk/src/Engine.ts b/sdk/src/Engine.ts index 42ec5863c..72719591c 100644 --- a/sdk/src/Engine.ts +++ b/sdk/src/Engine.ts @@ -2,111 +2,105 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { BaseHttpRequest } from "./core/BaseHttpRequest"; -import type { OpenAPIConfig } from "./core/OpenAPI"; -import { FetchHttpRequest } from "./core/FetchHttpRequest"; +import type { BaseHttpRequest } from './core/BaseHttpRequest'; +import type { OpenAPIConfig } from './core/OpenAPI'; +import { FetchHttpRequest } from './core/FetchHttpRequest'; -import { AccessTokensService } from "./services/AccessTokensService"; -import { AccountService } from "./services/AccountService"; -import { AccountFactoryService } from "./services/AccountFactoryService"; -import { BackendWalletService } from "./services/BackendWalletService"; -import { ChainService } from "./services/ChainService"; -import { ConfigurationService } from "./services/ConfigurationService"; -import { ContractService } from "./services/ContractService"; -import { ContractEventsService } from "./services/ContractEventsService"; -import { ContractMetadataService } from "./services/ContractMetadataService"; -import { ContractRolesService } from "./services/ContractRolesService"; -import { ContractRoyaltiesService } from "./services/ContractRoyaltiesService"; -import { ContractSubscriptionsService } from "./services/ContractSubscriptionsService"; -import { DefaultService } from "./services/DefaultService"; -import { DeployService } from "./services/DeployService"; -import { Erc1155Service } from "./services/Erc1155Service"; -import { Erc20Service } from "./services/Erc20Service"; -import { Erc721Service } from "./services/Erc721Service"; -import { KeypairService } from "./services/KeypairService"; -import { MarketplaceDirectListingsService } from "./services/MarketplaceDirectListingsService"; -import { MarketplaceEnglishAuctionsService } from "./services/MarketplaceEnglishAuctionsService"; -import { MarketplaceOffersService } from "./services/MarketplaceOffersService"; -import { PermissionsService } from "./services/PermissionsService"; -import { RelayerService } from "./services/RelayerService"; -import { TransactionService } from "./services/TransactionService"; -import { WebhooksService } from "./services/WebhooksService"; +import { AccessTokensService } from './services/AccessTokensService'; +import { AccountService } from './services/AccountService'; +import { AccountFactoryService } from './services/AccountFactoryService'; +import { BackendWalletService } from './services/BackendWalletService'; +import { ChainService } from './services/ChainService'; +import { ConfigurationService } from './services/ConfigurationService'; +import { ContractService } from './services/ContractService'; +import { ContractEventsService } from './services/ContractEventsService'; +import { ContractMetadataService } from './services/ContractMetadataService'; +import { ContractRolesService } from './services/ContractRolesService'; +import { ContractRoyaltiesService } from './services/ContractRoyaltiesService'; +import { ContractSubscriptionsService } from './services/ContractSubscriptionsService'; +import { DefaultService } from './services/DefaultService'; +import { DeployService } from './services/DeployService'; +import { Erc1155Service } from './services/Erc1155Service'; +import { Erc20Service } from './services/Erc20Service'; +import { Erc721Service } from './services/Erc721Service'; +import { KeypairService } from './services/KeypairService'; +import { MarketplaceDirectListingsService } from './services/MarketplaceDirectListingsService'; +import { MarketplaceEnglishAuctionsService } from './services/MarketplaceEnglishAuctionsService'; +import { MarketplaceOffersService } from './services/MarketplaceOffersService'; +import { PermissionsService } from './services/PermissionsService'; +import { RelayerService } from './services/RelayerService'; +import { TransactionService } from './services/TransactionService'; +import { WebhooksService } from './services/WebhooksService'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; export class Engine { - public readonly accessTokens: AccessTokensService; - public readonly account: AccountService; - public readonly accountFactory: AccountFactoryService; - public readonly backendWallet: BackendWalletService; - public readonly chain: ChainService; - public readonly configuration: ConfigurationService; - public readonly contract: ContractService; - public readonly contractEvents: ContractEventsService; - public readonly contractMetadata: ContractMetadataService; - public readonly contractRoles: ContractRolesService; - public readonly contractRoyalties: ContractRoyaltiesService; - public readonly contractSubscriptions: ContractSubscriptionsService; - public readonly default: DefaultService; - public readonly deploy: DeployService; - public readonly erc1155: Erc1155Service; - public readonly erc20: Erc20Service; - public readonly erc721: Erc721Service; - public readonly keypair: KeypairService; - public readonly marketplaceDirectListings: MarketplaceDirectListingsService; - public readonly marketplaceEnglishAuctions: MarketplaceEnglishAuctionsService; - public readonly marketplaceOffers: MarketplaceOffersService; - public readonly permissions: PermissionsService; - public readonly relayer: RelayerService; - public readonly transaction: TransactionService; - public readonly webhooks: WebhooksService; - public readonly request: BaseHttpRequest; + public readonly accessTokens: AccessTokensService; + public readonly account: AccountService; + public readonly accountFactory: AccountFactoryService; + public readonly backendWallet: BackendWalletService; + public readonly chain: ChainService; + public readonly configuration: ConfigurationService; + public readonly contract: ContractService; + public readonly contractEvents: ContractEventsService; + public readonly contractMetadata: ContractMetadataService; + public readonly contractRoles: ContractRolesService; + public readonly contractRoyalties: ContractRoyaltiesService; + public readonly contractSubscriptions: ContractSubscriptionsService; + public readonly default: DefaultService; + public readonly deploy: DeployService; + public readonly erc1155: Erc1155Service; + public readonly erc20: Erc20Service; + public readonly erc721: Erc721Service; + public readonly keypair: KeypairService; + public readonly marketplaceDirectListings: MarketplaceDirectListingsService; + public readonly marketplaceEnglishAuctions: MarketplaceEnglishAuctionsService; + public readonly marketplaceOffers: MarketplaceOffersService; + public readonly permissions: PermissionsService; + public readonly relayer: RelayerService; + public readonly transaction: TransactionService; + public readonly webhooks: WebhooksService; - constructor( - config?: Partial, - HttpRequest: HttpRequestConstructor = FetchHttpRequest, - ) { - this.request = new HttpRequest({ - BASE: config?.BASE ?? "", - VERSION: config?.VERSION ?? "1.0.0", - WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, - CREDENTIALS: config?.CREDENTIALS ?? "include", - TOKEN: config?.TOKEN, - USERNAME: config?.USERNAME, - PASSWORD: config?.PASSWORD, - HEADERS: config?.HEADERS, - ENCODE_PATH: config?.ENCODE_PATH, - }); + public readonly request: BaseHttpRequest; - this.accessTokens = new AccessTokensService(this.request); - this.account = new AccountService(this.request); - this.accountFactory = new AccountFactoryService(this.request); - this.backendWallet = new BackendWalletService(this.request); - this.chain = new ChainService(this.request); - this.configuration = new ConfigurationService(this.request); - this.contract = new ContractService(this.request); - this.contractEvents = new ContractEventsService(this.request); - this.contractMetadata = new ContractMetadataService(this.request); - this.contractRoles = new ContractRolesService(this.request); - this.contractRoyalties = new ContractRoyaltiesService(this.request); - this.contractSubscriptions = new ContractSubscriptionsService(this.request); - this.default = new DefaultService(this.request); - this.deploy = new DeployService(this.request); - this.erc1155 = new Erc1155Service(this.request); - this.erc20 = new Erc20Service(this.request); - this.erc721 = new Erc721Service(this.request); - this.keypair = new KeypairService(this.request); - this.marketplaceDirectListings = new MarketplaceDirectListingsService( - this.request, - ); - this.marketplaceEnglishAuctions = new MarketplaceEnglishAuctionsService( - this.request, - ); - this.marketplaceOffers = new MarketplaceOffersService(this.request); - this.permissions = new PermissionsService(this.request); - this.relayer = new RelayerService(this.request); - this.transaction = new TransactionService(this.request); - this.webhooks = new WebhooksService(this.request); - } + constructor(config?: Partial, HttpRequest: HttpRequestConstructor = FetchHttpRequest) { + this.request = new HttpRequest({ + BASE: config?.BASE ?? '', + VERSION: config?.VERSION ?? '1.0.0', + WITH_CREDENTIALS: config?.WITH_CREDENTIALS ?? false, + CREDENTIALS: config?.CREDENTIALS ?? 'include', + TOKEN: config?.TOKEN, + USERNAME: config?.USERNAME, + PASSWORD: config?.PASSWORD, + HEADERS: config?.HEADERS, + ENCODE_PATH: config?.ENCODE_PATH, + }); + + this.accessTokens = new AccessTokensService(this.request); + this.account = new AccountService(this.request); + this.accountFactory = new AccountFactoryService(this.request); + this.backendWallet = new BackendWalletService(this.request); + this.chain = new ChainService(this.request); + this.configuration = new ConfigurationService(this.request); + this.contract = new ContractService(this.request); + this.contractEvents = new ContractEventsService(this.request); + this.contractMetadata = new ContractMetadataService(this.request); + this.contractRoles = new ContractRolesService(this.request); + this.contractRoyalties = new ContractRoyaltiesService(this.request); + this.contractSubscriptions = new ContractSubscriptionsService(this.request); + this.default = new DefaultService(this.request); + this.deploy = new DeployService(this.request); + this.erc1155 = new Erc1155Service(this.request); + this.erc20 = new Erc20Service(this.request); + this.erc721 = new Erc721Service(this.request); + this.keypair = new KeypairService(this.request); + this.marketplaceDirectListings = new MarketplaceDirectListingsService(this.request); + this.marketplaceEnglishAuctions = new MarketplaceEnglishAuctionsService(this.request); + this.marketplaceOffers = new MarketplaceOffersService(this.request); + this.permissions = new PermissionsService(this.request); + this.relayer = new RelayerService(this.request); + this.transaction = new TransactionService(this.request); + this.webhooks = new WebhooksService(this.request); + } } diff --git a/sdk/src/core/ApiError.ts b/sdk/src/core/ApiError.ts index ebc11612f..d6b8fcc3a 100644 --- a/sdk/src/core/ApiError.ts +++ b/sdk/src/core/ApiError.ts @@ -2,28 +2,24 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super(message); + constructor(request: ApiRequestOptions, response: ApiResult, message: string) { + super(message); - this.name = "ApiError"; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = 'ApiError'; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; + } } diff --git a/sdk/src/core/ApiRequestOptions.ts b/sdk/src/core/ApiRequestOptions.ts index ac9a2ca2f..c19adcc94 100644 --- a/sdk/src/core/ApiRequestOptions.ts +++ b/sdk/src/core/ApiRequestOptions.ts @@ -3,22 +3,15 @@ /* tslint:disable */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: - | "GET" - | "PUT" - | "POST" - | "DELETE" - | "OPTIONS" - | "HEAD" - | "PATCH"; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; + readonly url: string; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record; }; diff --git a/sdk/src/core/ApiResult.ts b/sdk/src/core/ApiResult.ts index 63ed6c447..ad8fef2bc 100644 --- a/sdk/src/core/ApiResult.ts +++ b/sdk/src/core/ApiResult.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; }; diff --git a/sdk/src/core/BaseHttpRequest.ts b/sdk/src/core/BaseHttpRequest.ts index f07811512..8da3f4df7 100644 --- a/sdk/src/core/BaseHttpRequest.ts +++ b/sdk/src/core/BaseHttpRequest.ts @@ -2,12 +2,13 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { CancelablePromise } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { CancelablePromise } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; export abstract class BaseHttpRequest { - constructor(public readonly config: OpenAPIConfig) {} - public abstract request(options: ApiRequestOptions): CancelablePromise; + constructor(public readonly config: OpenAPIConfig) {} + + public abstract request(options: ApiRequestOptions): CancelablePromise; } diff --git a/sdk/src/core/CancelablePromise.ts b/sdk/src/core/CancelablePromise.ts index 45ea82a09..55fef8517 100644 --- a/sdk/src/core/CancelablePromise.ts +++ b/sdk/src/core/CancelablePromise.ts @@ -1,131 +1,131 @@ /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ - /* eslint-disable */ export class CancelError extends Error { - constructor(message: string) { - super(message); - this.name = "CancelError"; - } - - public get isCancelled(): boolean { - return true; - } + + constructor(message: string) { + super(message); + this.name = 'CancelError'; + } + + public get isCancelled(): boolean { + return true; + } } export interface OnCancel { - readonly isResolved: boolean; - readonly isRejected: boolean; - readonly isCancelled: boolean; + readonly isResolved: boolean; + readonly isRejected: boolean; + readonly isCancelled: boolean; - (cancelHandler: () => void): void; + (cancelHandler: () => void): void; } export class CancelablePromise implements Promise { - #isResolved: boolean; - #isRejected: boolean; - #isCancelled: boolean; - readonly #cancelHandlers: (() => void)[]; - readonly #promise: Promise; - #resolve?: (value: T | PromiseLike) => void; - #reject?: (reason?: any) => void; - - constructor( - executor: ( - resolve: (value: T | PromiseLike) => void, - reject: (reason?: any) => void, - onCancel: OnCancel, - ) => void, - ) { - this.#isResolved = false; - this.#isRejected = false; - this.#isCancelled = false; - this.#cancelHandlers = []; - this.#promise = new Promise((resolve, reject) => { - this.#resolve = resolve; - this.#reject = reject; - - const onResolve = (value: T | PromiseLike): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isResolved = true; - this.#resolve?.(value); - }; + #isResolved: boolean; + #isRejected: boolean; + #isCancelled: boolean; + readonly #cancelHandlers: (() => void)[]; + readonly #promise: Promise; + #resolve?: (value: T | PromiseLike) => void; + #reject?: (reason?: any) => void; + + constructor( + executor: ( + resolve: (value: T | PromiseLike) => void, + reject: (reason?: any) => void, + onCancel: OnCancel + ) => void + ) { + this.#isResolved = false; + this.#isRejected = false; + this.#isCancelled = false; + this.#cancelHandlers = []; + this.#promise = new Promise((resolve, reject) => { + this.#resolve = resolve; + this.#reject = reject; + + const onResolve = (value: T | PromiseLike): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isResolved = true; + this.#resolve?.(value); + }; + + const onReject = (reason?: any): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#isRejected = true; + this.#reject?.(reason); + }; + + const onCancel = (cancelHandler: () => void): void => { + if (this.#isResolved || this.#isRejected || this.#isCancelled) { + return; + } + this.#cancelHandlers.push(cancelHandler); + }; + + Object.defineProperty(onCancel, 'isResolved', { + get: (): boolean => this.#isResolved, + }); + + Object.defineProperty(onCancel, 'isRejected', { + get: (): boolean => this.#isRejected, + }); + + Object.defineProperty(onCancel, 'isCancelled', { + get: (): boolean => this.#isCancelled, + }); + + return executor(onResolve, onReject, onCancel as OnCancel); + }); + } - const onReject = (reason?: any): void => { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isRejected = true; - this.#reject?.(reason); - }; + get [Symbol.toStringTag]() { + return "Cancellable Promise"; + } + + public then( + onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, + onRejected?: ((reason: any) => TResult2 | PromiseLike) | null + ): Promise { + return this.#promise.then(onFulfilled, onRejected); + } + + public catch( + onRejected?: ((reason: any) => TResult | PromiseLike) | null + ): Promise { + return this.#promise.catch(onRejected); + } - const onCancel = (cancelHandler: () => void): void => { + public finally(onFinally?: (() => void) | null): Promise { + return this.#promise.finally(onFinally); + } + + public cancel(): void { if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; + return; } - this.#cancelHandlers.push(cancelHandler); - }; - - Object.defineProperty(onCancel, "isResolved", { - get: (): boolean => this.#isResolved, - }); - - Object.defineProperty(onCancel, "isRejected", { - get: (): boolean => this.#isRejected, - }); - - Object.defineProperty(onCancel, "isCancelled", { - get: (): boolean => this.#isCancelled, - }); - - return executor(onResolve, onReject, onCancel as OnCancel); - }); - } - - get [Symbol.toStringTag]() { - return "Cancellable Promise"; - } - - public then( - onFulfilled?: ((value: T) => TResult1 | PromiseLike) | null, - onRejected?: ((reason: any) => TResult2 | PromiseLike) | null, - ): Promise { - return this.#promise.then(onFulfilled, onRejected); - } - - public catch( - onRejected?: ((reason: any) => TResult | PromiseLike) | null, - ): Promise { - return this.#promise.catch(onRejected); - } - - public finally(onFinally?: (() => void) | null): Promise { - return this.#promise.finally(onFinally); - } - - public cancel(): void { - if (this.#isResolved || this.#isRejected || this.#isCancelled) { - return; - } - this.#isCancelled = true; - if (this.#cancelHandlers.length) { - try { - for (const cancelHandler of this.#cancelHandlers) { - cancelHandler(); + this.#isCancelled = true; + if (this.#cancelHandlers.length) { + try { + for (const cancelHandler of this.#cancelHandlers) { + cancelHandler(); + } + } catch (error) { + console.warn('Cancellation threw an error', error); + return; + } } - } catch (error) { - console.warn("Cancellation threw an error", error); - return; - } + this.#cancelHandlers.length = 0; + this.#reject?.(new CancelError('Request aborted')); } - this.#cancelHandlers.length = 0; - this.#reject?.(new CancelError("Request aborted")); - } - public get isCancelled(): boolean { - return this.#isCancelled; - } + public get isCancelled(): boolean { + return this.#isCancelled; + } } diff --git a/sdk/src/core/FetchHttpRequest.ts b/sdk/src/core/FetchHttpRequest.ts index 3683c4435..b1083b2a3 100644 --- a/sdk/src/core/FetchHttpRequest.ts +++ b/sdk/src/core/FetchHttpRequest.ts @@ -2,24 +2,25 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import { BaseHttpRequest } from "./BaseHttpRequest"; -import type { CancelablePromise } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; -import { request as __request } from "./request"; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import { BaseHttpRequest } from './BaseHttpRequest'; +import type { CancelablePromise } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; +import { request as __request } from './request'; export class FetchHttpRequest extends BaseHttpRequest { - constructor(config: OpenAPIConfig) { - super(config); - } - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.config, options); - } + constructor(config: OpenAPIConfig) { + super(config); + } + + /** + * Request method + * @param options The request options from the service + * @returns CancelablePromise + * @throws ApiError + */ + public override request(options: ApiRequestOptions): CancelablePromise { + return __request(this.config, options); + } } diff --git a/sdk/src/core/OpenAPI.ts b/sdk/src/core/OpenAPI.ts index 5cc0d3708..52c1bc25b 100644 --- a/sdk/src/core/OpenAPI.ts +++ b/sdk/src/core/OpenAPI.ts @@ -2,31 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { ApiRequestOptions } from "./ApiRequestOptions"; +import type { ApiRequestOptions } from './ApiRequestOptions'; type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: "include" | "omit" | "same-origin"; - TOKEN?: string | Resolver | undefined; - USERNAME?: string | Resolver | undefined; - PASSWORD?: string | Resolver | undefined; - HEADERS?: Headers | Resolver | undefined; - ENCODE_PATH?: ((path: string) => string) | undefined; + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: 'include' | 'omit' | 'same-origin'; + TOKEN?: string | Resolver | undefined; + USERNAME?: string | Resolver | undefined; + PASSWORD?: string | Resolver | undefined; + HEADERS?: Headers | Resolver | undefined; + ENCODE_PATH?: ((path: string) => string) | undefined; }; export const OpenAPI: OpenAPIConfig = { - BASE: "", - VERSION: "1.0.0", - WITH_CREDENTIALS: false, - CREDENTIALS: "include", - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, + BASE: '', + VERSION: '1.0.0', + WITH_CREDENTIALS: false, + CREDENTIALS: 'include', + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, + ENCODE_PATH: undefined, }; diff --git a/sdk/src/core/request.ts b/sdk/src/core/request.ts index 72ed0140a..b018a07ca 100644 --- a/sdk/src/core/request.ts +++ b/sdk/src/core/request.ts @@ -2,310 +2,283 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import { ApiError } from "./ApiError"; -import type { ApiRequestOptions } from "./ApiRequestOptions"; -import type { ApiResult } from "./ApiResult"; -import { CancelablePromise } from "./CancelablePromise"; -import type { OnCancel } from "./CancelablePromise"; -import type { OpenAPIConfig } from "./OpenAPI"; - -export const isDefined = ( - value: T | null | undefined, -): value is Exclude => { - return value !== undefined && value !== null; +import { ApiError } from './ApiError'; +import type { ApiRequestOptions } from './ApiRequestOptions'; +import type { ApiResult } from './ApiResult'; +import { CancelablePromise } from './CancelablePromise'; +import type { OnCancel } from './CancelablePromise'; +import type { OpenAPIConfig } from './OpenAPI'; + +export const isDefined = (value: T | null | undefined): value is Exclude => { + return value !== undefined && value !== null; }; export const isString = (value: any): value is string => { - return typeof value === "string"; + return typeof value === 'string'; }; export const isStringWithValue = (value: any): value is string => { - return isString(value) && value !== ""; + return isString(value) && value !== ''; }; export const isBlob = (value: any): value is Blob => { - return ( - typeof value === "object" && - typeof value.type === "string" && - typeof value.stream === "function" && - typeof value.arrayBuffer === "function" && - typeof value.constructor === "function" && - typeof value.constructor.name === "string" && - /^(Blob|File)$/.test(value.constructor.name) && - /^(Blob|File)$/.test(value[Symbol.toStringTag]) - ); + return ( + typeof value === 'object' && + typeof value.type === 'string' && + typeof value.stream === 'function' && + typeof value.arrayBuffer === 'function' && + typeof value.constructor === 'function' && + typeof value.constructor.name === 'string' && + /^(Blob|File)$/.test(value.constructor.name) && + /^(Blob|File)$/.test(value[Symbol.toStringTag]) + ); }; export const isFormData = (value: any): value is FormData => { - return value instanceof FormData; + return value instanceof FormData; }; export const base64 = (str: string): string => { - try { - return btoa(str); - } catch (err) { - // @ts-ignore - return Buffer.from(str).toString("base64"); - } + try { + return btoa(str); + } catch (err) { + // @ts-ignore + return Buffer.from(str).toString('base64'); + } }; export const getQueryString = (params: Record): string => { - const qs: string[] = []; + const qs: string[] = []; - const append = (key: string, value: any) => { - qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - }; + const append = (key: string, value: any) => { + qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); + }; - const process = (key: string, value: any) => { - if (isDefined(value)) { - if (Array.isArray(value)) { - value.forEach((v) => { - process(key, v); - }); - } else if (typeof value === "object") { - Object.entries(value).forEach(([k, v]) => { - process(`${key}[${k}]`, v); - }); - } else { - append(key, value); - } - } - }; + const process = (key: string, value: any) => { + if (isDefined(value)) { + if (Array.isArray(value)) { + value.forEach(v => { + process(key, v); + }); + } else if (typeof value === 'object') { + Object.entries(value).forEach(([k, v]) => { + process(`${key}[${k}]`, v); + }); + } else { + append(key, value); + } + } + }; - Object.entries(params).forEach(([key, value]) => { - process(key, value); - }); + Object.entries(params).forEach(([key, value]) => { + process(key, value); + }); - if (qs.length > 0) { - return `?${qs.join("&")}`; - } + if (qs.length > 0) { + return `?${qs.join('&')}`; + } - return ""; + return ''; }; const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { - const encoder = config.ENCODE_PATH || encodeURI; - - const path = options.url - .replace("{api-version}", config.VERSION) - .replace(/{(.*?)}/g, (substring: string, group: string) => { - if (options.path?.hasOwnProperty(group)) { - return encoder(String(options.path[group])); - } - return substring; - }); + const encoder = config.ENCODE_PATH || encodeURI; + + const path = options.url + .replace('{api-version}', config.VERSION) + .replace(/{(.*?)}/g, (substring: string, group: string) => { + if (options.path?.hasOwnProperty(group)) { + return encoder(String(options.path[group])); + } + return substring; + }); - const url = `${config.BASE}${path}`; - if (options.query) { - return `${url}${getQueryString(options.query)}`; - } - return url; + const url = `${config.BASE}${path}`; + if (options.query) { + return `${url}${getQueryString(options.query)}`; + } + return url; }; -export const getFormData = ( - options: ApiRequestOptions, -): FormData | undefined => { - if (options.formData) { - const formData = new FormData(); - - const process = (key: string, value: any) => { - if (isString(value) || isBlob(value)) { - formData.append(key, value); - } else { - formData.append(key, JSON.stringify(value)); - } - }; +export const getFormData = (options: ApiRequestOptions): FormData | undefined => { + if (options.formData) { + const formData = new FormData(); - Object.entries(options.formData) - .filter(([_, value]) => isDefined(value)) - .forEach(([key, value]) => { - if (Array.isArray(value)) { - value.forEach((v) => process(key, v)); - } else { - process(key, value); - } - }); + const process = (key: string, value: any) => { + if (isString(value) || isBlob(value)) { + formData.append(key, value); + } else { + formData.append(key, JSON.stringify(value)); + } + }; - return formData; - } - return undefined; + Object.entries(options.formData) + .filter(([_, value]) => isDefined(value)) + .forEach(([key, value]) => { + if (Array.isArray(value)) { + value.forEach(v => process(key, v)); + } else { + process(key, value); + } + }); + + return formData; + } + return undefined; }; type Resolver = (options: ApiRequestOptions) => Promise; -export const resolve = async ( - options: ApiRequestOptions, - resolver?: T | Resolver, -): Promise => { - if (typeof resolver === "function") { - return (resolver as Resolver)(options); - } - return resolver; +export const resolve = async (options: ApiRequestOptions, resolver?: T | Resolver): Promise => { + if (typeof resolver === 'function') { + return (resolver as Resolver)(options); + } + return resolver; }; -export const getHeaders = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, -): Promise => { - const token = await resolve(options, config.TOKEN); - const username = await resolve(options, config.USERNAME); - const password = await resolve(options, config.PASSWORD); - const additionalHeaders = await resolve(options, config.HEADERS); - - const headers = Object.entries({ - Accept: "application/json", - ...additionalHeaders, - ...options.headers, - }) - .filter(([_, value]) => isDefined(value)) - .reduce( - (headers, [key, value]) => ({ - ...headers, - [key]: String(value), - }), - {} as Record, - ); +export const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Promise => { + const token = await resolve(options, config.TOKEN); + const username = await resolve(options, config.USERNAME); + const password = await resolve(options, config.PASSWORD); + const additionalHeaders = await resolve(options, config.HEADERS); + + const headers = Object.entries({ + Accept: 'application/json', + ...additionalHeaders, + ...options.headers, + }) + .filter(([_, value]) => isDefined(value)) + .reduce((headers, [key, value]) => ({ + ...headers, + [key]: String(value), + }), {} as Record); + + if (isStringWithValue(token)) { + headers['Authorization'] = `Bearer ${token}`; + } - if (isStringWithValue(token)) { - headers["Authorization"] = `Bearer ${token}`; - } - - if (isStringWithValue(username) && isStringWithValue(password)) { - const credentials = base64(`${username}:${password}`); - headers["Authorization"] = `Basic ${credentials}`; - } - - if (options.body) { - if (options.mediaType) { - headers["Content-Type"] = options.mediaType; - } else if (isBlob(options.body)) { - headers["Content-Type"] = options.body.type || "application/octet-stream"; - } else if (isString(options.body)) { - headers["Content-Type"] = "text/plain"; - } else if (!isFormData(options.body)) { - headers["Content-Type"] = "application/json"; + if (isStringWithValue(username) && isStringWithValue(password)) { + const credentials = base64(`${username}:${password}`); + headers['Authorization'] = `Basic ${credentials}`; } - } - return new Headers(headers); + if (options.body) { + if (options.mediaType) { + headers['Content-Type'] = options.mediaType; + } else if (isBlob(options.body)) { + headers['Content-Type'] = options.body.type || 'application/octet-stream'; + } else if (isString(options.body)) { + headers['Content-Type'] = 'text/plain'; + } else if (!isFormData(options.body)) { + headers['Content-Type'] = 'application/json'; + } + } + + return new Headers(headers); }; export const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body !== undefined) { - if (options.mediaType?.includes("/json")) { - return JSON.stringify(options.body); - } else if ( - isString(options.body) || - isBlob(options.body) || - isFormData(options.body) - ) { - return options.body; - } else { - return JSON.stringify(options.body); + if (options.body !== undefined) { + if (options.mediaType?.includes('/json')) { + return JSON.stringify(options.body) + } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) { + return options.body; + } else { + return JSON.stringify(options.body); + } } - } - return undefined; + return undefined; }; export const sendRequest = async ( - config: OpenAPIConfig, - options: ApiRequestOptions, - url: string, - body: any, - formData: FormData | undefined, - headers: Headers, - onCancel: OnCancel, + config: OpenAPIConfig, + options: ApiRequestOptions, + url: string, + body: any, + formData: FormData | undefined, + headers: Headers, + onCancel: OnCancel ): Promise => { - const controller = new AbortController(); + const controller = new AbortController(); - const request: RequestInit = { - headers, - body: body ?? formData, - method: options.method, - signal: controller.signal, - }; + const request: RequestInit = { + headers, + body: body ?? formData, + method: options.method, + signal: controller.signal, + }; - if (config.WITH_CREDENTIALS) { - request.credentials = config.CREDENTIALS; - } + if (config.WITH_CREDENTIALS) { + request.credentials = config.CREDENTIALS; + } - onCancel(() => controller.abort()); + onCancel(() => controller.abort()); - return await fetch(url, request); + return await fetch(url, request); }; -export const getResponseHeader = ( - response: Response, - responseHeader?: string, -): string | undefined => { - if (responseHeader) { - const content = response.headers.get(responseHeader); - if (isString(content)) { - return content; +export const getResponseHeader = (response: Response, responseHeader?: string): string | undefined => { + if (responseHeader) { + const content = response.headers.get(responseHeader); + if (isString(content)) { + return content; + } } - } - return undefined; + return undefined; }; export const getResponseBody = async (response: Response): Promise => { - if (response.status !== 204) { - try { - const contentType = response.headers.get("Content-Type"); - if (contentType) { - const jsonTypes = ["application/json", "application/problem+json"]; - const isJSON = jsonTypes.some((type) => - contentType.toLowerCase().startsWith(type), - ); - if (isJSON) { - return await response.json(); - } else { - return await response.text(); + if (response.status !== 204) { + try { + const contentType = response.headers.get('Content-Type'); + if (contentType) { + const jsonTypes = ['application/json', 'application/problem+json'] + const isJSON = jsonTypes.some(type => contentType.toLowerCase().startsWith(type)); + if (isJSON) { + return await response.json(); + } else { + return await response.text(); + } + } + } catch (error) { + console.error(error); } - } - } catch (error) { - console.error(error); } - } - return undefined; + return undefined; }; -export const catchErrorCodes = ( - options: ApiRequestOptions, - result: ApiResult, -): void => { - const errors: Record = { - 400: "Bad Request", - 401: "Unauthorized", - 403: "Forbidden", - 404: "Not Found", - 500: "Internal Server Error", - 502: "Bad Gateway", - 503: "Service Unavailable", - ...options.errors, - }; - - const error = errors[result.status]; - if (error) { - throw new ApiError(options, result, error); - } - - if (!result.ok) { - const errorStatus = result.status ?? "unknown"; - const errorStatusText = result.statusText ?? "unknown"; - const errorBody = (() => { - try { - return JSON.stringify(result.body, null, 2); - } catch (e) { - return undefined; - } - })(); - - throw new ApiError( - options, - result, - `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`, - ); - } +export const catchErrorCodes = (options: ApiRequestOptions, result: ApiResult): void => { + const errors: Record = { + 400: 'Bad Request', + 401: 'Unauthorized', + 403: 'Forbidden', + 404: 'Not Found', + 500: 'Internal Server Error', + 502: 'Bad Gateway', + 503: 'Service Unavailable', + ...options.errors, + } + + const error = errors[result.status]; + if (error) { + throw new ApiError(options, result, error); + } + + if (!result.ok) { + const errorStatus = result.status ?? 'unknown'; + const errorStatusText = result.statusText ?? 'unknown'; + const errorBody = (() => { + try { + return JSON.stringify(result.body, null, 2); + } catch (e) { + return undefined; + } + })(); + + throw new ApiError(options, result, + `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}` + ); + } }; /** @@ -315,47 +288,33 @@ export const catchErrorCodes = ( * @returns CancelablePromise * @throws ApiError */ -export const request = ( - config: OpenAPIConfig, - options: ApiRequestOptions, -): CancelablePromise => { - return new CancelablePromise(async (resolve, reject, onCancel) => { - try { - const url = getUrl(config, options); - const formData = getFormData(options); - const body = getRequestBody(options); - const headers = await getHeaders(config, options); - - if (!onCancel.isCancelled) { - const response = await sendRequest( - config, - options, - url, - body, - formData, - headers, - onCancel, - ); - const responseBody = await getResponseBody(response); - const responseHeader = getResponseHeader( - response, - options.responseHeader, - ); - - const result: ApiResult = { - url, - ok: response.ok, - status: response.status, - statusText: response.statusText, - body: responseHeader ?? responseBody, - }; - - catchErrorCodes(options, result); - - resolve(result.body); - } - } catch (error) { - reject(error); - } - }); +export const request = (config: OpenAPIConfig, options: ApiRequestOptions): CancelablePromise => { + return new CancelablePromise(async (resolve, reject, onCancel) => { + try { + const url = getUrl(config, options); + const formData = getFormData(options); + const body = getRequestBody(options); + const headers = await getHeaders(config, options); + + if (!onCancel.isCancelled) { + const response = await sendRequest(config, options, url, body, formData, headers, onCancel); + const responseBody = await getResponseBody(response); + const responseHeader = getResponseHeader(response, options.responseHeader); + + const result: ApiResult = { + url, + ok: response.ok, + status: response.status, + statusText: response.statusText, + body: responseHeader ?? responseBody, + }; + + catchErrorCodes(options, result); + + resolve(result.body); + } + } catch (error) { + reject(error); + } + }); }; diff --git a/sdk/src/index.ts b/sdk/src/index.ts index 13c025fc8..bb6705eab 100644 --- a/sdk/src/index.ts +++ b/sdk/src/index.ts @@ -2,36 +2,36 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { Engine } from "./Engine"; +export { Engine } from './Engine'; -export { ApiError } from "./core/ApiError"; -export { BaseHttpRequest } from "./core/BaseHttpRequest"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI } from "./core/OpenAPI"; -export type { OpenAPIConfig } from "./core/OpenAPI"; +export { ApiError } from './core/ApiError'; +export { BaseHttpRequest } from './core/BaseHttpRequest'; +export { CancelablePromise, CancelError } from './core/CancelablePromise'; +export { OpenAPI } from './core/OpenAPI'; +export type { OpenAPIConfig } from './core/OpenAPI'; -export { AccessTokensService } from "./services/AccessTokensService"; -export { AccountService } from "./services/AccountService"; -export { AccountFactoryService } from "./services/AccountFactoryService"; -export { BackendWalletService } from "./services/BackendWalletService"; -export { ChainService } from "./services/ChainService"; -export { ConfigurationService } from "./services/ConfigurationService"; -export { ContractService } from "./services/ContractService"; -export { ContractEventsService } from "./services/ContractEventsService"; -export { ContractMetadataService } from "./services/ContractMetadataService"; -export { ContractRolesService } from "./services/ContractRolesService"; -export { ContractRoyaltiesService } from "./services/ContractRoyaltiesService"; -export { ContractSubscriptionsService } from "./services/ContractSubscriptionsService"; -export { DefaultService } from "./services/DefaultService"; -export { DeployService } from "./services/DeployService"; -export { Erc1155Service } from "./services/Erc1155Service"; -export { Erc20Service } from "./services/Erc20Service"; -export { Erc721Service } from "./services/Erc721Service"; -export { KeypairService } from "./services/KeypairService"; -export { MarketplaceDirectListingsService } from "./services/MarketplaceDirectListingsService"; -export { MarketplaceEnglishAuctionsService } from "./services/MarketplaceEnglishAuctionsService"; -export { MarketplaceOffersService } from "./services/MarketplaceOffersService"; -export { PermissionsService } from "./services/PermissionsService"; -export { RelayerService } from "./services/RelayerService"; -export { TransactionService } from "./services/TransactionService"; -export { WebhooksService } from "./services/WebhooksService"; +export { AccessTokensService } from './services/AccessTokensService'; +export { AccountService } from './services/AccountService'; +export { AccountFactoryService } from './services/AccountFactoryService'; +export { BackendWalletService } from './services/BackendWalletService'; +export { ChainService } from './services/ChainService'; +export { ConfigurationService } from './services/ConfigurationService'; +export { ContractService } from './services/ContractService'; +export { ContractEventsService } from './services/ContractEventsService'; +export { ContractMetadataService } from './services/ContractMetadataService'; +export { ContractRolesService } from './services/ContractRolesService'; +export { ContractRoyaltiesService } from './services/ContractRoyaltiesService'; +export { ContractSubscriptionsService } from './services/ContractSubscriptionsService'; +export { DefaultService } from './services/DefaultService'; +export { DeployService } from './services/DeployService'; +export { Erc1155Service } from './services/Erc1155Service'; +export { Erc20Service } from './services/Erc20Service'; +export { Erc721Service } from './services/Erc721Service'; +export { KeypairService } from './services/KeypairService'; +export { MarketplaceDirectListingsService } from './services/MarketplaceDirectListingsService'; +export { MarketplaceEnglishAuctionsService } from './services/MarketplaceEnglishAuctionsService'; +export { MarketplaceOffersService } from './services/MarketplaceOffersService'; +export { PermissionsService } from './services/PermissionsService'; +export { RelayerService } from './services/RelayerService'; +export { TransactionService } from './services/TransactionService'; +export { WebhooksService } from './services/WebhooksService'; diff --git a/sdk/src/services/AccessTokensService.ts b/sdk/src/services/AccessTokensService.ts index 595acb586..e01ce2764 100644 --- a/sdk/src/services/AccessTokensService.ts +++ b/sdk/src/services/AccessTokensService.ts @@ -2,128 +2,138 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class AccessTokensService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all access tokens - * Get all access tokens - * @returns any Default Response - * @throws ApiError - */ - public listAccessTokens(): CancelablePromise<{ - result: Array<{ - id: string; - tokenMask: string; - /** - * A contract or wallet address - */ - walletAddress: string; - createdAt: string; - expiresAt: string; - label: string | null; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/auth/access-tokens/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Create a new access token - * Create a new access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public createAccessToken(requestBody?: { - label?: string; - }): CancelablePromise<{ - result: { - id: string; - tokenMask: string; - /** - * A contract or wallet address - */ - walletAddress: string; - createdAt: string; - expiresAt: string; - label: string | null; - accessToken: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/access-tokens/create", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all access tokens + * Get all access tokens + * @returns any Default Response + * @throws ApiError + */ + public listAccessTokens(): CancelablePromise<{ +result: Array<{ +id: string; +tokenMask: string; +/** + * A contract or wallet address + */ +walletAddress: string; +createdAt: string; +expiresAt: string; +label: (string | null); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/auth/access-tokens/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke an access token - * Revoke an access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeAccessTokens(requestBody: { id: string }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/access-tokens/revoke", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create a new access token + * Create a new access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public createAccessToken( +requestBody?: { +label?: string; +}, +): CancelablePromise<{ +result: { +id: string; +tokenMask: string; +/** + * A contract or wallet address + */ +walletAddress: string; +createdAt: string; +expiresAt: string; +label: (string | null); +accessToken: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/access-tokens/create', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke an access token + * Revoke an access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeAccessTokens( +requestBody: { +id: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/access-tokens/revoke', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update an access token + * Update an access token + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateAccessTokens( +requestBody: { +id: string; +label?: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/access-tokens/update', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update an access token - * Update an access token - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateAccessTokens(requestBody: { - id: string; - label?: string; - }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/access-tokens/update", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/AccountFactoryService.ts b/sdk/src/services/AccountFactoryService.ts index 624621317..2787e8d5d 100644 --- a/sdk/src/services/AccountFactoryService.ts +++ b/sdk/src/services/AccountFactoryService.ts @@ -2,256 +2,252 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class AccountFactoryService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all smart accounts - * Get all the smart accounts for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAllAccounts( - chain: string, - contractAddress: string, - ): CancelablePromise<{ + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * Get all smart accounts + * Get all the smart accounts for this account factory. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAllAccounts( +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The account addresses of all the accounts in this factory + */ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account-factory/get-all-accounts', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * The account addresses of all the accounts in this factory + * Get associated smart accounts + * Get all the smart accounts for this account factory associated with the specific admin wallet. + * @param signerAddress The address of the signer to get associated accounts from + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account-factory/get-all-accounts", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getAssociatedAccounts( +signerAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The account addresses of all the accounts with a specific signer in this factory + */ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'signerAddress': signerAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get associated smart accounts - * Get all the smart accounts for this account factory associated with the specific admin wallet. - * @param signerAddress The address of the signer to get associated accounts from - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAssociatedAccounts( - signerAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ /** - * The account addresses of all the accounts with a specific signer in this factory + * Check if deployed + * Check if a smart account has been deployed to the blockchain. + * @param adminAddress The address of the admin to check if the account address is deployed + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param extraData Extra data to use in predicting the account address + * @returns any Default Response + * @throws ApiError */ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - signerAddress: signerAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public isAccountDeployed( +adminAddress: string, +chain: string, +contractAddress: string, +extraData?: string, +): CancelablePromise<{ +/** + * Whether or not the account has been deployed + */ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account-factory/is-account-deployed', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'adminAddress': adminAddress, + 'extraData': extraData, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if deployed - * Check if a smart account has been deployed to the blockchain. - * @param adminAddress The address of the admin to check if the account address is deployed - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param extraData Extra data to use in predicting the account address - * @returns any Default Response - * @throws ApiError - */ - public isAccountDeployed( - adminAddress: string, - chain: string, - contractAddress: string, - extraData?: string, - ): CancelablePromise<{ /** - * Whether or not the account has been deployed + * Predict smart account address + * Get the counterfactual address of a smart account. + * @param adminAddress The address of the admin to predict the account address for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param extraData Extra data (account salt) to add to use in predicting the account address + * @returns any Default Response + * @throws ApiError */ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account-factory/is-account-deployed", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - adminAddress: adminAddress, - extraData: extraData, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public predictAccountAddress( +adminAddress: string, +chain: string, +contractAddress: string, +extraData?: string, +): CancelablePromise<{ +/** + * New account counter-factual address. + */ +result: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account-factory/predict-account-address', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'adminAddress': adminAddress, + 'extraData': extraData, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Predict smart account address - * Get the counterfactual address of a smart account. - * @param adminAddress The address of the admin to predict the account address for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param extraData Extra data (account salt) to add to use in predicting the account address - * @returns any Default Response - * @throws ApiError - */ - public predictAccountAddress( - adminAddress: string, - chain: string, - contractAddress: string, - extraData?: string, - ): CancelablePromise<{ /** - * New account counter-factual address. + * Create smart account + * Create a smart account for this account factory. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError */ - result: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account-factory/predict-account-address", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - adminAddress: adminAddress, - extraData: extraData, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public createAccount( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The admin address to create an account for + */ +adminAddress: string; +/** + * Extra data to add to use in creating the account address + */ +extraData?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account-factory/create-account', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create smart account - * Create a smart account for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public createAccount( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The admin address to create an account for - */ - adminAddress: string; - /** - * Extra data to add to use in creating the account address - */ - extraData?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account-factory/create-account", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 3cc2d8b3b..6369ba214 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -2,552 +2,524 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class AccountService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all admins - * Get all admins for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAllAdmins( - chain: string, - contractAddress: string, - ): CancelablePromise<{ + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** - * The address of the admins on this account + * Get all admins + * Get all admins for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account/admins/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getAllAdmins( +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The address of the admins on this account + */ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account/admins/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all session keys - * Get all session keys for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAllSessions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - signerAddress: string; - startDate: string; - expirationDate: string; - nativeTokenLimitPerTransaction: string; - approvedCallTargets: Array; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/account/sessions/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all session keys + * Get all session keys for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAllSessions( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +/** + * A contract or wallet address + */ +signerAddress: string; +startDate: string; +expirationDate: string; +nativeTokenLimitPerTransaction: string; +approvedCallTargets: Array; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/account/sessions/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Grant admin - * Grant a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public grantAccountAdmin( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to grant admin permissions to - */ - signerAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account/admins/grant", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Grant admin + * Grant a smart account's admin permission. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public grantAccountAdmin( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to grant admin permissions to + */ +signerAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account/admins/grant', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke admin + * Revoke a smart account's admin permission. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeAccountAdmin( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to revoke admin permissions from + */ +walletAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account/admins/revoke', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke admin - * Revoke a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeAccountAdmin( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to revoke admin permissions from - */ - walletAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account/admins/revoke", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create session key + * Create a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public grantAccountSession( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +signerAddress: string; +startDate: string; +expirationDate: string; +nativeTokenLimitPerTransaction: string; +approvedCallTargets: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account/sessions/create', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create session key - * Create a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public grantAccountSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - signerAddress: string; - startDate: string; - expirationDate: string; - nativeTokenLimitPerTransaction: string; - approvedCallTargets: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account/sessions/create", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke session key + * Revoke a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeAccountSession( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to revoke session from + */ +walletAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account/sessions/revoke', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke session key - * Revoke a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeAccountSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to revoke session from - */ - walletAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account/sessions/revoke", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update session key + * Update a session key for a smart account. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public updateAccountSession( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +signerAddress: string; +approvedCallTargets: Array; +startDate?: string; +expirationDate?: string; +nativeTokenLimitPerTransaction?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/account/sessions/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update session key - * Update a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public updateAccountSession( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - signerAddress: string; - approvedCallTargets: Array; - startDate?: string; - expirationDate?: string; - nativeTokenLimitPerTransaction?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/account/sessions/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/BackendWalletService.ts b/sdk/src/services/BackendWalletService.ts index e8d0a049c..1ccad8f2d 100644 --- a/sdk/src/services/BackendWalletService.ts +++ b/sdk/src/services/BackendWalletService.ts @@ -2,1079 +2,1041 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class BackendWalletService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Create backend wallet - * Create a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public create(requestBody?: { - label?: string; + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** - * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default - * wallet type will be used. + * Create backend wallet + * Create a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - type?: - | "local" - | "aws-kms" - | "gcp-kms" - | "smart:aws-kms" - | "smart:gcp-kms" - | "smart:local"; - }): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - type: - | "local" - | "aws-kms" - | "gcp-kms" - | "smart:aws-kms" - | "smart:gcp-kms" - | "smart:local"; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/create", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public create( +requestBody?: { +label?: string; +/** + * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. + */ +type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +}, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/create', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove backend wallet - * Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are - * transferred out before removing a local wallet. - * @param walletAddress A contract or wallet address - * @returns any Default Response - * @throws ApiError - */ - public removeBackendWallet(walletAddress: string): CancelablePromise<{ - result: { - status: string; - }; - }> { - return this.httpRequest.request({ - method: "DELETE", - url: "/backend-wallet/{walletAddress}", - path: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Remove backend wallet + * Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are transferred out before removing a local wallet. + * @param walletAddress A contract or wallet address + * @returns any Default Response + * @throws ApiError + */ + public removeBackendWallet( +walletAddress: string, +): CancelablePromise<{ +result: { +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'DELETE', + url: '/backend-wallet/{walletAddress}', + path: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Import backend wallet - * Import an existing wallet as a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public import( - requestBody?: { - /** - * Optional label for the imported wallet - */ - label?: string; - } & ( - | { - /** - * AWS KMS key ARN - */ - awsKmsArn: string; - /** - * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be - * used (if available). - */ - credentials?: { - /** - * AWS Access Key ID - */ - awsAccessKeyId: string; - /** - * AWS Secret Access Key - */ - awsSecretAccessKey: string; - }; - } - | { - /** - * GCP KMS key ID - */ - gcpKmsKeyId: string; - /** - * GCP KMS key version ID - */ - gcpKmsKeyVersionId: string; - /** - * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be - * used (if available). - */ - credentials?: { - /** - * GCP service account email - */ - email: string; - /** - * GCP service account private key - */ - privateKey: string; - }; - } - | { - /** - * The private key of the wallet to import - */ - privateKey: string; - } - | { - /** - * The mnemonic phrase of the wallet to import - */ - mnemonic: string; - } - | { - /** - * The encrypted JSON of the wallet to import - */ - encryptedJson: string; - /** - * The password used to encrypt the encrypted JSON - */ - password: string; - } - ), - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/import", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Import backend wallet + * Import an existing wallet as a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public import( +requestBody?: ({ +/** + * Optional label for the imported wallet + */ +label?: string; +} & ({ +/** + * AWS KMS key ARN + */ +awsKmsArn: string; +/** + * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). + */ +credentials?: { +/** + * AWS Access Key ID + */ +awsAccessKeyId: string; +/** + * AWS Secret Access Key + */ +awsSecretAccessKey: string; +}; +} | { +/** + * GCP KMS key ID + */ +gcpKmsKeyId: string; +/** + * GCP KMS key version ID + */ +gcpKmsKeyVersionId: string; +/** + * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). + */ +credentials?: { +/** + * GCP service account email + */ +email: string; +/** + * GCP service account private key + */ +privateKey: string; +}; +} | { +/** + * The private key of the wallet to import + */ +privateKey: string; +} | { +/** + * The mnemonic phrase of the wallet to import + */ +mnemonic: string; +} | { +/** + * The encrypted JSON of the wallet to import + */ +encryptedJson: string; +/** + * The password used to encrypt the encrypted JSON + */ +password: string; +})), +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/import', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update backend wallet - * Update a backend wallet. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public update(requestBody: { /** - * A contract or wallet address + * Update backend wallet + * Update a backend wallet. + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - walletAddress: string; - label?: string; - }): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - status: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/update", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public update( +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +label?: string; +}, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/update', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get balance - * Get the native balance for a backend wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @returns any Default Response - * @throws ApiError - */ - public getBalance( - chain: string, - walletAddress: string, - ): CancelablePromise<{ - result: { - /** - * A contract or wallet address - */ - walletAddress: string; - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/backend-wallet/{chain}/{walletAddress}/get-balance", - path: { - chain: chain, - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get balance + * Get the native balance for a backend wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @returns any Default Response + * @throws ApiError + */ + public getBalance( +chain: string, +walletAddress: string, +): CancelablePromise<{ +result: { +/** + * A contract or wallet address + */ +walletAddress: string; +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/backend-wallet/{chain}/{walletAddress}/get-balance', + path: { + 'chain': chain, + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all backend wallets - * Get all backend wallets. - * @param page The page of wallets to get. - * @param limit The number of wallets to get per page. - * @returns any Default Response - * @throws ApiError - */ - public getAll( - page: number = 1, - limit: number = 10, - ): CancelablePromise<{ - result: Array<{ - /** - * Wallet Address - */ - address: string; - /** - * Wallet Type - */ - type: string; - label: string | null; - awsKmsKeyId: string | null; - awsKmsArn: string | null; - gcpKmsKeyId: string | null; - gcpKmsKeyRingId: string | null; - gcpKmsLocationId: string | null; - gcpKmsKeyVersionId: string | null; - gcpKmsResourcePath: string | null; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/backend-wallet/get-all", - query: { - page: page, - limit: limit, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all backend wallets + * Get all backend wallets. + * @param page The page of wallets to get. + * @param limit The number of wallets to get per page. + * @returns any Default Response + * @throws ApiError + */ + public getAll( +page: number = 1, +limit: number = 10, +): CancelablePromise<{ +result: Array<{ +/** + * Wallet Address + */ +address: string; +/** + * Wallet Type + */ +type: string; +label: (string | null); +awsKmsKeyId: (string | null); +awsKmsArn: (string | null); +gcpKmsKeyId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyVersionId: (string | null); +gcpKmsResourcePath: (string | null); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/backend-wallet/get-all', + query: { + 'page': page, + 'limit': limit, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens - * Transfer native currency or ERC20 tokens to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public transfer( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient wallet address. - */ - to: string; - /** - * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). - */ - currencyAddress?: string; - /** - * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/{chain}/transfer", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens + * Transfer native currency or ERC20 tokens to another wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public transfer( +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient wallet address. + */ +to: string; +/** + * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). + */ +currencyAddress?: string; +/** + * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/transfer', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Withdraw funds + * Withdraw all funds from this wallet to another wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public withdraw( +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address to withdraw all funds to + */ +toAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +/** + * An amount in native token (decimals allowed). Example: "0.1" + */ +amount: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/withdraw', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Withdraw funds - * Withdraw all funds from this wallet to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public withdraw( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address to withdraw all funds to - */ - toAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - /** - * An amount in native token (decimals allowed). Example: "0.1" - */ - amount: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/{chain}/withdraw", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a transaction + * Send a transaction with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public sendTransaction( +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * A contract or wallet address + */ +toAddress?: string; +data: string; +value: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/send-transaction', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a transaction - * Send a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public sendTransaction( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * A contract or wallet address - */ - toAddress?: string; - data: string; - value: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/{chain}/send-transaction", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a batch of raw transactions + * Send a batch of raw transactions with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public sendTransactionBatch( +chain: string, +xBackendWalletAddress: string, +xIdempotencyKey?: string, +requestBody?: Array<{ +/** + * A contract or wallet address + */ +toAddress?: string; +data: string; +value: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}>, +): CancelablePromise<{ +result: { +queueIds: Array; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/send-transaction-batch', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a batch of raw transactions - * Send a batch of raw transactions with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public sendTransactionBatch( - chain: string, - xBackendWalletAddress: string, - xIdempotencyKey?: string, - requestBody?: Array<{ - /** - * A contract or wallet address - */ - toAddress?: string; - data: string; - value: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }>, - ): CancelablePromise<{ - result: { - queueIds: Array; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/{chain}/send-transaction-batch", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign a transaction + * Sign a transaction + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signTransaction( +xBackendWalletAddress: string, +requestBody: { +transaction: { +to?: string; +nonce?: string; +gasLimit?: string; +gasPrice?: string; +data?: string; +value?: string; +chainId?: number; +type?: number; +accessList?: any; +maxFeePerGas?: string; +maxPriorityFeePerGas?: string; +ccipReadEnabled?: boolean; +}; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/sign-transaction', + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign a transaction - * Sign a transaction - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signTransaction( - xBackendWalletAddress: string, - requestBody: { - transaction: { - to?: string; - nonce?: string; - gasLimit?: string; - gasPrice?: string; - data?: string; - value?: string; - chainId?: number; - type?: number; - accessList?: any; - maxFeePerGas?: string; - maxPriorityFeePerGas?: string; - ccipReadEnabled?: boolean; - }; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/sign-transaction", - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign a message + * Send a message + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signMessage( +xBackendWalletAddress: string, +requestBody: { +message: string; +isBytes?: boolean; +chainId?: number; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/sign-message', + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign a message - * Send a message - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signMessage( - xBackendWalletAddress: string, - requestBody: { - message: string; - isBytes?: boolean; - chainId?: number; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/sign-message", - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Sign an EIP-712 message + * Send an EIP-712 message ("typed data") + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @returns any Default Response + * @throws ApiError + */ + public signTypedData( +xBackendWalletAddress: string, +requestBody: { +domain: Record; +types: Record; +value: Record; +}, +xIdempotencyKey?: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/sign-typed-data', + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Sign an EIP-712 message - * Send an EIP-712 message ("typed data") - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @returns any Default Response - * @throws ApiError - */ - public signTypedData( - xBackendWalletAddress: string, - requestBody: { - domain: Record; - types: Record; - value: Record; - }, - xIdempotencyKey?: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/sign-typed-data", - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get recent transactions + * Get recent transactions for this backend wallet. + * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @param page Specify the page number. + * @param limit Specify the number of results to return per page. + * @returns any Default Response + * @throws ApiError + */ + public getTransactionsForBackendWallet( +status: ('queued' | 'mined' | 'cancelled' | 'errored'), +chain: string, +walletAddress: string, +page: number = 1, +limit: number = 100, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/backend-wallet/{chain}/{walletAddress}/get-all-transactions', + path: { + 'chain': chain, + 'walletAddress': walletAddress, + }, + query: { + 'page': page, + 'limit': limit, + 'status': status, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get recent transactions - * Get recent transactions for this backend wallet. - * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @param page Specify the page number. - * @param limit Specify the number of results to return per page. - * @returns any Default Response - * @throws ApiError - */ - public getTransactionsForBackendWallet( - status: "queued" | "mined" | "cancelled" | "errored", - chain: string, - walletAddress: string, - page: number = 1, - limit: number = 100, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: string | null; - /** - * The current state of the transaction. - */ - status: "queued" | "sent" | "mined" | "errored" | "cancelled"; - chainId: string | null; - fromAddress: string | null; - toAddress: string | null; - data: string | null; - extension: string | null; - value: string | null; - nonce: number | string | null; - gasLimit: string | null; - gasPrice: string | null; - maxFeePerGas: string | null; - maxPriorityFeePerGas: string | null; - transactionType: number | null; - transactionHash: string | null; - queuedAt: string | null; - sentAt: string | null; - minedAt: string | null; - cancelledAt: string | null; - deployedContractAddress: string | null; - deployedContractType: string | null; - errorMessage: string | null; - sentAtBlockNumber: number | null; - blockNumber: number | null; - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: boolean | null; - retryMaxFeePerGas: string | null; - retryMaxPriorityFeePerGas: string | null; - signerAddress: string | null; - accountAddress: string | null; - accountSalt: string | null; - accountFactoryAddress: string | null; - target: string | null; - sender: string | null; - initCode: string | null; - callData: string | null; - callGasLimit: string | null; - verificationGasLimit: string | null; - preVerificationGas: string | null; - paymasterAndData: string | null; - userOpHash: string | null; - functionName: string | null; - functionArgs: string | null; - onChainTxStatus: number | null; - onchainStatus: "success" | "reverted" | null; - effectiveGasPrice: string | null; - cumulativeGasUsed: string | null; - }>; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/backend-wallet/{chain}/{walletAddress}/get-all-transactions", - path: { - chain: chain, - walletAddress: walletAddress, - }, - query: { - page: page, - limit: limit, - status: status, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get recent transactions by nonce + * Get recent transactions for this backend wallet, sorted by descending nonce. + * @param fromNonce The earliest nonce, inclusive. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. + * @returns any Default Response + * @throws ApiError + */ + public getTransactionsForBackendWalletByNonce( +fromNonce: number, +chain: string, +walletAddress: string, +toNonce?: number, +): CancelablePromise<{ +result: Array<{ +nonce: number; +transaction: ({ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +} | string); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce', + path: { + 'chain': chain, + 'walletAddress': walletAddress, + }, + query: { + 'fromNonce': fromNonce, + 'toNonce': toNonce, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get recent transactions by nonce - * Get recent transactions for this backend wallet, sorted by descending nonce. - * @param fromNonce The earliest nonce, inclusive. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. - * @returns any Default Response - * @throws ApiError - */ - public getTransactionsForBackendWalletByNonce( - fromNonce: number, - chain: string, - walletAddress: string, - toNonce?: number, - ): CancelablePromise<{ - result: Array<{ - nonce: number; - transaction: - | { - queueId: string | null; - /** - * The current state of the transaction. - */ - status: "queued" | "sent" | "mined" | "errored" | "cancelled"; - chainId: string | null; - fromAddress: string | null; - toAddress: string | null; - data: string | null; - extension: string | null; - value: string | null; - nonce: number | string | null; - gasLimit: string | null; - gasPrice: string | null; - maxFeePerGas: string | null; - maxPriorityFeePerGas: string | null; - transactionType: number | null; - transactionHash: string | null; - queuedAt: string | null; - sentAt: string | null; - minedAt: string | null; - cancelledAt: string | null; - deployedContractAddress: string | null; - deployedContractType: string | null; - errorMessage: string | null; - sentAtBlockNumber: number | null; - blockNumber: number | null; - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: boolean | null; - retryMaxFeePerGas: string | null; - retryMaxPriorityFeePerGas: string | null; - signerAddress: string | null; - accountAddress: string | null; - accountSalt: string | null; - accountFactoryAddress: string | null; - target: string | null; - sender: string | null; - initCode: string | null; - callData: string | null; - callGasLimit: string | null; - verificationGasLimit: string | null; - preVerificationGas: string | null; - paymasterAndData: string | null; - userOpHash: string | null; - functionName: string | null; - functionArgs: string | null; - onChainTxStatus: number | null; - onchainStatus: "success" | "reverted" | null; - effectiveGasPrice: string | null; - cumulativeGasUsed: string | null; - } - | string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce", - path: { - chain: chain, - walletAddress: walletAddress, - }, - query: { - fromNonce: fromNonce, - toNonce: toNonce, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Reset nonces + * Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens. + * @returns any Default Response + * @throws ApiError + */ + public resetNonces(): CancelablePromise<{ +result: { +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/reset-nonces', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Reset nonces - * Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens. - * @returns any Default Response - * @throws ApiError - */ - public resetNonces(): CancelablePromise<{ - result: { - status: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/reset-nonces", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get nonce + * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param walletAddress Backend wallet address + * @returns any Default Response + * @throws ApiError + */ + public getNonce( +chain: string, +walletAddress: string, +): CancelablePromise<{ +result: { +nonce: number; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/backend-wallet/{chain}/{walletAddress}/get-nonce', + path: { + 'chain': chain, + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get nonce - * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. - * Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param walletAddress Backend wallet address - * @returns any Default Response - * @throws ApiError - */ - public getNonce( - chain: string, - walletAddress: string, - ): CancelablePromise<{ - result: { - nonce: number; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/backend-wallet/{chain}/{walletAddress}/get-nonce", - path: { - chain: chain, - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Simulate a transaction + * Simulate a transaction with transaction parameters + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public simulateTransaction( +chain: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The contract address + */ +toAddress: string; +/** + * The amount of native currency in wei + */ +value?: string; +/** + * The function to call on the contract + */ +functionName?: string; +/** + * The arguments to call for this function + */ +args?: Array<(string | number | boolean)>; +/** + * Raw calldata + */ +data?: string; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Simulation Success + */ +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/backend-wallet/{chain}/simulate-transaction', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Simulate a transaction - * Simulate a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public simulateTransaction( - chain: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The contract address - */ - toAddress: string; - /** - * The amount of native currency in wei - */ - value?: string; - /** - * The function to call on the contract - */ - functionName?: string; - /** - * The arguments to call for this function - */ - args?: Array; - /** - * Raw calldata - */ - data?: string; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Simulation Success - */ - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/backend-wallet/{chain}/simulate-transaction", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index 70ff60b95..df7913cd6 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -2,133 +2,137 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ChainService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get chain details - * Get details about a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @returns any Default Response - * @throws ApiError - */ - public getChain(chain: string): CancelablePromise<{ - result: { - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/chain/get", - query: { - chain: chain, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * Get chain details + * Get details about a chain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @returns any Default Response + * @throws ApiError + */ + public getChain( +chain: string, +): CancelablePromise<{ +result: { +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/chain/get', + query: { + 'chain': chain, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get all chain details + * Get details about all supported chains. + * @returns any Default Response + * @throws ApiError + */ + public listChains(): CancelablePromise<{ +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/chain/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all chain details - * Get details about all supported chains. - * @returns any Default Response - * @throws ApiError - */ - public listChains(): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/chain/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ConfigurationService.ts b/sdk/src/services/ConfigurationService.ts index 89b586528..01e611807 100644 --- a/sdk/src/services/ConfigurationService.ts +++ b/sdk/src/services/ConfigurationService.ts @@ -2,690 +2,696 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ConfigurationService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get wallets configuration - * Get wallets configuration - * @returns any Default Response - * @throws ApiError - */ - public getWalletsConfiguration(): CancelablePromise<{ - result: { - type: - | "local" - | "aws-kms" - | "gcp-kms" - | "smart:aws-kms" - | "smart:gcp-kms" - | "smart:local"; - awsAccessKeyId: string | null; - awsRegion: string | null; - gcpApplicationProjectId: string | null; - gcpKmsLocationId: string | null; - gcpKmsKeyRingId: string | null; - gcpApplicationCredentialEmail: string | null; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/wallets", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Update wallets configuration - * Update wallets configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateWalletsConfiguration( - requestBody?: - | { - awsAccessKeyId: string; - awsSecretAccessKey: string; - awsRegion: string; - } - | { - gcpApplicationProjectId: string; - gcpKmsLocationId: string; - gcpKmsKeyRingId: string; - gcpApplicationCredentialEmail: string; - gcpApplicationCredentialPrivateKey: string; - }, - ): CancelablePromise<{ - result: { - type: - | "local" - | "aws-kms" - | "gcp-kms" - | "smart:aws-kms" - | "smart:gcp-kms" - | "smart:local"; - awsAccessKeyId: string | null; - awsRegion: string | null; - gcpApplicationProjectId: string | null; - gcpKmsLocationId: string | null; - gcpKmsKeyRingId: string | null; - gcpApplicationCredentialEmail: string | null; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/wallets", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallets configuration + * Get wallets configuration + * @returns any Default Response + * @throws ApiError + */ + public getWalletsConfiguration(): CancelablePromise<{ +result: { +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +awsAccessKeyId: (string | null); +awsRegion: (string | null); +gcpApplicationProjectId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpApplicationCredentialEmail: (string | null); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/wallets', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get chain overrides configuration - * Get chain overrides configuration - * @returns any Default Response - * @throws ApiError - */ - public getChainsConfiguration(): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/chains", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update wallets configuration + * Update wallets configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateWalletsConfiguration( +requestBody?: ({ +awsAccessKeyId: string; +awsSecretAccessKey: string; +awsRegion: string; +} | { +gcpApplicationProjectId: string; +gcpKmsLocationId: string; +gcpKmsKeyRingId: string; +gcpApplicationCredentialEmail: string; +gcpApplicationCredentialPrivateKey: string; +}), +): CancelablePromise<{ +result: { +type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); +awsAccessKeyId: (string | null); +awsRegion: (string | null); +gcpApplicationProjectId: (string | null); +gcpKmsLocationId: (string | null); +gcpKmsKeyRingId: (string | null); +gcpApplicationCredentialEmail: (string | null); +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/wallets', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update chain overrides configuration - * Update chain overrides configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateChainsConfiguration(requestBody: { - chainOverrides: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }): CancelablePromise<{ - result: Array<{ - /** - * Chain name - */ - name?: string; - /** - * Chain name - */ - chain?: string; - rpc?: Array; - nativeCurrency?: { - /** - * Native currency name - */ - name: string; - /** - * Native currency symbol - */ - symbol: string; - /** - * Native currency decimals - */ - decimals: number; - }; - /** - * Chain short name - */ - shortName?: string; - /** - * Chain ID - */ - chainId?: number; - /** - * Is testnet - */ - testnet?: boolean; - /** - * Chain slug - */ - slug?: string; - }>; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/chains", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get chain overrides configuration + * Get chain overrides configuration + * @returns any Default Response + * @throws ApiError + */ + public getChainsConfiguration(): CancelablePromise<{ +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/chains', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction processing configuration - * Get transactions processing configuration - * @returns any Default Response - * @throws ApiError - */ - public getTransactionConfiguration(): CancelablePromise<{ - result: { - minTxsToProcess: number; - maxTxsToProcess: number; - minedTxListenerCronSchedule: string | null; - maxTxsToUpdate: number; - retryTxListenerCronSchedule: string | null; - minEllapsedBlocksBeforeRetry: number; - maxFeePerGasForRetries: string; - maxPriorityFeePerGasForRetries: string; - maxRetriesPerTx: number; - clearCacheCronSchedule: string | null; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/transactions", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update chain overrides configuration + * Update chain overrides configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateChainsConfiguration( +requestBody: { +chainOverrides: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}, +): CancelablePromise<{ +result: Array<{ +/** + * Chain name + */ +name?: string; +/** + * Chain name + */ +chain?: string; +rpc?: Array; +nativeCurrency?: { +/** + * Native currency name + */ +name: string; +/** + * Native currency symbol + */ +symbol: string; +/** + * Native currency decimals + */ +decimals: number; +}; +/** + * Chain short name + */ +shortName?: string; +/** + * Chain ID + */ +chainId?: number; +/** + * Is testnet + */ +testnet?: boolean; +/** + * Chain slug + */ +slug?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/chains', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update transaction processing configuration - * Update transaction processing configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateTransactionConfiguration(requestBody?: { - maxTxsToProcess?: number; - maxTxsToUpdate?: number; - minedTxListenerCronSchedule?: string | null; - retryTxListenerCronSchedule?: string | null; - minEllapsedBlocksBeforeRetry?: number; - maxFeePerGasForRetries?: string; - maxRetriesPerTx?: number; - }): CancelablePromise<{ - result: { - minTxsToProcess: number; - maxTxsToProcess: number; - minedTxListenerCronSchedule: string | null; - maxTxsToUpdate: number; - retryTxListenerCronSchedule: string | null; - minEllapsedBlocksBeforeRetry: number; - maxFeePerGasForRetries: string; - maxPriorityFeePerGasForRetries: string; - maxRetriesPerTx: number; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/transactions", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction processing configuration + * Get transactions processing configuration + * @returns any Default Response + * @throws ApiError + */ + public getTransactionConfiguration(): CancelablePromise<{ +result: { +minTxsToProcess: number; +maxTxsToProcess: number; +minedTxListenerCronSchedule: (string | null); +maxTxsToUpdate: number; +retryTxListenerCronSchedule: (string | null); +minEllapsedBlocksBeforeRetry: number; +maxFeePerGasForRetries: string; +maxPriorityFeePerGasForRetries: string; +maxRetriesPerTx: number; +clearCacheCronSchedule: (string | null); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/transactions', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update transaction processing configuration + * Update transaction processing configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateTransactionConfiguration( +requestBody?: { +maxTxsToProcess?: number; +maxTxsToUpdate?: number; +minedTxListenerCronSchedule?: (string | null); +retryTxListenerCronSchedule?: (string | null); +minEllapsedBlocksBeforeRetry?: number; +maxFeePerGasForRetries?: string; +maxRetriesPerTx?: number; +}, +): CancelablePromise<{ +result: { +minTxsToProcess: number; +maxTxsToProcess: number; +minedTxListenerCronSchedule: (string | null); +maxTxsToUpdate: number; +retryTxListenerCronSchedule: (string | null); +minEllapsedBlocksBeforeRetry: number; +maxFeePerGasForRetries: string; +maxPriorityFeePerGasForRetries: string; +maxRetriesPerTx: number; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/transactions', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get auth configuration - * Get auth configuration - * @returns any Default Response - * @throws ApiError - */ - public getAuthConfiguration(): CancelablePromise<{ - result: { - domain: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/auth", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get auth configuration + * Get auth configuration + * @returns any Default Response + * @throws ApiError + */ + public getAuthConfiguration(): CancelablePromise<{ +result: { +domain: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/auth', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update auth configuration - * Update auth configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateAuthConfiguration(requestBody: { - domain: string; - }): CancelablePromise<{ - result: { - domain: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/auth", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update auth configuration + * Update auth configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public updateAuthConfiguration( +requestBody: { +domain: string; +}, +): CancelablePromise<{ +result: { +domain: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/auth', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get wallet-balance configuration - * Get wallet-balance configuration - * @returns any Default Response - * @throws ApiError - */ - public getBackendWalletBalanceConfiguration(): CancelablePromise<{ - result: { - /** - * Minimum wallet balance in wei - */ - minWalletBalance: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/backend-wallet-balance", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallet-balance configuration + * Get wallet-balance configuration + * @returns any Default Response + * @throws ApiError + */ + public getBackendWalletBalanceConfiguration(): CancelablePromise<{ +result: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/backend-wallet-balance', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update backend wallet balance configuration - * Update backend wallet balance configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateBackendWalletBalanceConfiguration(requestBody?: { /** - * Minimum wallet balance in wei + * Update backend wallet balance configuration + * Update backend wallet balance configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - minWalletBalance?: string; - }): CancelablePromise<{ - result: { - /** - * Minimum wallet balance in wei - */ - minWalletBalance: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/backend-wallet-balance", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public updateBackendWalletBalanceConfiguration( +requestBody?: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance?: string; +}, +): CancelablePromise<{ +result: { +/** + * Minimum wallet balance in wei + */ +minWalletBalance: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/backend-wallet-balance', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get CORS configuration - * Get CORS configuration - * @returns any Default Response - * @throws ApiError - */ - public getCorsConfiguration(): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/cors", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get CORS configuration + * Get CORS configuration + * @returns any Default Response + * @throws ApiError + */ + public getCorsConfiguration(): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/cors', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Add a CORS URL - * Add a URL to allow client-side calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public addUrlToCorsConfiguration(requestBody: { - urlsToAdd: Array; - }): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/cors", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Add a CORS URL + * Add a URL to allow client-side calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public addUrlToCorsConfiguration( +requestBody: { +urlsToAdd: Array; +}, +): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/cors', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove CORS URLs - * Remove URLs from CORS configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public removeUrlToCorsConfiguration(requestBody: { - urlsToRemove: Array; - }): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "DELETE", - url: "/configuration/cors", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Remove CORS URLs + * Remove URLs from CORS configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public removeUrlToCorsConfiguration( +requestBody: { +urlsToRemove: Array; +}, +): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'DELETE', + url: '/configuration/cors', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set CORS URLs - * Replaces the CORS URLs to allow client-side calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public setUrlsToCorsConfiguration(requestBody: { - urls: Array; - }): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/configuration/cors", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set CORS URLs + * Replaces the CORS URLs to allow client-side calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public setUrlsToCorsConfiguration( +requestBody: { +urls: Array; +}, +): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'PUT', + url: '/configuration/cors', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get cache configuration - * Get cache configuration - * @returns any Default Response - * @throws ApiError - */ - public getCacheConfiguration(): CancelablePromise<{ - result: { - clearCacheCronSchedule: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/cache", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get cache configuration + * Get cache configuration + * @returns any Default Response + * @throws ApiError + */ + public getCacheConfiguration(): CancelablePromise<{ +result: { +clearCacheCronSchedule: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/cache', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update cache configuration - * Update cache configuration - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateCacheConfiguration(requestBody: { /** - * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is - * minutes and hh is hours. Seconds should not be '*' or less than 10 + * Update cache configuration + * Update cache configuration + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - clearCacheCronSchedule: string; - }): CancelablePromise<{ - result: { - clearCacheCronSchedule: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/cache", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public updateCacheConfiguration( +requestBody: { +/** + * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 + */ +clearCacheCronSchedule: string; +}, +): CancelablePromise<{ +result: { +clearCacheCronSchedule: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/cache', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get Contract Subscriptions configuration - * Get the configuration for Contract Subscriptions - * @returns any Default Response - * @throws ApiError - */ - public getContractSubscriptionsConfiguration(): CancelablePromise<{ - result: { - maxBlocksToIndex: number; - contractSubscriptionsRequeryDelaySeconds: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/contract-subscriptions", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get Contract Subscriptions configuration + * Get the configuration for Contract Subscriptions + * @returns any Default Response + * @throws ApiError + */ + public getContractSubscriptionsConfiguration(): CancelablePromise<{ +result: { +maxBlocksToIndex: number; +contractSubscriptionsRequeryDelaySeconds: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/contract-subscriptions', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update Contract Subscriptions configuration - * Update the configuration for Contract Subscriptions - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateContractSubscriptionsConfiguration(requestBody?: { - maxBlocksToIndex?: number; /** - * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after - * 2s and 10s. + * Update Contract Subscriptions configuration + * Update the configuration for Contract Subscriptions + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - contractSubscriptionsRequeryDelaySeconds?: string; - }): CancelablePromise<{ - result: { - maxBlocksToIndex: number; - contractSubscriptionsRequeryDelaySeconds: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/configuration/contract-subscriptions", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public updateContractSubscriptionsConfiguration( +requestBody?: { +maxBlocksToIndex?: number; +/** + * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after 2s and 10s. + */ +contractSubscriptionsRequeryDelaySeconds?: string; +}, +): CancelablePromise<{ +result: { +maxBlocksToIndex: number; +contractSubscriptionsRequeryDelaySeconds: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/configuration/contract-subscriptions', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get Allowed IP Addresses - * Get the list of allowed IP addresses - * @returns any Default Response - * @throws ApiError - */ - public getIpAllowlist(): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/configuration/ip-allowlist", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get Allowed IP Addresses + * Get the list of allowed IP addresses + * @returns any Default Response + * @throws ApiError + */ + public getIpAllowlist(): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/configuration/ip-allowlist', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set IP Allowlist - * Replaces the IP Allowlist array to allow calls to Engine - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public setIpAllowlist(requestBody: { /** - * Array of IP addresses to allowlist + * Set IP Allowlist + * Replaces the IP Allowlist array to allow calls to Engine + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - ips: Array; - }): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/configuration/ip-allowlist", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public setIpAllowlist( +requestBody: { +/** + * Array of IP addresses to allowlist + */ +ips: Array; +}, +): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'PUT', + url: '/configuration/ip-allowlist', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + } diff --git a/sdk/src/services/ContractEventsService.ts b/sdk/src/services/ContractEventsService.ts index 8e75af83e..1cc310498 100644 --- a/sdk/src/services/ContractEventsService.ts +++ b/sdk/src/services/ContractEventsService.ts @@ -2,88 +2,90 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractEventsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all events - * Get a list of all blockchain events for this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param fromBlock - * @param toBlock - * @param order - * @returns any Default Response - * @throws ApiError - */ - public getAllEvents( - chain: string, - contractAddress: string, - fromBlock?: number | string, - toBlock?: number | string, - order?: "asc" | "desc", - ): CancelablePromise<{ - result: Array>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/events/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - fromBlock: fromBlock, - toBlock: toBlock, - order: order, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * Get all events + * Get a list of all blockchain events for this contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param fromBlock + * @param toBlock + * @param order + * @returns any Default Response + * @throws ApiError + */ + public getAllEvents( +chain: string, +contractAddress: string, +fromBlock?: (number | string), +toBlock?: (number | string), +order?: ('asc' | 'desc'), +): CancelablePromise<{ +result: Array>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/events/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'fromBlock': fromBlock, + 'toBlock': toBlock, + 'order': order, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get events + * Get a list of specific blockchain events emitted from this contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks + * @returns any Default Response + * @throws ApiError + */ + public getEvents( +chain: string, +contractAddress: string, +requestBody: { +eventName: string; +fromBlock?: (number | string); +toBlock?: (number | string); +order?: ('asc' | 'desc'); +filters?: any; +}, +): CancelablePromise<{ +result: Array>; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/events/get', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get events - * Get a list of specific blockchain events emitted from this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks - * @returns any Default Response - * @throws ApiError - */ - public getEvents( - chain: string, - contractAddress: string, - requestBody: { - eventName: string; - fromBlock?: number | string; - toBlock?: number | string; - order?: "asc" | "desc"; - filters?: any; - }, - ): CancelablePromise<{ - result: Array>; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/events/get", - path: { - chain: chain, - contractAddress: contractAddress, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index 9c520d82d..b0d7df83c 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -2,206 +2,208 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractMetadataService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get ABI - * Get the ABI of a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getAbi( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - type: string; - name?: string; - inputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - stateMutability?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/metadata/abi", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get events - * Get details of all events implemented by a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getContractEvents( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - name: string; - inputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - comment?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/metadata/events", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get ABI + * Get the ABI of a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getAbi( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +type: string; +name?: string; +inputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +stateMutability?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/metadata/abi', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get events + * Get details of all events implemented by a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getContractEvents( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +name: string; +inputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +comment?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/metadata/events', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get extensions + * Get all detected extensions for a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getExtensions( +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * Array of detected extension names + */ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/metadata/extensions', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get extensions - * Get all detected extensions for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getExtensions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ /** - * Array of detected extension names + * Get functions + * Get details of all functions implemented by the contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/metadata/extensions", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getFunctions( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +name: string; +inputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +comment?: string; +signature: string; +stateMutability: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/metadata/functions', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get functions - * Get details of all functions implemented by the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getFunctions( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - name: string; - inputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - comment?: string; - signature: string; - stateMutability: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/metadata/functions", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index 571ba2b5c..186047017 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -1,277 +1,267 @@ /* generated using openapi-typescript-codegen -- do no edit */ -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractRolesService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get wallets for role - * Get all wallets with a specific role for a contract. - * @param role The role to list wallet members - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getContractRole( - role: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/roles/get", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - role: role, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get wallets for all roles - * Get all wallets in each role for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public listContractRoles( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - admin: Array; - transfer: Array; - minter: Array; - pauser: Array; - lister: Array; - asset: Array; - unwrap: Array; - factory: Array; - signer: Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/roles/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallets for role + * Get all wallets with a specific role for a contract. + * @param role The role to list wallet members + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getContractRole( +role: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/roles/get', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'role': role, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Grant role - * Grant a role to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public grantContractRole( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The role to grant - */ - role: string; - /** - * The address to grant the role to - */ - address: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/roles/grant", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get wallets for all roles + * Get all wallets in each role for a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public listContractRoles( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +admin: Array; +transfer: Array; +minter: Array; +pauser: Array; +lister: Array; +asset: Array; +unwrap: Array; +factory: Array; +signer: Array; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/roles/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Grant role + * Grant a role to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public grantContractRole( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The role to grant + */ +role: string; +/** + * The address to grant the role to + */ +address: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/roles/grant', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke role + * Revoke a role from a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeContractRole( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The role to revoke + */ +role: string; +/** + * The address to revoke the role from + */ +address: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/roles/revoke', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke role - * Revoke a role from a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeContractRole( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The role to revoke - */ - role: string; - /** - * The address to revoke the role from - */ - address: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/roles/revoke", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ContractRoyaltiesService.ts b/sdk/src/services/ContractRoyaltiesService.ts index be9a39c53..e7f8ec92f 100644 --- a/sdk/src/services/ContractRoyaltiesService.ts +++ b/sdk/src/services/ContractRoyaltiesService.ts @@ -2,286 +2,276 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractRoyaltiesService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get royalty details - * Gets the royalty recipient and BPS (basis points) of the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDefaultRoyaltyInfo( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get token royalty details - * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. - * @param tokenId - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getTokenRoyaltyInfo( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}", - path: { - tokenId: tokenId, - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get royalty details + * Gets the royalty recipient and BPS (basis points) of the smart contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDefaultRoyaltyInfo( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set royalty details - * Set the royalty recipient and fee for the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public setDefaultRoyaltyInfo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token royalty details + * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. + * @param tokenId + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getTokenRoyaltyInfo( +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}', + path: { + 'tokenId': tokenId, + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Set royalty details + * Set the royalty recipient and fee for the smart contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public setDefaultRoyaltyInfo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Set token royalty details + * Set the royalty recipient and fee for a particular token in the contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public setTokenRoyaltyInfo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The royalty fee in BPS (basis points). 100 = 1%. + */ +seller_fee_basis_points: number; +/** + * The wallet address that will receive the royalty fees. + */ +fee_recipient: string; +/** + * The token ID to set the royalty info for. + */ +token_id: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set token royalty details - * Set the royalty recipient and fee for a particular token in the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public setTokenRoyaltyInfo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The royalty fee in BPS (basis points). 100 = 1%. - */ - seller_fee_basis_points: number; - /** - * The wallet address that will receive the royalty fees. - */ - fee_recipient: string; - /** - * The token ID to set the royalty info for. - */ - token_id: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/ContractService.ts b/sdk/src/services/ContractService.ts index 1b6a37a11..da8876320 100644 --- a/sdk/src/services/ContractService.ts +++ b/sdk/src/services/ContractService.ts @@ -2,167 +2,161 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Read from contract - * Call a read function on a contract. - * @param functionName Name of the function to call on Contract - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param args Arguments for the function. Comma Separated - * @returns any Default Response - * @throws ApiError - */ - public read( - functionName: string, - chain: string, - contractAddress: string, - args?: string, - ): CancelablePromise<{ - result: any; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/read", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - functionName: functionName, - args: args, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} + + /** + * Read from contract + * Call a read function on a contract. + * @param functionName Name of the function to call on Contract + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param args Arguments for the function. Comma Separated + * @returns any Default Response + * @throws ApiError + */ + public read( +functionName: string, +chain: string, +contractAddress: string, +args?: string, +): CancelablePromise<{ +result: any; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/read', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'functionName': functionName, + 'args': args, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Write to contract + * Call a write function on a contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public write( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The function to call on the contract. It is highly recommended to provide a full function signature, such as "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. + */ +functionName: string; +/** + * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects + */ +args: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +abi?: Array<{ +type: string; +name?: string; +inputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +outputs?: Array<{ +type?: string; +name?: string; +internalType?: string; +stateMutability?: string; +components?: Array<{ +type?: string; +name?: string; +internalType?: string; +}>; +}>; +stateMutability?: string; +}>; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/write', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + }); + } - /** - * Write to contract - * Call a write function on a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public write( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The function to call on the contract. It is highly recommended to provide a full function signature, such as - * "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. - */ - functionName: string; - /** - * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: - * BigNumber, bigint, Date objects - */ - args: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - abi?: Array<{ - type: string; - name?: string; - inputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - outputs?: Array<{ - type?: string; - name?: string; - internalType?: string; - stateMutability?: string; - components?: Array<{ - type?: string; - name?: string; - internalType?: string; - }>; - }>; - stateMutability?: string; - }>; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/write", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - }); - } } diff --git a/sdk/src/services/ContractSubscriptionsService.ts b/sdk/src/services/ContractSubscriptionsService.ts index fa8bd43c4..93120f56d 100644 --- a/sdk/src/services/ContractSubscriptionsService.ts +++ b/sdk/src/services/ContractSubscriptionsService.ts @@ -2,222 +2,229 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class ContractSubscriptionsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get contract subscriptions - * Get all contract subscriptions. - * @returns any Default Response - * @throws ApiError - */ - public getContractSubscriptions(): CancelablePromise<{ - result: Array<{ - id: string; - chainId: number; - /** - * A contract or wallet address - */ - contractAddress: string; - webhook?: { - id: number; - url: string; - name: string | null; - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - }; - processEventLogs: boolean; - filterEvents: Array; - processTransactionReceipts: boolean; - filterFunctions: Array; - createdAt: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract-subscriptions/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Add contract subscription - * Subscribe to event logs and transaction receipts for a contract. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public addContractSubscription(requestBody: { /** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * Get contract subscriptions + * Get all contract subscriptions. + * @returns any Default Response + * @throws ApiError */ - chain: string; - /** - * The address for the contract. - */ - contractAddress: string; - /** - * Webhook URL - */ - webhookUrl?: string; - /** - * If true, parse event logs for this contract. - */ - processEventLogs: boolean; + public getContractSubscriptions(): CancelablePromise<{ +result: Array<{ +id: string; +chainId: number; +/** + * A contract or wallet address + */ +contractAddress: string; +webhook?: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +processEventLogs: boolean; +filterEvents: Array; +processTransactionReceipts: boolean; +filterFunctions: Array; +createdAt: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract-subscriptions/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * A case-sensitive list of event names to filter event logs. Parses all event logs by default. + * Add contract subscription + * Subscribe to event logs and transaction receipts for a contract. + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - filterEvents?: Array; + public addContractSubscription( +requestBody: { +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * The address for the contract. + */ +contractAddress: string; +/** + * Webhook URL + */ +webhookUrl?: string; +/** + * If true, parse event logs for this contract. + */ +processEventLogs: boolean; +/** + * A case-sensitive list of event names to filter event logs. Parses all event logs by default. + */ +filterEvents?: Array; +/** + * If true, parse transaction receipts for this contract. + */ +processTransactionReceipts: boolean; +/** + * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. + */ +filterFunctions?: Array; +}, +): CancelablePromise<{ +result: { +id: string; +chainId: number; +/** + * A contract or wallet address + */ +contractAddress: string; +webhook?: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +processEventLogs: boolean; +filterEvents: Array; +processTransactionReceipts: boolean; +filterFunctions: Array; +createdAt: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract-subscriptions/add', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * If true, parse transaction receipts for this contract. + * Remove contract subscription + * Remove an existing contract subscription + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - processTransactionReceipts: boolean; + public removeContractSubscription( +requestBody: { +/** + * The ID for an existing contract subscription. + */ +contractSubscriptionId: string; +}, +): CancelablePromise<{ +result: { +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract-subscriptions/remove', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by - * default. + * Get subscribed contract indexed block range + * Gets the subscribed contract's indexed block range + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - filterFunctions?: Array; - }): CancelablePromise<{ - result: { - id: string; - chainId: number; - /** - * A contract or wallet address - */ - contractAddress: string; - webhook?: { - id: number; - url: string; - name: string | null; - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - }; - processEventLogs: boolean; - filterEvents: Array; - processTransactionReceipts: boolean; - filterFunctions: Array; - createdAt: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract-subscriptions/add", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getContractIndexedBlockRange( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * A contract or wallet address + */ +contractAddress: string; +fromBlock: number; +toBlock: number; +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove contract subscription - * Remove an existing contract subscription - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public removeContractSubscription(requestBody: { /** - * The ID for an existing contract subscription. + * Get last processed block + * Get the last processed block for a chain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @returns any Default Response + * @throws ApiError */ - contractSubscriptionId: string; - }): CancelablePromise<{ - result: { - status: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract-subscriptions/remove", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - - /** - * Get subscribed contract indexed block range - * Gets the subscribed contract's indexed block range - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getContractIndexedBlockRange( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ - chain: string; - /** - * A contract or wallet address - */ - contractAddress: string; - fromBlock: number; - toBlock: number; - status: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getLatestBlock( +chain: string, +): CancelablePromise<{ +result: { +lastBlock: number; +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract-subscriptions/last-block', + query: { + 'chain': chain, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get last processed block - * Get the last processed block for a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @returns any Default Response - * @throws ApiError - */ - public getLatestBlock(chain: string): CancelablePromise<{ - result: { - lastBlock: number; - status: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract-subscriptions/last-block", - query: { - chain: chain, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/DefaultService.ts b/sdk/src/services/DefaultService.ts index 1fa92e628..54389d7a7 100644 --- a/sdk/src/services/DefaultService.ts +++ b/sdk/src/services/DefaultService.ts @@ -2,42 +2,44 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class DefaultService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * @returns any Default Response - * @throws ApiError - */ - public getJson(): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/json", - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * @returns any Default Response - * @throws ApiError - */ - public getOpenapiJson(): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/openapi.json", - }); - } + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/json', + }); + } + + /** + * @returns any Default Response + * @throws ApiError + */ + public getOpenapiJson(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/openapi.json', + }); + } + + /** + * @returns any Default Response + * @throws ApiError + */ + public getJson1(): CancelablePromise { + return this.httpRequest.request({ + method: 'GET', + url: '/json/', + }); + } - /** - * @returns any Default Response - * @throws ApiError - */ - public getJson1(): CancelablePromise { - return this.httpRequest.request({ - method: "GET", - url: "/json/", - }); - } } diff --git a/sdk/src/services/DeployService.ts b/sdk/src/services/DeployService.ts index f59a4e073..f343f5a31 100644 --- a/sdk/src/services/DeployService.ts +++ b/sdk/src/services/DeployService.ts @@ -2,1409 +2,1346 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class DeployService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Deploy Edition - * Deploy an Edition contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployEdition( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/edition", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Deploy Edition Drop - * Deploy an Edition Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployEditionDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/edition-drop", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Edition + * Deploy an Edition contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployEdition( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/edition', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Deploy Edition Drop + * Deploy an Edition Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployEditionDrop( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/edition-drop', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Deploy Marketplace + * Deploy a Marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployMarketplaceV3( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/marketplace-v3', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Marketplace - * Deploy a Marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployMarketplaceV3( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/marketplace-v3", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Multiwrap + * Deploy a Multiwrap contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployMultiwrap( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/multiwrap', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Multiwrap - * Deploy a Multiwrap contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployMultiwrap( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/multiwrap", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy NFT Collection + * Deploy an NFT Collection contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployNftCollection( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/nft-collection', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy NFT Collection - * Deploy an NFT Collection contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployNftCollection( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/nft-collection", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy NFT Drop + * Deploy an NFT Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployNftDrop( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/nft-drop', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy NFT Drop - * Deploy an NFT Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployNftDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/nft-drop", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Pack + * Deploy a Pack contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployPack( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/pack', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Pack - * Deploy a Pack contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployPack( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/pack", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Signature Drop + * Deploy a Signature Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deploySignatureDrop( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +seller_fee_basis_points: number; +fee_recipient: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/signature-drop', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Signature Drop - * Deploy a Signature Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deploySignatureDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - seller_fee_basis_points: number; - fee_recipient: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/signature-drop", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Split + * Deploy a Split contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deploySplit( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +recipients: Array<{ +/** + * A contract or wallet address + */ +address: string; +sharesBps: number; +}>; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/split', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Split - * Deploy a Split contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deploySplit( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - recipients: Array<{ - /** - * A contract or wallet address - */ - address: string; - sharesBps: number; - }>; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/split", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Token + * Deploy a Token contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployToken( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/token', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Token - * Deploy a Token contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployToken( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/token", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Token Drop + * Deploy a Token Drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployTokenDrop( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +merkle?: Record; +symbol: string; +platform_fee_basis_points: number; +platform_fee_recipient: string; +primary_sale_recipient?: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/token-drop', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Token Drop - * Deploy a Token Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployTokenDrop( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - merkle?: Record; - symbol: string; - platform_fee_basis_points: number; - platform_fee_recipient: string; - primary_sale_recipient?: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/token-drop", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy Vote + * Deploy a Vote contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployVote( +chain: string, +xBackendWalletAddress: string, +requestBody: { +contractMetadata: { +name: string; +description?: string; +image?: string; +external_link?: string; +app_uri?: string; +defaultAdmin?: string; +voting_delay_in_blocks: number; +voting_period_in_blocks: number; +/** + * A contract or wallet address + */ +voting_token_address: string; +voting_quorum_fraction: number; +proposal_token_threshold: string; +trusted_forwarders: Array; +}; +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +queueId?: string; +/** + * A contract or wallet address + */ +deployedAddress?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/prebuilts/vote', + path: { + 'chain': chain, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy Vote - * Deploy a Vote contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployVote( - chain: string, - xBackendWalletAddress: string, - requestBody: { - contractMetadata: { - name: string; - description?: string; - image?: string; - external_link?: string; - app_uri?: string; - defaultAdmin?: string; - voting_delay_in_blocks: number; - voting_period_in_blocks: number; - /** - * A contract or wallet address - */ - voting_token_address: string; - voting_quorum_fraction: number; - proposal_token_threshold: string; - trusted_forwarders: Array; - }; - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - queueId?: string; - /** - * A contract or wallet address - */ - deployedAddress?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/prebuilts/vote", - path: { - chain: chain, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Deploy published contract + * Deploy a published contract to the blockchain. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param publisher Address or ENS of the publisher of the contract + * @param contractName Name of the published contract to deploy + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public deployPublished( +chain: string, +publisher: string, +contractName: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Version of the contract to deploy. Defaults to latest. + */ +version?: string; +forceDirectDeploy?: boolean; +saltForProxyDeploy?: string; +compilerOptions?: { +compilerType: 'zksolc'; +compilerVersion?: string; +evmVersion?: string; +}; +/** + * Constructor arguments for the deployment. + */ +constructorParams: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +queueId?: string; +/** + * Not all contracts return a deployed address. + */ +deployedAddress?: string; +message?: string; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/deploy/{chain}/{publisher}/{contractName}', + path: { + 'chain': chain, + 'publisher': publisher, + 'contractName': contractName, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Deploy published contract - * Deploy a published contract to the blockchain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param publisher Address or ENS of the publisher of the contract - * @param contractName Name of the published contract to deploy - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public deployPublished( - chain: string, - publisher: string, - contractName: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Version of the contract to deploy. Defaults to latest. - */ - version?: string; - forceDirectDeploy?: boolean; - saltForProxyDeploy?: string; - compilerOptions?: { - compilerType: "zksolc"; - compilerVersion?: string; - evmVersion?: string; - }; - /** - * Constructor arguments for the deployment. - */ - constructorParams: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - queueId?: string; /** - * Not all contracts return a deployed address. + * Get contract types + * Get all prebuilt contract types. + * @returns any Default Response + * @throws ApiError */ - deployedAddress?: string; - message?: string; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/deploy/{chain}/{publisher}/{contractName}", - path: { - chain: chain, - publisher: publisher, - contractName: contractName, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public contractTypes(): CancelablePromise<{ +result: Array; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/deploy/contract-types', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get contract types - * Get all prebuilt contract types. - * @returns any Default Response - * @throws ApiError - */ - public contractTypes(): CancelablePromise<{ - result: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/deploy/contract-types", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index e3b7e6591..bb7c7f54e 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -2,2690 +2,2535 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class Erc1155Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get details - * Get the details for a token in an ERC-1155 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155Get( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/get", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all details - * Get details for all tokens in an ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param start The start token ID for paginated results. Defaults to 0. - * @param count The page count for paginated results. Defaults to 100. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetAll( - chain: string, - contractAddress: string, - start?: number, - count?: number, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - start: start, - count: count, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get details + * Get the details for a token in an ERC-1155 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155Get( +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/get', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get owned tokens - * Get all tokens in an ERC-1155 contract owned by a specific wallet. - * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetOwned( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/get-owned", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all details + * Get details for all tokens in an ERC-1155 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param start The start token ID for paginated results. Defaults to 0. + * @param count The page count for paginated results. Defaults to 100. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetAll( +chain: string, +contractAddress: string, +start?: number, +count?: number, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'start': start, + 'count': count, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get balance - * Get the balance of a specific wallet address for this ERC-1155 contract. - * @param walletAddress Address of the wallet to check NFT balance - * @param tokenId The tokenId of the NFT to check balance of - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155BalanceOf( - walletAddress: string, - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/balance-of", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get owned tokens + * Get all tokens in an ERC-1155 contract owned by a specific wallet. + * @param walletAddress Address of the wallet to get NFTs for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetOwned( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/get-owned', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if approved transfers - * Check if the specific wallet has approved transfers from a specific operator wallet. - * @param ownerWallet Address of the wallet who owns the NFT - * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155IsApproved( - ownerWallet: string, - operator: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/is-approved", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - ownerWallet: ownerWallet, - operator: operator, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get balance + * Get the balance of a specific wallet address for this ERC-1155 contract. + * @param walletAddress Address of the wallet to check NFT balance + * @param tokenId The tokenId of the NFT to check balance of + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155BalanceOf( +walletAddress: string, +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/balance-of', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155TotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/total-count", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if approved transfers + * Check if the specific wallet has approved transfers from a specific operator wallet. + * @param ownerWallet Address of the wallet who owns the NFT + * @param operator Address of the operator to check approval on + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155IsApproved( +ownerWallet: string, +operator: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/is-approved', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'ownerWallet': ownerWallet, + 'operator': operator, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-1155 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155TotalSupply( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/total-supply", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-1155 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155TotalCount( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/total-count', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is - * typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc1155SignatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: - | { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address - * of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps?: number; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults - * to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: string | number; - mintEndTime?: string | number; - } - | ({ - contractType?: "TokenERC1155" | "SignatureMintERC1155"; - to: string; - quantity: string; - royaltyRecipient?: string; - royaltyBps?: number; - primarySaleRecipient?: string; - /** - * An amount in native token (decimals allowed). Example: "0.1" - */ - pricePerToken?: string; - /** - * An amount in wei (no decimals). Example: "50000000000" - */ - pricePerTokenWei?: string; - currency?: string; - validityStartTimestamp: number; - validityEndTimestamp?: number; - uid?: string; - } & ( - | { - metadata: - | { - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - } - | string; - } - | { - tokenId: string; - } - )), - ): CancelablePromise<{ - result: - | { - payload: { - uri: string; - tokenId: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient - * address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } - | { - payload: { - to: string; - royaltyRecipient: string; - royaltyBps: string; - primarySaleRecipient: string; - tokenId: string; - uri: string; - quantity: string; - pricePerToken: string; - currency: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/signature/generate", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - "x-thirdweb-sdk-version": xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-1155 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155TotalSupply( +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/total-supply', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can - * claim. - * @param quantity The amount of tokens to claim. - * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active - * claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc1155CanClaim( - quantity: string, - tokenId: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - quantity: quantity, - tokenId: tokenId, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc1155SignatureGenerate( +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps?: number; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | ({ +contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); +to: string; +quantity: string; +royaltyRecipient?: string; +royaltyBps?: number; +primarySaleRecipient?: string; +/** + * An amount in native token (decimals allowed). Example: "0.1" + */ +pricePerToken?: string; +/** + * An amount in wei (no decimals). Example: "50000000000" + */ +pricePerTokenWei?: string; +currency?: string; +validityStartTimestamp: number; +validityEndTimestamp?: number; +uid?: string; +} & ({ +metadata: ({ +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +} | string); +} | { +tokenId: string; +}))), +): CancelablePromise<{ +result: ({ +payload: { +uri: string; +tokenId: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +to: string; +royaltyRecipient: string; +royaltyBps: string; +primarySaleRecipient: string; +tokenId: string; +uri: string; +quantity: string; +pricePerToken: string; +currency: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/signature/generate', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + 'x-thirdweb-sdk-version': xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get currently active claim phase for a specific token ID. - * Retrieve the currently active claim phase for a specific token ID, if any. - * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetActiveClaimConditions( - tokenId: string | number, - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. + * @param quantity The amount of tokens to claim. + * @param tokenId The token ID of the NFT you want to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc1155CanClaim( +quantity: string, +tokenId: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'quantity': quantity, + 'tokenId': tokenId, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured for a specific token ID. - * Get all the claim phases configured for a specific token ID. - * @param tokenId The token ID of the NFT you want to get the claim conditions for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetAllClaimConditions( - tokenId: string | number, - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get currently active claim phase for a specific token ID. + * Retrieve the currently active claim phase for a specific token ID, if any. + * @param tokenId The token ID of the NFT you want to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetActiveClaimConditions( +tokenId: (string | number), +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for - * the given wallet address. - * @param tokenId The token ID of the NFT you want to get the claimer proofs for. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetClaimerProofs( - tokenId: string | number, - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured for a specific token ID. + * Get all the claim phases configured for a specific token ID. + * @param tokenId The token ID of the NFT you want to get the claim conditions for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetAllClaimConditions( +tokenId: (string | number), +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc1155GetClaimIneligibilityReasons( - tokenId: string | number, - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array< - | string - | ( - | "There is not enough supply to claim." - | "This address is not on the allowlist." - | "Not enough time since last claim transaction. Please wait." - | "Claim phase has not started yet." - | "You have already claimed the token." - | "Incorrect price or currency." - | "Cannot claim more than maximum allowed quantity." - | "There are not enough tokens in the wallet to pay for the claim." - | "There is no active claim phase at the moment. Please check back in later." - | "There is no claim condition set." - | "No wallet connected." - | "No claim conditions found." - ) - >; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - quantity: quantity, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. + * @param tokenId The token ID of the NFT you want to get the claimer proofs for. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetClaimerProofs( +tokenId: (string | number), +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Airdrop tokens - * Airdrop ERC-1155 tokens to specific wallets. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Airdrop( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID of the NFT to airdrop - */ - tokenId: string; - /** - * Addresses and quantities to airdrop to - */ - addresses: Array<{ - /** - * A contract or wallet address - */ - address: string; - quantity: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/airdrop", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc1155GetClaimIneligibilityReasons( +tokenId: (string | number), +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + 'quantity': quantity, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The token ID to burn - */ - tokenId: string; - /** - * The amount of tokens to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/burn", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Airdrop tokens + * Airdrop ERC-1155 tokens to specific wallets. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Airdrop( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID of the NFT to airdrop + */ +tokenId: string; +/** + * Addresses and quantities to airdrop to + */ +addresses: Array<{ +/** + * A contract or wallet address + */ +address: string; +quantity: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/airdrop', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn tokens (batch) - * Burn a batch of ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155BurnBatch( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - tokenIds: Array; - amounts: Array; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/burn-batch", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-1155 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Burn( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The token ID to burn + */ +tokenId: string; +/** + * The amount of tokens to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/burn', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155ClaimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to claim the NFT to - */ - receiver: string; - /** - * Token ID of the NFT to claim - */ - tokenId: string; - /** - * Quantity of NFTs to mint - */ - quantity: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn tokens (batch) + * Burn a batch of ERC-1155 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155BurnBatch( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +tokenIds: Array; +amounts: Array; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/burn-batch', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Lazy mint - * Lazy mint ERC-1155 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155LazyMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - metadatas: Array< - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string - >; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/lazy-mint", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155ClaimTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to claim the NFT to + */ +receiver: string; +/** + * Token ID of the NFT to claim + */ +tokenId: string; +/** + * Quantity of NFTs to mint + */ +quantity: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint additional supply - * Mint additional supply of ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintAdditionalSupplyTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - /** - * Token ID to mint additional supply to - */ - tokenId: string; - /** - * The amount of supply to mint - */ - additionalSupply: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Lazy mint + * Lazy mint ERC-1155 tokens to be claimed in the future. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155LazyMint( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/lazy-mint', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-1155 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadataWithSupply: Array<{ - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - supply: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/mint-batch-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint additional supply + * Mint additional supply of ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintAdditionalSupplyTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +/** + * Token ID to mint additional supply to + */ +tokenId: string; +/** + * The amount of supply to mint + */ +additionalSupply: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155MintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadataWithSupply: { - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - supply: string; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/mint-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-1155 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintBatchTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadataWithSupply: Array<{ +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +supply: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/mint-batch-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for all - * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for - * any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SetApprovalForAll( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * whether to approve or revoke approval - */ - approved: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-1155 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155MintTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadataWithSupply: { +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +supply: string; +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/mint-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token - * Transfer an ERC-1155 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155Transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - /** - * A valid hex string - */ - data?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/transfer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for all + * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SetApprovalForAll( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * whether to approve or revoke approval + */ +approved: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC1155 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155TransferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - from: string; - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - /** - * A valid hex string - */ - data?: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/transfer-from", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token + * Transfer an ERC-1155 token from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155Transfer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +/** + * A valid hex string + */ +data?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/transfer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-1155 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SignatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: { - uri: string; - tokenId: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient - * address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/signature/mint", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC1155 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155TransferFrom( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +from: string; +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +/** + * A valid hex string + */ +data?: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/transfer-from', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for a specific token ID.. - * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default - * being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155SetClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * ID of the token to set the claim conditions for - */ - tokenId: string | number; - claimConditionInputs: Array<{ - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-1155 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SignatureMint( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: { +uri: string; +tokenId: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/signature/mint', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for a specific token ID.. - * Allows you to set claim conditions for multiple token IDs in a single transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155ClaimConditionsUpdate( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionsForToken: Array<{ - /** - * ID of the token to set the claim conditions for - */ - tokenId: string | number; - claimConditions: Array<{ - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }>; - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for a specific token ID.. + * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155SetClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * ID of the token to set the claim conditions for + */ +tokenId: (string | number); +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update a single claim phase. - * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase - * configuration. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155UpdateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update claim phase for - */ - tokenId: string | number; - claimConditionInput: { - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for a specific token ID.. + * Allows you to set claim conditions for multiple token IDs in a single transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155ClaimConditionsUpdate( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionsForToken: Array<{ +/** + * ID of the token to set the claim conditions for + */ +tokenId: (string | number); +claimConditions: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update a single claim phase. + * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155UpdateClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update claim phase for + */ +tokenId: (string | number); +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update token metadata + * Update the metadata for an ERC1155 token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc1155UpdateTokenMetadata( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update metadata + */ +tokenId: string; +metadata: { +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc1155/token/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update token metadata - * Update the metadata for an ERC1155 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc1155UpdateTokenMetadata( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update metadata - */ - tokenId: string; - metadata: { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc1155/token/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index 5164ee2bf..743d72f2b 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -2,1731 +2,1623 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class Erc20Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get token allowance - * Get the allowance of a specific wallet for an ERC-20 contract. - * @param ownerWallet Address of the wallet who owns the funds - * @param spenderWallet Address of the wallet to check token allowance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20AllowanceOf( - ownerWallet: string, - spenderWallet: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/allowance-of", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - ownerWallet: ownerWallet, - spenderWallet: spenderWallet, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get token balance - * Get the balance of a specific wallet address for this ERC-20 contract. - * @param walletAddress Address of the wallet to check token balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20BalanceOf( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/balance-of", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - wallet_address: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token allowance + * Get the allowance of a specific wallet for an ERC-20 contract. + * @param ownerWallet Address of the wallet who owns the funds + * @param spenderWallet Address of the wallet to check token allowance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20AllowanceOf( +ownerWallet: string, +spenderWallet: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/allowance-of', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'ownerWallet': ownerWallet, + 'spenderWallet': spenderWallet, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token details - * Get details for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20Get( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/get", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token balance + * Get the balance of a specific wallet address for this ERC-20 contract. + * @param walletAddress Address of the wallet to check token balance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20BalanceOf( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/balance-of', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'wallet_address': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20TotalSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - name: string; - symbol: string; - decimals: string; - /** - * Value in wei - */ - value: string; - /** - * Value in tokens - */ - displayValue: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/total-supply", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token details + * Get details for this ERC-20 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20Get( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/get', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is - * typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc20SignatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: - | { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults - * to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: string | number; - mintEndTime?: string | number; - } - | ({ - to: string; - primarySaleRecipient?: string; - price?: string; - priceInWei?: string; - currency?: string; - validityStartTimestamp: number; - validityEndTimestamp?: number; - uid?: string; - } & ( - | { - quantity: string; - } - | { - quantityWei: string; - } - )), - ): CancelablePromise<{ - result: - | { - payload: { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } - | { - payload: { - to: string; - primarySaleRecipient: string; - quantity: string; - price: string; - currency: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/signature/generate", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - "x-thirdweb-sdk-version": xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-20 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20TotalSupply( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +name: string; +symbol: string; +decimals: string; +/** + * Value in wei + */ +value: string; +/** + * Value in tokens + */ +displayValue: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/total-supply', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can - * claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active - * claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc20CanClaim( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - quantity: quantity, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc20SignatureGenerate( +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | ({ +to: string; +primarySaleRecipient?: string; +price?: string; +priceInWei?: string; +currency?: string; +validityStartTimestamp: number; +validityEndTimestamp?: number; +uid?: string; +} & ({ +quantity: string; +} | { +quantityWei: string; +}))), +): CancelablePromise<{ +result: ({ +payload: { +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +to: string; +primarySaleRecipient: string; +quantity: string; +price: string; +currency: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/signature/generate', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + 'x-thirdweb-sdk-version': xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retrieve the currently active claim phase, if any. - * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc20GetActiveClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc20CanClaim( +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'quantity': quantity, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured. - * Get all the claim phases configured on the drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc20GetAllClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Retrieve the currently active claim phase, if any. + * Retrieve the currently active claim phase, if any. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc20GetActiveClaimConditions( +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimConditionsGetClaimIneligibilityReasons( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array< - | string - | ( - | "There is not enough supply to claim." - | "This address is not on the allowlist." - | "Not enough time since last claim transaction. Please wait." - | "Claim phase has not started yet." - | "You have already claimed the token." - | "Incorrect price or currency." - | "Cannot claim more than maximum allowed quantity." - | "There are not enough tokens in the wallet to pay for the claim." - | "There is no active claim phase at the moment. Please check back in later." - | "There is no claim condition set." - | "No wallet connected." - | "No claim conditions found." - ) - >; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - quantity: quantity, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured. + * Get all the claim phases configured on the drop contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc20GetAllClaimConditions( +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for - * the given wallet address. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimConditionsGetClaimerProofs( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimConditionsGetClaimIneligibilityReasons( +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'quantity': quantity, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set allowance - * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SetAllowance( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to allow transfers from - */ - spenderAddress: string; - /** - * The number of tokens to give as allowance - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/set-allowance", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimConditionsGetClaimerProofs( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens - * Transfer ERC-20 tokens from the caller wallet to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20Transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - toAddress: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/transfer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set allowance + * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SetAllowance( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to allow transfers from + */ +spenderAddress: string; +/** + * The number of tokens to give as allowance + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/set-allowance', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer tokens from wallet - * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20TransferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - fromAddress: string; - /** - * The recipient address. - */ - toAddress: string; - /** - * The amount of tokens to transfer. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/transfer-from", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens + * Transfer ERC-20 tokens from the caller wallet to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20Transfer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +toAddress: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/transfer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-20 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20Burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The amount of tokens you want to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/burn", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer tokens from wallet + * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20TransferFrom( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +fromAddress: string; +/** + * The recipient address. + */ +toAddress: string; +/** + * The amount of tokens to transfer. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/transfer-from', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token from wallet - * Burn ERC-20 tokens in a specific wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20BurnFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet sending the tokens - */ - holderAddress: string; - /** - * The amount of this token you want to burn - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/burn-from", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-20 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20Burn( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The amount of tokens you want to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/burn', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20ClaimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The wallet address to receive the claimed tokens. - */ - recipient: string; - /** - * The amount of tokens to claim. - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/claim-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token from wallet + * Burn ERC-20 tokens in a specific wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20BurnFrom( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet sending the tokens + */ +holderAddress: string; +/** + * The amount of this token you want to burn + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/burn-from', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-20 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20MintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - data: Array<{ - /** - * The address to mint tokens to - */ - toAddress: string; - /** - * The number of tokens to mint to the specific address. - */ - amount: string; - }>; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/mint-batch-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-20 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20ClaimTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The wallet address to receive the claimed tokens. + */ +recipient: string; +/** + * The amount of tokens to claim. + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/claim-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC20 contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20MintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint tokens to - */ - toAddress: string; - /** - * The amount of tokens you want to send - */ - amount: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/mint-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-20 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20MintBatchTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +data: Array<{ +/** + * The address to mint tokens to + */ +toAddress: string; +/** + * The number of tokens to mint to the specific address. + */ +amount: string; +}>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/mint-batch-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-20 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SignatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/signature/mint", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-20 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC20 contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20MintTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint tokens to + */ +toAddress: string; +/** + * The amount of tokens you want to send + */ +amount: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/mint-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for the drop. - * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a - * free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20SetClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInputs: Array<{ - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/set", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-20 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SignatureMint( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: { +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/signature/mint', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Overwrite the claim conditions for the drop. + * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20SetClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/set', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update a single claim phase. + * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc20UpdateClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update a single claim phase. - * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index - * is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, - * the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, - * with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc20UpdateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInput: { - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc20/claim-conditions/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 15565cd1e..8ae8559f4 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -2,2570 +2,2419 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class Erc721Service { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get details - * Get the details for a token in an ERC-721 contract. - * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721Get( - tokenId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/get", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all details - * Get details for all tokens in an ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param start The start token id for paginated results. Defaults to 0. - * @param count The page count for paginated results. Defaults to 100. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetAll( - chain: string, - contractAddress: string, - start?: number, - count?: number, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - start: start, - count: count, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get details + * Get the details for a token in an ERC-721 contract. + * @param tokenId The tokenId of the NFT to retrieve + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721Get( +tokenId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/get', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get owned tokens - * Get all tokens in an ERC-721 contract owned by a specific wallet. - * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721GetOwned( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: Array<{ - metadata: Record; - owner: string; - type: "ERC1155" | "ERC721" | "metaplex"; - supply: string; - quantityOwned?: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/get-owned", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all details + * Get details for all tokens in an ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param start The start token id for paginated results. Defaults to 0. + * @param count The page count for paginated results. Defaults to 100. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetAll( +chain: string, +contractAddress: string, +start?: number, +count?: number, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'start': start, + 'count': count, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get token balance - * Get the balance of a specific wallet address for this ERC-721 contract. - * @param walletAddress Address of the wallet to check NFT balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721BalanceOf( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/balance-of", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get owned tokens + * Get all tokens in an ERC-721 contract owned by a specific wallet. + * @param walletAddress Address of the wallet to get NFTs for + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721GetOwned( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: Array<{ +metadata: Record; +owner: string; +type: ('ERC1155' | 'ERC721' | 'metaplex'); +supply: string; +quantityOwned?: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/get-owned', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if approved transfers - * Check if the specific wallet has approved transfers from a specific operator wallet. - * @param ownerWallet Address of the wallet who owns the NFT - * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721IsApproved( - ownerWallet: string, - operator: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/is-approved", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - ownerWallet: ownerWallet, - operator: operator, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get token balance + * Get the balance of a specific wallet address for this ERC-721 contract. + * @param walletAddress Address of the wallet to check NFT balance + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721BalanceOf( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/balance-of', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total supply - * Get the total supply in circulation for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/total-count", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if approved transfers + * Check if the specific wallet has approved transfers from a specific operator wallet. + * @param ownerWallet Address of the wallet who owns the NFT + * @param operator Address of the operator to check approval on + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721IsApproved( +ownerWallet: string, +operator: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/is-approved', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'ownerWallet': ownerWallet, + 'operator': operator, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimed supply - * Get the claimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalClaimedSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/total-claimed-supply", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total supply + * Get the total supply in circulation for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalCount( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/total-count', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get unclaimed supply - * Get the unclaimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721TotalUnclaimedSupply( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimed supply + * Get the claimed supply for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalClaimedSupply( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/total-claimed-supply', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check if tokens are available for claiming - * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can - * claim. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active - * claim phase, including allowlists, previous claims, etc. - * @returns any Default Response - * @throws ApiError - */ - public erc721CanClaim( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - quantity: quantity, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get unclaimed supply + * Get the unclaimed supply for this ERC-721 contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721TotalUnclaimedSupply( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retrieve the currently active claim phase, if any. - * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetActiveClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: { - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check if tokens are available for claiming + * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. + * @returns any Default Response + * @throws ApiError + */ + public erc721CanClaim( +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'quantity': quantity, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all the claim phases configured for the drop. - * Get all the claim phases configured for the drop. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param withAllowList Provide a boolean value to include the allowlist in the response. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetAllClaimConditions( - chain: string, - contractAddress: string, - withAllowList?: boolean, - ): CancelablePromise<{ - result: Array<{ - maxClaimableSupply?: string | number; - startTime: string; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash: string | Array; - availableSupply: string; - currentMintSupply: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyMetadata: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - metadata?: { - name?: string; - }; - snapshot?: null | Array; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - withAllowList: withAllowList, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Retrieve the currently active claim phase, if any. + * Retrieve the currently active claim phase, if any. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetActiveClaimConditions( +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: { +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claim ineligibility reasons - * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. - * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param addressToCheck The wallet address to check if it can claim tokens. - * @returns any Default Response - * @throws ApiError - */ - public erc721GetClaimIneligibilityReasons( - quantity: string, - chain: string, - contractAddress: string, - addressToCheck?: string, - ): CancelablePromise<{ - result: Array< - | string - | ( - | "There is not enough supply to claim." - | "This address is not on the allowlist." - | "Not enough time since last claim transaction. Please wait." - | "Claim phase has not started yet." - | "You have already claimed the token." - | "Incorrect price or currency." - | "Cannot claim more than maximum allowed quantity." - | "There are not enough tokens in the wallet to pay for the claim." - | "There is no active claim phase at the moment. Please check back in later." - | "There is no claim condition set." - | "No wallet connected." - | "No claim conditions found." - ) - >; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - quantity: quantity, - addressToCheck: addressToCheck, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all the claim phases configured for the drop. + * Get all the claim phases configured for the drop. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param withAllowList Provide a boolean value to include the allowlist in the response. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetAllClaimConditions( +chain: string, +contractAddress: string, +withAllowList?: boolean, +): CancelablePromise<{ +result: Array<{ +maxClaimableSupply?: (string | number); +startTime: string; +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash: (string | Array); +availableSupply: string; +currentMintSupply: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyMetadata: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +metadata?: { +name?: string; +}; +snapshot?: (null | Array); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'withAllowList': withAllowList, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get claimer proofs - * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for - * the given wallet address. - * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public erc721GetClaimerProofs( - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: null | { - price?: string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - /** - * A contract or wallet address - */ - address: string; - maxClaimable: string; - proof: Array; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claim ineligibility reasons + * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. + * @param quantity The amount of tokens to claim. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param addressToCheck The wallet address to check if it can claim tokens. + * @returns any Default Response + * @throws ApiError + */ + public erc721GetClaimIneligibilityReasons( +quantity: string, +chain: string, +contractAddress: string, +addressToCheck?: string, +): CancelablePromise<{ +result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'quantity': quantity, + 'addressToCheck': addressToCheck, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for all - * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for - * any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetApprovalForAll( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * whether to approve or revoke approval - */ - approved: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/set-approval-for-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get claimer proofs + * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. + * @param walletAddress The wallet address to get the merkle proofs for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public erc721GetClaimerProofs( +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: (null | { +price?: string; +/** + * A contract or wallet address + */ +currencyAddress?: string; +/** + * A contract or wallet address + */ +address: string; +maxClaimable: string; +proof: Array; +}); +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Set approval for token - * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetApprovalForToken( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the operator to give approval to - */ - operator: string; - /** - * the tokenId to give approval for - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/set-approval-for-token", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for all + * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetApprovalForAll( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * whether to approve or revoke approval + */ +approved: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token - * Transfer an ERC-721 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721Transfer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/transfer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Set approval for token + * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetApprovalForToken( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the operator to give approval to + */ +operator: string; +/** + * the tokenId to give approval for + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-token', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721TransferFrom( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The sender address. - */ - from: string; - /** - * The recipient address. - */ - to: string; - /** - * The token ID to transfer. - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/transfer-from", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token + * Transfer an ERC-721 token from the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721Transfer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/transfer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens - * Mint ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721MintTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/mint-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721TransferFrom( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The sender address. + */ +from: string; +/** + * The recipient address. + */ +to: string; +/** + * The token ID to transfer. + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/transfer-from', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Mint tokens (batch) - * Mint ERC-721 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721MintBatchTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to mint the NFT to - */ - receiver: string; - metadatas: Array< - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string - >; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/mint-batch-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens + * Mint ERC-721 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721MintTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/mint-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Burn token - * Burn ERC-721 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721Burn( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The token ID to burn - */ - tokenId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/burn", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Mint tokens (batch) + * Mint ERC-721 tokens to multiple wallets in one transaction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721MintBatchTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to mint the NFT to + */ +receiver: string; +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/mint-batch-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Lazy mint - * Lazy mint ERC-721 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721LazyMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - metadatas: Array< - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string - >; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/lazy-mint", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Burn token + * Burn ERC-721 tokens in the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721Burn( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The token ID to burn + */ +tokenId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/burn', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Claim tokens to wallet - * Claim ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721ClaimTo( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Address of the wallet to claim the NFT to - */ - receiver: string; - /** - * Quantity of NFTs to mint - */ - quantity: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/claim-to", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Lazy mint + * Lazy mint ERC-721 tokens to be claimed in the future. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721LazyMint( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +metadatas: Array<({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string)>; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/lazy-mint', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Generate signature - * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is - * typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @param xBackendWalletAddress Backend wallet address - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc721SignatureGenerate( - chain: string, - contractAddress: string, - xBackendWalletAddress?: string, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - xThirdwebSdkVersion?: string, - requestBody?: - | { - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address - * of the contract. - */ - royaltyRecipient?: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps?: number; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient?: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid?: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults - * to NATIVE_TOKEN_ADDRESS - */ - currencyAddress?: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - mintStartTime?: string | number; - mintEndTime?: string | number; - } - | { - metadata: - | string - | { - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - }; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The amount of the "currency" token this token costs. Example: "0.1" - */ - price?: string; - /** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for - * the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ - priceInWei?: string; - /** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ - currency?: string; - /** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the - * "primarySaleRecipient" address of the contract. - */ - primarySaleRecipient?: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" - * address of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ - royaltyBps?: number; - /** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ - validityStartTimestamp?: number; - /** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ - validityEndTimestamp?: number; - /** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once - * on-chain. - */ - uid?: string; - }, - ): CancelablePromise<{ - result: - | { - payload: { - uri: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient - * address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - }; - signature: string; - } - | { - payload: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/signature/generate", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - "x-thirdweb-sdk-version": xThirdwebSdkVersion, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Claim tokens to wallet + * Claim ERC-721 tokens to a specific wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721ClaimTo( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Address of the wallet to claim the NFT to + */ +receiver: string; +/** + * Quantity of NFTs to mint + */ +quantity: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/claim-to', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Signature mint - * Mint ERC-721 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SignatureMint( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - payload: - | { - uri: string; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient - * address of the contract. - */ - royaltyRecipient: string; - /** - * The number of tokens this signature can be used to mint. - */ - quantity: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ - royaltyBps: string; - /** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the - * primarySaleRecipient address of the contract. - */ - primarySaleRecipient: string; - /** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ - uid: string; - metadata: - | { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - } - | string; - /** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). - * Defaults to NATIVE_TOKEN_ADDRESS - */ - currencyAddress: string; - /** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ - price?: string; - /** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ - mintStartTime: number; - /** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ - mintEndTime: number; - } - | { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - signature: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/signature/mint", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Generate signature + * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @param xBackendWalletAddress Backend wallet address + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc721SignatureGenerate( +chain: string, +contractAddress: string, +xBackendWalletAddress?: string, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +xThirdwebSdkVersion?: string, +requestBody?: ({ +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient?: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps?: number; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient?: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid?: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress?: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +mintStartTime?: (string | number); +mintEndTime?: (string | number); +} | { +metadata: (string | { +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +}); +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The amount of the "currency" token this token costs. Example: "0.1" + */ +price?: string; +/** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ +priceInWei?: string; +/** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ +currency?: string; +/** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ +primarySaleRecipient?: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ +royaltyBps?: number; +/** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ +validityStartTimestamp?: number; +/** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ +validityEndTimestamp?: number; +/** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ +uid?: string; +}), +): CancelablePromise<{ +result: ({ +payload: { +uri: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +}; +signature: string; +} | { +payload: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +signature: string; +}); +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/signature/generate', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + 'x-thirdweb-sdk-version': xThirdwebSdkVersion, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Overwrite the claim conditions for the drop. - * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a - * free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721SetClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInputs: Array<{ - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }>; - resetClaimEligibilityForAll?: boolean; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/set", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Signature mint + * Mint ERC-721 tokens from a generated signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SignatureMint( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +payload: ({ +uri: string; +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ +royaltyRecipient: string; +/** + * The number of tokens this signature can be used to mint. + */ +quantity: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ +royaltyBps: string; +/** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ +primarySaleRecipient: string; +/** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ +uid: string; +metadata: ({ +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +} | string); +/** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ +currencyAddress: string; +/** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ +price?: string; +/** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ +mintStartTime: number; +/** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ +mintEndTime: number; +} | { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}); +signature: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/signature/mint', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update a single claim phase. - * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index - * is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, - * the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, - * with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721UpdateClaimConditions( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - claimConditionInput: { - maxClaimableSupply?: string | number; - startTime?: string | number; - price?: number | string; - /** - * A contract or wallet address - */ - currencyAddress?: string; - maxClaimablePerWallet?: number | string; - waitInSeconds?: number | string; - merkleRootHash?: string | Array; - metadata?: { - name?: string; - }; - snapshot?: Array | null; - }; - /** - * Index of the claim condition to update - */ - index: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/claim-conditions/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Overwrite the claim conditions for the drop. + * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721SetClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInputs: Array<{ +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}>; +resetClaimEligibilityForAll?: boolean; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/set', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Prepare signature - * Prepares a payload for a wallet to generate a signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress ERC721 contract address - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public erc721SignaturePrepare( - chain: string, - contractAddress: string, - requestBody: { - metadata: - | string - | { - /** - * The name of the NFT - */ - name?: string; - /** - * The description of the NFT - */ - description?: string; - /** - * The image of the NFT - */ - image?: string; - /** - * The animation url of the NFT - */ - animation_url?: string; - /** - * The external url of the NFT - */ - external_url?: string; - /** - * The background color of the NFT - */ - background_color?: string; - /** - * (not recommended - use "attributes") The properties of the NFT. - */ - properties?: any; - /** - * Arbitrary metadata for this item. - */ - attributes?: Array<{ - trait_type: string; - value: string; - }>; - }; - /** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from - * intercepting the signature and using it to mint tokens for themselves. - */ - to: string; - /** - * The amount of the "currency" token this token costs. Example: "0.1" - */ - price?: string; - /** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for - * the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ - priceInWei?: string; - /** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ - currency?: string; - /** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the - * "primarySaleRecipient" address of the contract. - */ - primarySaleRecipient?: string; - /** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" - * address of the contract. - */ - royaltyRecipient?: string; - /** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ - royaltyBps?: number; - /** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ - validityStartTimestamp?: number; - /** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ - validityEndTimestamp?: number; - /** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once - * on-chain. - */ - uid?: string; - }, - ): CancelablePromise<{ - result: { - mintPayload: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - /** - * The payload to sign with a wallet's `signTypedData` method. - */ - typedDataPayload: { - /** - * Specifies the contextual information used to prevent signature reuse across different contexts. - */ - domain: { - name: string; - version: string; - chainId: number; - verifyingContract: string; - }; - /** - * Defines the structure of the data types used in the message. - */ - types: { - EIP712Domain: Array<{ - name: string; - type: string; - }>; - MintRequest: Array<{ - name: string; - type: string; - }>; - }; - /** - * The structured data to be signed. - */ - message: { - uri: string; - to: string; - price: string; - /** - * A contract or wallet address - */ - currency: string; - primarySaleRecipient: string; - royaltyRecipient: string; - royaltyBps: string; - validityStartTimestamp: number; - validityEndTimestamp: number; - uid: string; - }; - /** - * The main type of the data in the message corresponding to a defined type in the `types` field. - */ - primaryType: "MintRequest"; - }; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/signature/prepare", - path: { - chain: chain, - contractAddress: contractAddress, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update a single claim phase. + * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721UpdateClaimConditions( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +claimConditionInput: { +maxClaimableSupply?: (string | number); +startTime?: (string | number); +price?: (number | string); +/** + * A contract or wallet address + */ +currencyAddress?: string; +maxClaimablePerWallet?: (number | string); +waitInSeconds?: (number | string); +merkleRootHash?: (string | Array); +metadata?: { +name?: string; +}; +snapshot?: (Array | null); +}; +/** + * Index of the claim condition to update + */ +index: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Prepare signature + * Prepares a payload for a wallet to generate a signature. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress ERC721 contract address + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public erc721SignaturePrepare( +chain: string, +contractAddress: string, +requestBody: { +metadata: (string | { +/** + * The name of the NFT + */ +name?: string; +/** + * The description of the NFT + */ +description?: string; +/** + * The image of the NFT + */ +image?: string; +/** + * The animation url of the NFT + */ +animation_url?: string; +/** + * The external url of the NFT + */ +external_url?: string; +/** + * The background color of the NFT + */ +background_color?: string; +/** + * (not recommended - use "attributes") The properties of the NFT. + */ +properties?: any; +/** + * Arbitrary metadata for this item. + */ +attributes?: Array<{ +trait_type: string; +value: string; +}>; +}); +/** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ +to: string; +/** + * The amount of the "currency" token this token costs. Example: "0.1" + */ +price?: string; +/** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ +priceInWei?: string; +/** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ +currency?: string; +/** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ +primarySaleRecipient?: string; +/** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ +royaltyRecipient?: string; +/** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ +royaltyBps?: number; +/** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ +validityStartTimestamp?: number; +/** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ +validityEndTimestamp?: number; +/** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ +uid?: string; +}, +): CancelablePromise<{ +result: { +mintPayload: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +/** + * The payload to sign with a wallet's `signTypedData` method. + */ +typedDataPayload: { +/** + * Specifies the contextual information used to prevent signature reuse across different contexts. + */ +domain: { +name: string; +version: string; +chainId: number; +verifyingContract: string; +}; +/** + * Defines the structure of the data types used in the message. + */ +types: { +EIP712Domain: Array<{ +name: string; +type: string; +}>; +MintRequest: Array<{ +name: string; +type: string; +}>; +}; +/** + * The structured data to be signed. + */ +message: { +uri: string; +to: string; +price: string; +/** + * A contract or wallet address + */ +currency: string; +primarySaleRecipient: string; +royaltyRecipient: string; +royaltyBps: string; +validityStartTimestamp: number; +validityEndTimestamp: number; +uid: string; +}; +/** + * The main type of the data in the message corresponding to a defined type in the `types` field. + */ +primaryType: 'MintRequest'; +}; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/signature/prepare', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Update token metadata + * Update the metadata for an ERC721 token. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public erc721UpdateTokenMetadata( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * Token ID to update metadata + */ +tokenId: string; +metadata: { +/** + * The name of the NFT + */ +name?: (string | number | null); +/** + * The description of the NFT + */ +description?: (string | null); +/** + * The image of the NFT + */ +image?: (string | null); +/** + * The external url of the NFT + */ +external_url?: (string | null); +/** + * The animation url of the NFT + */ +animation_url?: (string | null); +/** + * The properties of the NFT + */ +properties?: any; +/** + * The attributes of the NFT + */ +attributes?: any; +/** + * The background color of the NFT + */ +background_color?: (string | null); +}; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/contract/{chain}/{contractAddress}/erc721/token/update', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update token metadata - * Update the metadata for an ERC721 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public erc721UpdateTokenMetadata( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * Token ID to update metadata - */ - tokenId: string; - metadata: { - /** - * The name of the NFT - */ - name?: string | number | null; - /** - * The description of the NFT - */ - description?: string | null; - /** - * The image of the NFT - */ - image?: string | null; - /** - * The external url of the NFT - */ - external_url?: string | null; - /** - * The animation url of the NFT - */ - animation_url?: string | null; - /** - * The properties of the NFT - */ - properties?: any; - /** - * The attributes of the NFT - */ - attributes?: any; - /** - * The background color of the NFT - */ - background_color?: string | null; - }; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/contract/{chain}/{contractAddress}/erc721/token/update", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/KeypairService.ts b/sdk/src/services/KeypairService.ts index c63e7fcac..27094c3b7 100644 --- a/sdk/src/services/KeypairService.ts +++ b/sdk/src/services/KeypairService.ts @@ -2,145 +2,144 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class KeypairService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * List public keys - * List the public keys configured with Engine - * @returns any Default Response - * @throws ApiError - */ - public list(): CancelablePromise<{ - result: Array<{ - /** - * A unique identifier for the keypair - */ - hash: string; - /** - * The public key - */ - publicKey: string; - /** - * The keypair algorithm. - */ - algorithm: string; - /** - * A description for the keypair. - */ - label?: string; - /** - * When the keypair was added - */ - createdAt: string; - /** - * When the keypair was updated - */ - updatedAt: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/auth/keypair/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Add public key - * Add the public key for a keypair - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public add(requestBody: { /** - * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. + * List public keys + * List the public keys configured with Engine + * @returns any Default Response + * @throws ApiError */ - publicKey: string; - algorithm: - | "RS256" - | "RS384" - | "RS512" - | "ES256" - | "ES384" - | "ES512" - | "PS256" - | "PS384" - | "PS512"; - label?: string; - }): CancelablePromise<{ - result: { - keypair: { - /** - * A unique identifier for the keypair - */ - hash: string; - /** - * The public key - */ - publicKey: string; - /** - * The keypair algorithm. - */ - algorithm: string; - /** - * A description for the keypair. - */ - label?: string; - /** - * When the keypair was added - */ - createdAt: string; - /** - * When the keypair was updated - */ - updatedAt: string; - }; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/keypair/add", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public list(): CancelablePromise<{ +result: Array<{ +/** + * A unique identifier for the keypair + */ +hash: string; +/** + * The public key + */ +publicKey: string; +/** + * The keypair algorithm. + */ +algorithm: string; +/** + * A description for the keypair. + */ +label?: string; +/** + * When the keypair was added + */ +createdAt: string; +/** + * When the keypair was updated + */ +updatedAt: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/auth/keypair/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Add public key + * Add the public key for a keypair + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public add( +requestBody: { +/** + * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. + */ +publicKey: string; +algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); +label?: string; +}, +): CancelablePromise<{ +result: { +keypair: { +/** + * A unique identifier for the keypair + */ +hash: string; +/** + * The public key + */ +publicKey: string; +/** + * The keypair algorithm. + */ +algorithm: string; +/** + * A description for the keypair. + */ +label?: string; +/** + * When the keypair was added + */ +createdAt: string; +/** + * When the keypair was updated + */ +updatedAt: string; +}; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/keypair/add', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Remove public key + * Remove the public key for a keypair + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public remove( +requestBody: { +hash: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/keypair/remove', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Remove public key - * Remove the public key for a keypair - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public remove(requestBody: { hash: string }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/keypair/remove", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index 32d1f91cd..a9d72f07f 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -2,1122 +2,1076 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class MarketplaceDirectListingsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all listings - * Get all direct listings for this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllDirectListings( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - seller: seller, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all valid listings - * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, - * and the creator still owns & has approved Marketplace to transfer the listed NFTs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidDirectListings( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - seller: seller, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all listings + * Get all direct listings for this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllDirectListings( +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'seller': seller, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get direct listing - * Gets a direct listing on this marketplace contract. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDirectListing( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The listing ID. - */ - id: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValuePerToken?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimeInSeconds?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimeInSeconds?: number; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid listings + * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidDirectListings( +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'seller': seller, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check approved buyer - * Check if a buyer is approved to purchase a specific direct listing. - * @param listingId The id of the listing to retrieve. - * @param walletAddress The wallet address of the buyer to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isBuyerApprovedForDirectListings( - listingId: string, - walletAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - walletAddress: walletAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get direct listing + * Gets a direct listing on this marketplace contract. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDirectListing( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The listing ID. + */ +id: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValuePerToken?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimeInSeconds?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimeInSeconds?: number; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check approved currency - * Check if a currency is approved for a specific direct listing. - * @param listingId The id of the listing to retrieve. - * @param currencyContractAddress The smart contract address of the ERC20 token to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isCurrencyApprovedForDirectListings( - listingId: string, - currencyContractAddress: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - currencyContractAddress: currencyContractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check approved buyer + * Check if a buyer is approved to purchase a specific direct listing. + * @param listingId The id of the listing to retrieve. + * @param walletAddress The wallet address of the buyer to check. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isBuyerApprovedForDirectListings( +listingId: string, +walletAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + 'walletAddress': walletAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Transfer token from wallet - * Get the total number of direct listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getDirectListingsTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Check approved currency + * Check if a currency is approved for a specific direct listing. + * @param listingId The id of the listing to retrieve. + * @param currencyContractAddress The smart contract address of the ERC20 token to check. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isCurrencyApprovedForDirectListings( +listingId: string, +currencyContractAddress: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + 'currencyContractAddress': currencyContractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create direct listing - * Create a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public createDirectListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/create-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Transfer token from wallet + * Get the total number of direct listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getDirectListingsTotalCount( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update direct listing - * Update a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public updateDirectListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to update. - */ - listingId: string; - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The price to pay per unit of NFTs listed. - */ - pricePerToken: string; - /** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ - isReservedListing?: boolean; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/update-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create direct listing + * Create a direct listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public createDirectListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/create-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Buy from direct listing - * Buy from a specific direct listing from this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public buyFromDirectListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The number of tokens to buy (default is 1 for ERC721 NFTs). - */ - quantity: string; - /** - * The wallet address of the buyer. - */ - buyer: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Update direct listing + * Update a direct listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public updateDirectListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to update. + */ +listingId: string; +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The price to pay per unit of NFTs listed. + */ +pricePerToken: string; +/** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ +isReservedListing?: boolean; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/update-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Approve buyer for reserved listing - * Approve a wallet address to buy from a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public approveBuyerForReservedListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - buyer: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Buy from direct listing + * Buy from a specific direct listing from this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public buyFromDirectListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The number of tokens to buy (default is 1 for ERC721 NFTs). + */ +quantity: string; +/** + * The wallet address of the buyer. + */ +buyer: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke approval for reserved listings - * Revoke approval for a buyer to purchase a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeBuyerApprovalForReservedListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - buyerAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Approve buyer for reserved listing + * Approve a wallet address to buy from a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public approveBuyerForReservedListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +buyer: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke currency approval for reserved listing - * Revoke approval of a currency for a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public revokeCurrencyApprovalForListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to approve a buyer for. - */ - listingId: string; - /** - * The wallet address of the buyer to approve. - */ - currencyContractAddress: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke approval for reserved listings + * Revoke approval for a buyer to purchase a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeBuyerApprovalForReservedListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +buyerAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke currency approval for reserved listing + * Revoke approval of a currency for a reserved listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public revokeCurrencyApprovalForListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to approve a buyer for. + */ +listingId: string; +/** + * The wallet address of the buyer to approve. + */ +currencyContractAddress: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Cancel direct listing + * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public cancelDirectListing( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the listing you want to cancel. + */ +listingId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Cancel direct listing - * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public cancelDirectListing( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the listing you want to cancel. - */ - listingId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index 6bf34f03c..4570b18fa 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -2,949 +2,937 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class MarketplaceEnglishAuctionsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all English auctions - * Get all English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllEnglishAuctions( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - seller: seller, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all valid English auctions - * Get all valid English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param seller Being sold by this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidEnglishAuctions( - chain: string, - contractAddress: string, - count?: number, - seller?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - seller: seller, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all English auctions + * Get all English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllEnglishAuctions( +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'seller': seller, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get English auction - * Get a specific English auction listing on this marketplace contract. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuction( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The listing ID. - */ - id: string; - /** - * The minimum price that a bid must be in order to be accepted. - */ - minimumBidAmount?: string; - /** - * The buyout price of the auction. - */ - buyoutBidAmount: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - buyoutCurrencyValue: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - /** - * This is a buffer e.g. x seconds. - */ - timeBufferInSeconds: number; - /** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ - bidBufferBps: number; - /** - * The start time of the auction. - */ - startTimeInSeconds: number; - /** - * The end time of the auction. - */ - endTimeInSeconds: number; - asset?: Record; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-auction", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid English auctions + * Get all valid English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param seller Being sold by this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidEnglishAuctions( +chain: string, +contractAddress: string, +count?: number, +seller?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'seller': seller, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get bid buffer BPS - * Get the basis points of the bid buffer. - * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. - * If there is no current bid, the bid must be at least the minimum bid amount. - * Returns the value in percentage format, e.g. 100 = 1%. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsBidBufferBps( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ /** - * Returns a number representing the basis points of the bid buffer. + * Get English auction + * Get a specific English auction listing on this marketplace contract. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - result: number; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getEnglishAuction( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The listing ID. + */ +id: string; +/** + * The minimum price that a bid must be in order to be accepted. + */ +minimumBidAmount?: string; +/** + * The buyout price of the auction. + */ +buyoutBidAmount: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +buyoutCurrencyValue: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +/** + * This is a buffer e.g. x seconds. + */ +timeBufferInSeconds: number; +/** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ +bidBufferBps: number; +/** + * The start time of the auction. + */ +startTimeInSeconds: number; +/** + * The end time of the auction. + */ +endTimeInSeconds: number; +asset?: Record; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-auction', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get minimum next bid - * Helper function to calculate the value that the next bid must be in order to be accepted. - * If there is no current bid, the bid must be at least the minimum bid amount. - * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. - * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsMinimumNextBid( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. + * Get bid buffer BPS + * Get the basis points of the bid buffer. + * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. + * If there is no current bid, the bid must be at least the minimum bid amount. + * Returns the value in percentage format, e.g. 100 = 1%. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError */ - result: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public getEnglishAuctionsBidBufferBps( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * Returns a number representing the basis points of the bid buffer. + */ +result: number; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get winning bid - * Get the current highest bid of an active auction. - * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsWinningBid( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result?: { - /** - * The id of the auction. - */ - auctionId?: string; - /** - * The address of the buyer who made the offer. - */ - bidderAddress?: string; - /** - * The currency contract address of the offer token. - */ - currencyContractAddress?: string; - /** - * The amount of coins offered per token. - */ - bidAmount?: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - bidAmountCurrencyValue?: { - name?: string; - symbol?: string; - decimals?: number; - value?: string; - displayValue?: string; - }; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get minimum next bid + * Helper function to calculate the value that the next bid must be in order to be accepted. + * If there is no current bid, the bid must be at least the minimum bid amount. + * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. + * @param listingId The id of the listing to retrieve. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsMinimumNextBid( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +result: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total listings - * Get the count of English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get winning bid + * Get the current highest bid of an active auction. + * @param listingId The ID of the listing to retrieve the winner for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsWinningBid( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result?: { +/** + * The id of the auction. + */ +auctionId?: string; +/** + * The address of the buyer who made the offer. + */ +bidderAddress?: string; +/** + * The currency contract address of the offer token. + */ +currencyContractAddress?: string; +/** + * The amount of coins offered per token. + */ +bidAmount?: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +bidAmountCurrencyValue?: { +name?: string; +symbol?: string; +decimals?: number; +value?: string; +displayValue?: string; +}; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Check winning bid - * Check if a bid is or will be the winning bid for an auction. - * @param listingId The ID of the listing to retrieve the winner for. - * @param bidAmount The amount of the bid to check if it is the winning bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public isEnglishAuctionsWinningBid( - listingId: string, - bidAmount: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: boolean; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - bidAmount: bidAmount, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total listings + * Get the count of English auction listings on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsTotalCount( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Check winning bid + * Check if a bid is or will be the winning bid for an auction. + * @param listingId The ID of the listing to retrieve the winner for. + * @param bidAmount The amount of the bid to check if it is the winning bid. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public isEnglishAuctionsWinningBid( +listingId: string, +bidAmount: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: boolean; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + 'bidAmount': bidAmount, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get winner + * Get the winner of an English auction. Can only be called after the auction has ended. + * @param listingId The ID of the listing to retrieve the winner for. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getEnglishAuctionsWinner( +listingId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winner', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'listingId': listingId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get winner - * Get the winner of an English auction. Can only be called after the auction has ended. - * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getEnglishAuctionsWinner( - listingId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/get-winner", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - listingId: listingId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Buyout English auction + * Buyout the listing for this auction. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public buyoutEnglishAuction( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to buy NFT(s) from. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Buyout English auction - * Buyout the listing for this auction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public buyoutEnglishAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to buy NFT(s) from. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Cancel English auction + * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public cancelEnglishAuction( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to cancel auction. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Cancel English auction - * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled - * once a bid has been made. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public cancelEnglishAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to cancel auction. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create English auction + * Create an English auction listing on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public createEnglishAuction( +chain: string, +contractAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The start time of the listing. If not set, defaults to now. + */ +startTimestamp?: number; +/** + * The end time of the listing. If not set, defaults to 7 days from now. + */ +endTimestamp?: number; +/** + * amount to buy the NFT and close the listing. + */ +buyoutBidAmount: string; +/** + * Minimum amount that bids must be to placed + */ +minimumBidAmount: string; +/** + * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) + */ +bidBufferBps?: string; +/** + * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) + */ +timeBufferInSeconds?: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/create-auction', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Create English auction - * Create an English auction listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public createEnglishAuction( - chain: string, - contractAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The start time of the listing. If not set, defaults to now. - */ - startTimestamp?: number; - /** - * The end time of the listing. If not set, defaults to 7 days from now. - */ - endTimestamp?: number; - /** - * amount to buy the NFT and close the listing. - */ - buyoutBidAmount: string; - /** - * Minimum amount that bids must be to placed - */ - minimumBidAmount: string; - /** - * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) - */ - bidBufferBps?: string; - /** - * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in - * seconds) - */ - timeBufferInSeconds?: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/create-auction", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Close English auction for bidder + * After an auction has concluded (and a buyout did not occur), + * execute the sale for the buyer, meaning the buyer receives the NFT(s). + * You must also call closeAuctionForSeller to execute the sale for the seller, + * meaning the seller receives the payment from the highest bid. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public closeEnglishAuctionForBidder( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Close English auction for bidder - * After an auction has concluded (and a buyout did not occur), - * execute the sale for the buyer, meaning the buyer receives the NFT(s). - * You must also call closeAuctionForSeller to execute the sale for the seller, - * meaning the seller receives the payment from the highest bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public closeEnglishAuctionForBidder( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Close English auction for seller + * After an auction has concluded (and a buyout did not occur), + * execute the sale for the seller, meaning the seller receives the payment from the highest bid. + * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public closeEnglishAuctionForSeller( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Close English auction for seller - * After an auction has concluded (and a buyout did not occur), - * execute the sale for the seller, meaning the seller receives the payment from the highest bid. - * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public closeEnglishAuctionForSeller( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Execute sale + * Close the auction for both buyer and seller. + * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. + * This function can only be called after the auction has ended. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public executeEnglishAuctionSale( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to execute the sale for. + */ +listingId: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Execute sale - * Close the auction for both buyer and seller. - * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. - * This function can only be called after the auction has ended. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public executeEnglishAuctionSale( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to execute the sale for. - */ - listingId: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Make bid + * Place a bid on an English auction listing. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @returns any Default Response + * @throws ApiError + */ + public makeEnglishAuctionBid( +chain: string, +contractAddress: string, +requestBody: { +/** + * The ID of the listing to place a bid on. + */ +listingId: string; +/** + * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. + */ +bidAmount: string; +}, +simulateTx: boolean = false, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/english-auctions/make-bid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Make bid - * Place a bid on an English auction listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @returns any Default Response - * @throws ApiError - */ - public makeEnglishAuctionBid( - chain: string, - contractAddress: string, - requestBody: { - /** - * The ID of the listing to place a bid on. - */ - listingId: string; - /** - * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount - * for the next bid. - */ - bidAmount: string; - }, - simulateTx: boolean = false, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/english-auctions/make-bid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index 15519deb3..89e3f71f3 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -2,603 +2,582 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class MarketplaceOffersService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all offers - * Get all offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param offeror has offers from this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllMarketplaceOffers( - chain: string, - contractAddress: string, - count?: number, - offeror?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/offers/get-all", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - offeror: offeror, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all valid offers - * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, - * or been accepted. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param count Number of listings to fetch - * @param offeror has offers from this Address - * @param start Start from this index (pagination) - * @param tokenContract Token contract address to show NFTs from - * @param tokenId Only show NFTs with this ID - * @returns any Default Response - * @throws ApiError - */ - public getAllValidMarketplaceOffers( - chain: string, - contractAddress: string, - count?: number, - offeror?: string, - start?: number, - tokenContract?: string, - tokenId?: string, - ): CancelablePromise<{ - result: Array<{ - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/offers/get-all-valid", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - count: count, - offeror: offeror, - start: start, - tokenContract: tokenContract, - tokenId: tokenId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all offers + * Get all offers on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param offeror has offers from this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllMarketplaceOffers( +chain: string, +contractAddress: string, +count?: number, +offeror?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/offers/get-all', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'offeror': offeror, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get offer - * Get details about an offer. - * @param offerId The ID of the offer to get information about. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getMarketplaceOffer( - offerId: string, - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * The id of the offer. - */ - id: string; - /** - * The address of the creator of offer. - */ - offerorAddress: string; - /** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ - currencyValue?: { - name: string; - symbol: string; - decimals: number; - value: string; - displayValue: string; - }; - /** - * The total offer amount for the NFTs. - */ - totalPrice: string; - asset?: Record; - /** - * The end time of the auction. - */ - endTimeInSeconds?: number; - status?: 0 | 1 | 2 | 3 | 4 | 5; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/offers/get-offer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - query: { - offerId: offerId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all valid offers + * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param count Number of listings to fetch + * @param offeror has offers from this Address + * @param start Start from this index (pagination) + * @param tokenContract Token contract address to show NFTs from + * @param tokenId Only show NFTs with this ID + * @returns any Default Response + * @throws ApiError + */ + public getAllValidMarketplaceOffers( +chain: string, +contractAddress: string, +count?: number, +offeror?: string, +start?: number, +tokenContract?: string, +tokenId?: string, +): CancelablePromise<{ +result: Array<{ +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/offers/get-all-valid', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'count': count, + 'offeror': offeror, + 'start': start, + 'tokenContract': tokenContract, + 'tokenId': tokenId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get total count - * Get the total number of offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @returns any Default Response - * @throws ApiError - */ - public getMarketplaceOffersTotalCount( - chain: string, - contractAddress: string, - ): CancelablePromise<{ - result: string; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/marketplace/{chain}/{contractAddress}/offers/get-total-count", - path: { - chain: chain, - contractAddress: contractAddress, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get offer + * Get details about an offer. + * @param offerId The ID of the offer to get information about. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getMarketplaceOffer( +offerId: string, +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * The id of the offer. + */ +id: string; +/** + * The address of the creator of offer. + */ +offerorAddress: string; +/** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ +currencyValue?: { +name: string; +symbol: string; +decimals: number; +value: string; +displayValue: string; +}; +/** + * The total offer amount for the NFTs. + */ +totalPrice: string; +asset?: Record; +/** + * The end time of the auction. + */ +endTimeInSeconds?: number; +status?: (0 | 1 | 2 | 3 | 4 | 5); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/offers/get-offer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + query: { + 'offerId': offerId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Make offer - * Make an offer on a token. A valid listing is not required. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public makeMarketplaceOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The address of the asset being listed. - */ - assetContractAddress: string; - /** - * The ID of the token to list. - */ - tokenId: string; - /** - * The address of the currency to accept for the listing. - */ - currencyContractAddress?: string; - /** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will - * be forced internally regardless of what is passed here). - */ - quantity?: string; - /** - * the price to offer in the currency specified - */ - totalPrice: string; - /** - * Defaults to 10 years from now. - */ - endTimestamp?: number; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/offers/make-offer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get total count + * Get the total number of offers on this marketplace contract. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @returns any Default Response + * @throws ApiError + */ + public getMarketplaceOffersTotalCount( +chain: string, +contractAddress: string, +): CancelablePromise<{ +result: string; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/marketplace/{chain}/{contractAddress}/offers/get-total-count', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Cancel offer - * Cancel a valid offer made by the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public cancelMarketplaceOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. - */ - offerId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/offers/cancel-offer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Make offer + * Make an offer on a token. A valid listing is not required. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public makeMarketplaceOffer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The address of the asset being listed. + */ +assetContractAddress: string; +/** + * The ID of the token to list. + */ +tokenId: string; +/** + * The address of the currency to accept for the listing. + */ +currencyContractAddress?: string; +/** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ +quantity?: string; +/** + * the price to offer in the currency specified + */ +totalPrice: string; +/** + * Defaults to 10 years from now. + */ +endTimestamp?: number; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/offers/make-offer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Cancel offer + * Cancel a valid offer made by the caller wallet. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public cancelMarketplaceOffer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. + */ +offerId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/offers/cancel-offer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Accept offer + * Accept a valid offer. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param contractAddress Contract address + * @param xBackendWalletAddress Backend wallet address + * @param requestBody + * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. + * @param xAccountAddress Smart account address + * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. + * @returns any Default Response + * @throws ApiError + */ + public acceptMarketplaceOffer( +chain: string, +contractAddress: string, +xBackendWalletAddress: string, +requestBody: { +/** + * The ID of the offer to accept. You can view all offers with getAll or getAllValid. + */ +offerId: string; +txOverrides?: { +/** + * Gas limit for the transaction + */ +gas?: string; +/** + * Maximum fee per gas + */ +maxFeePerGas?: string; +/** + * Maximum priority fee per gas + */ +maxPriorityFeePerGas?: string; +/** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ +timeoutSeconds?: number; +/** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ +value?: string; +}; +}, +simulateTx: boolean = false, +xIdempotencyKey?: string, +xAccountAddress?: string, +xAccountFactoryAddress?: string, +xAccountSalt?: string, +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/marketplace/{chain}/{contractAddress}/offers/accept-offer', + path: { + 'chain': chain, + 'contractAddress': contractAddress, + }, + headers: { + 'x-backend-wallet-address': xBackendWalletAddress, + 'x-idempotency-key': xIdempotencyKey, + 'x-account-address': xAccountAddress, + 'x-account-factory-address': xAccountFactoryAddress, + 'x-account-salt': xAccountSalt, + }, + query: { + 'simulateTx': simulateTx, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Accept offer - * Accept a valid offer. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param contractAddress Contract address - * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails - * simulation. Note: This step is less performant and recommended only for debugging purposes. - * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last - * 100000 transactions are compared. - * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the - * contract. - * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful - * when creating multiple accounts with the same admin and only needed when deploying the account as part of a - * userop. - * @returns any Default Response - * @throws ApiError - */ - public acceptMarketplaceOffer( - chain: string, - contractAddress: string, - xBackendWalletAddress: string, - requestBody: { - /** - * The ID of the offer to accept. You can view all offers with getAll or getAllValid. - */ - offerId: string; - txOverrides?: { - /** - * Gas limit for the transaction - */ - gas?: string; - /** - * Maximum fee per gas - */ - maxFeePerGas?: string; - /** - * Maximum priority fee per gas - */ - maxPriorityFeePerGas?: string; - /** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the - * transaction will be set to 'errored'. Default: no timeout - */ - timeoutSeconds?: number; - /** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ - value?: string; - }; - }, - simulateTx: boolean = false, - xIdempotencyKey?: string, - xAccountAddress?: string, - xAccountFactoryAddress?: string, - xAccountSalt?: string, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/marketplace/{chain}/{contractAddress}/offers/accept-offer", - path: { - chain: chain, - contractAddress: contractAddress, - }, - headers: { - "x-backend-wallet-address": xBackendWalletAddress, - "x-idempotency-key": xIdempotencyKey, - "x-account-address": xAccountAddress, - "x-account-factory-address": xAccountFactoryAddress, - "x-account-salt": xAccountSalt, - }, - query: { - simulateTx: simulateTx, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/PermissionsService.ts b/sdk/src/services/PermissionsService.ts index 1c9ec3028..dc1348060 100644 --- a/sdk/src/services/PermissionsService.ts +++ b/sdk/src/services/PermissionsService.ts @@ -2,98 +2,104 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class PermissionsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all permissions - * Get all users with their corresponding permissions - * @returns any Default Response - * @throws ApiError - */ - public listAdmins(): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - walletAddress: string; - permissions: string; - label: string | null; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/auth/permissions/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Grant permissions to user - * Grant permissions to a user - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public grantAdmin(requestBody: { /** - * A contract or wallet address + * Get all permissions + * Get all users with their corresponding permissions + * @returns any Default Response + * @throws ApiError */ - walletAddress: string; - permissions: "ADMIN" | "OWNER"; - label?: string; - }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/permissions/grant", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public listAdmins(): CancelablePromise<{ +result: Array<{ +/** + * A contract or wallet address + */ +walletAddress: string; +permissions: string; +label: (string | null); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/auth/permissions/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke permissions from user - * Revoke a user's permissions - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeAdmin(requestBody: { /** - * A contract or wallet address + * Grant permissions to user + * Grant permissions to a user + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - walletAddress: string; - }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/auth/permissions/revoke", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public grantAdmin( +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +permissions: ('ADMIN' | 'OWNER'); +label?: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/permissions/grant', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke permissions from user + * Revoke a user's permissions + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeAdmin( +requestBody: { +/** + * A contract or wallet address + */ +walletAddress: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/auth/permissions/revoke', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + } diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 4a5343065..3c91ffe1d 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -2,212 +2,219 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class RelayerService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all meta-transaction relayers - * Get all meta-transaction relayers - * @returns any Default Response - * @throws ApiError - */ - public listRelayers(): CancelablePromise<{ - result: Array<{ - id: string; - name: string | null; - chainId: string; - /** - * A contract or wallet address - */ - backendWalletAddress: string; - allowedContracts: Array | null; - allowedForwarders: Array | null; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/relayer/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Create a new meta-transaction relayer - * Create a new meta-transaction relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public createRelayer(requestBody: { - name?: string; /** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * Get all meta-transaction relayers + * Get all meta-transaction relayers + * @returns any Default Response + * @throws ApiError */ - chain: string; + public listRelayers(): CancelablePromise<{ +result: Array<{ +id: string; +name: (string | null); +chainId: string; +/** + * A contract or wallet address + */ +backendWalletAddress: string; +allowedContracts: (Array | null); +allowedForwarders: (Array | null); +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/relayer/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * The address of the backend wallet to use for relaying transactions. + * Create a new meta-transaction relayer + * Create a new meta-transaction relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - backendWalletAddress: string; - allowedContracts?: Array; - allowedForwarders?: Array; - }): CancelablePromise<{ - result: { - relayerId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/relayer/create", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public createRelayer( +requestBody: { +name?: string; +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain: string; +/** + * The address of the backend wallet to use for relaying transactions. + */ +backendWalletAddress: string; +allowedContracts?: Array; +allowedForwarders?: Array; +}, +): CancelablePromise<{ +result: { +relayerId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/relayer/create', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke a relayer - * Revoke a relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revokeRelayer(requestBody: { id: string }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/relayer/revoke", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Revoke a relayer + * Revoke a relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revokeRelayer( +requestBody: { +id: string; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/relayer/revoke', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Update a relayer - * Update a relayer - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public updateRelayer(requestBody: { - id: string; - name?: string; /** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * Update a relayer + * Update a relayer + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - chain?: string; + public updateRelayer( +requestBody: { +id: string; +name?: string; +/** + * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + */ +chain?: string; +/** + * A contract or wallet address + */ +backendWalletAddress?: string; +allowedContracts?: Array; +allowedForwarders?: Array; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/relayer/update', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + /** - * A contract or wallet address + * Relay a meta-transaction + * Relay an EIP-2771 meta-transaction + * @param relayerId + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - backendWalletAddress?: string; - allowedContracts?: Array; - allowedForwarders?: Array; - }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/relayer/update", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public relay( +relayerId: string, +requestBody?: ({ +type: 'forward'; +request: { +from: string; +to: string; +value: string; +gas: string; +nonce: string; +data: string; +chainid?: string; +}; +signature: string; +/** + * A contract or wallet address + */ +forwarderAddress: string; +} | { +type: 'permit'; +request: { +to: string; +owner: string; +spender: string; +value: string; +nonce: string; +deadline: string; +}; +signature: string; +} | { +type: 'execute-meta-transaction'; +request: { +from: string; +to: string; +data: string; +}; +signature: string; +}), +): CancelablePromise<{ +result: { +/** + * Queue ID + */ +queueId: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/relayer/{relayerId}', + path: { + 'relayerId': relayerId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Relay a meta-transaction - * Relay an EIP-2771 meta-transaction - * @param relayerId - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public relay( - relayerId: string, - requestBody?: - | { - type: "forward"; - request: { - from: string; - to: string; - value: string; - gas: string; - nonce: string; - data: string; - chainid?: string; - }; - signature: string; - /** - * A contract or wallet address - */ - forwarderAddress: string; - } - | { - type: "permit"; - request: { - to: string; - owner: string; - spender: string; - value: string; - nonce: string; - deadline: string; - }; - signature: string; - } - | { - type: "execute-meta-transaction"; - request: { - from: string; - to: string; - data: string; - }; - signature: string; - }, - ): CancelablePromise<{ - result: { - /** - * Queue ID - */ - queueId: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/relayer/{relayerId}", - path: { - relayerId: relayerId, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index 6f1b7faea..f9aede094 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -2,594 +2,599 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class TransactionService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all transactions - * Get all transaction requests. - * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param page Specify the page number. - * @param limit Specify the number of results to return per page. - * @returns any Default Response - * @throws ApiError - */ - public listTransactions( - status: "queued" | "mined" | "cancelled" | "errored", - page: number = 1, - limit: number = 100, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: string | null; - /** - * The current state of the transaction. - */ - status: "queued" | "sent" | "mined" | "errored" | "cancelled"; - chainId: string | null; - fromAddress: string | null; - toAddress: string | null; - data: string | null; - extension: string | null; - value: string | null; - nonce: number | string | null; - gasLimit: string | null; - gasPrice: string | null; - maxFeePerGas: string | null; - maxPriorityFeePerGas: string | null; - transactionType: number | null; - transactionHash: string | null; - queuedAt: string | null; - sentAt: string | null; - minedAt: string | null; - cancelledAt: string | null; - deployedContractAddress: string | null; - deployedContractType: string | null; - errorMessage: string | null; - sentAtBlockNumber: number | null; - blockNumber: number | null; - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: boolean | null; - retryMaxFeePerGas: string | null; - retryMaxPriorityFeePerGas: string | null; - signerAddress: string | null; - accountAddress: string | null; - accountSalt: string | null; - accountFactoryAddress: string | null; - target: string | null; - sender: string | null; - initCode: string | null; - callData: string | null; - callGasLimit: string | null; - verificationGasLimit: string | null; - preVerificationGas: string | null; - paymasterAndData: string | null; - userOpHash: string | null; - functionName: string | null; - functionArgs: string | null; - onChainTxStatus: number | null; - onchainStatus: "success" | "reverted" | null; - effectiveGasPrice: string | null; - cumulativeGasUsed: string | null; - }>; - totalCount: number; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/get-all", - query: { - page: page, - limit: limit, - status: status, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get transaction status - * Get the status for a transaction request. - * @param queueId Transaction queue ID - * @returns any Default Response - * @throws ApiError - */ - public status(queueId: string): CancelablePromise<{ - result: { - queueId: string | null; - /** - * The current state of the transaction. - */ - status: "queued" | "sent" | "mined" | "errored" | "cancelled"; - chainId: string | null; - fromAddress: string | null; - toAddress: string | null; - data: string | null; - extension: string | null; - value: string | null; - nonce: number | string | null; - gasLimit: string | null; - gasPrice: string | null; - maxFeePerGas: string | null; - maxPriorityFeePerGas: string | null; - transactionType: number | null; - transactionHash: string | null; - queuedAt: string | null; - sentAt: string | null; - minedAt: string | null; - cancelledAt: string | null; - deployedContractAddress: string | null; - deployedContractType: string | null; - errorMessage: string | null; - sentAtBlockNumber: number | null; - blockNumber: number | null; - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: boolean | null; - retryMaxFeePerGas: string | null; - retryMaxPriorityFeePerGas: string | null; - signerAddress: string | null; - accountAddress: string | null; - accountSalt: string | null; - accountFactoryAddress: string | null; - target: string | null; - sender: string | null; - initCode: string | null; - callData: string | null; - callGasLimit: string | null; - verificationGasLimit: string | null; - preVerificationGas: string | null; - paymasterAndData: string | null; - userOpHash: string | null; - functionName: string | null; - functionArgs: string | null; - onChainTxStatus: number | null; - onchainStatus: "success" | "reverted" | null; - effectiveGasPrice: string | null; - cumulativeGasUsed: string | null; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/status/{queueId}", - path: { - queueId: queueId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all transactions + * Get all transaction requests. + * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' + * @param page Specify the page number. + * @param limit Specify the number of results to return per page. + * @returns any Default Response + * @throws ApiError + */ + public listTransactions( +status: ('queued' | 'mined' | 'cancelled' | 'errored'), +page: number = 1, +limit: number = 100, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +totalCount: number; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/get-all', + query: { + 'page': page, + 'limit': limit, + 'status': status, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Get transaction status + * Get the status for a transaction request. + * @param queueId Transaction queue ID + * @returns any Default Response + * @throws ApiError + */ + public status( +queueId: string, +): CancelablePromise<{ +result: { +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/status/{queueId}', + path: { + 'queueId': queueId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get all deployment transactions - * Get all transaction requests to deploy contracts. - * @param page Specify the page number for pagination. - * @param limit Specify the number of transactions to return per page. - * @returns any Default Response - * @throws ApiError - */ - public getAllDeployedContracts( - page: number = 1, - limit: number = 10, - ): CancelablePromise<{ - result: { - transactions: Array<{ - queueId: string | null; - /** - * The current state of the transaction. - */ - status: "queued" | "sent" | "mined" | "errored" | "cancelled"; - chainId: string | null; - fromAddress: string | null; - toAddress: string | null; - data: string | null; - extension: string | null; - value: string | null; - nonce: number | string | null; - gasLimit: string | null; - gasPrice: string | null; - maxFeePerGas: string | null; - maxPriorityFeePerGas: string | null; - transactionType: number | null; - transactionHash: string | null; - queuedAt: string | null; - sentAt: string | null; - minedAt: string | null; - cancelledAt: string | null; - deployedContractAddress: string | null; - deployedContractType: string | null; - errorMessage: string | null; - sentAtBlockNumber: number | null; - blockNumber: number | null; - /** - * The number of retry attempts - */ - retryCount: number; - retryGasValues: boolean | null; - retryMaxFeePerGas: string | null; - retryMaxPriorityFeePerGas: string | null; - signerAddress: string | null; - accountAddress: string | null; - accountSalt: string | null; - accountFactoryAddress: string | null; - target: string | null; - sender: string | null; - initCode: string | null; - callData: string | null; - callGasLimit: string | null; - verificationGasLimit: string | null; - preVerificationGas: string | null; - paymasterAndData: string | null; - userOpHash: string | null; - functionName: string | null; - functionArgs: string | null; - onChainTxStatus: number | null; - onchainStatus: "success" | "reverted" | null; - effectiveGasPrice: string | null; - cumulativeGasUsed: string | null; - }>; - totalCount: number; - }; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/get-all-deployed-contracts", - query: { - page: page, - limit: limit, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get all deployment transactions + * Get all transaction requests to deploy contracts. + * @param page Specify the page number for pagination. + * @param limit Specify the number of transactions to return per page. + * @returns any Default Response + * @throws ApiError + */ + public getAllDeployedContracts( +page: number = 1, +limit: number = 10, +): CancelablePromise<{ +result: { +transactions: Array<{ +queueId: (string | null); +/** + * The current state of the transaction. + */ +status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); +chainId: (string | null); +fromAddress: (string | null); +toAddress: (string | null); +data: (string | null); +extension: (string | null); +value: (string | null); +nonce: (number | string | null); +gasLimit: (string | null); +gasPrice: (string | null); +maxFeePerGas: (string | null); +maxPriorityFeePerGas: (string | null); +transactionType: (number | null); +transactionHash: (string | null); +queuedAt: (string | null); +sentAt: (string | null); +minedAt: (string | null); +cancelledAt: (string | null); +deployedContractAddress: (string | null); +deployedContractType: (string | null); +errorMessage: (string | null); +sentAtBlockNumber: (number | null); +blockNumber: (number | null); +/** + * The number of retry attempts + */ +retryCount: number; +retryGasValues: (boolean | null); +retryMaxFeePerGas: (string | null); +retryMaxPriorityFeePerGas: (string | null); +signerAddress: (string | null); +accountAddress: (string | null); +accountSalt: (string | null); +accountFactoryAddress: (string | null); +target: (string | null); +sender: (string | null); +initCode: (string | null); +callData: (string | null); +callGasLimit: (string | null); +verificationGasLimit: (string | null); +preVerificationGas: (string | null); +paymasterAndData: (string | null); +userOpHash: (string | null); +functionName: (string | null); +functionArgs: (string | null); +onChainTxStatus: (number | null); +onchainStatus: ('success' | 'reverted' | null); +effectiveGasPrice: (string | null); +cumulativeGasUsed: (string | null); +}>; +totalCount: number; +}; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/get-all-deployed-contracts', + query: { + 'page': page, + 'limit': limit, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Retry transaction (synchronous) + * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public syncRetry( +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +maxFeePerGas?: string; +maxPriorityFeePerGas?: string; +}, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/transaction/sync-retry', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retry transaction (synchronous) - * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public syncRetry(requestBody: { /** - * Transaction queue ID + * Retry failed transaction + * Retry a failed transaction + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - queueId: string; - maxFeePerGas?: string; - maxPriorityFeePerGas?: string; - }): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/transaction/sync-retry", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public retryFailed( +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +}, +): CancelablePromise<{ +result: { +message: string; +status: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/transaction/retry-failed', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Retry failed transaction - * Retry a failed transaction - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public retryFailed(requestBody: { /** - * Transaction queue ID + * Cancel transaction + * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled. + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - queueId: string; - }): CancelablePromise<{ - result: { - message: string; - status: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/transaction/retry-failed", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public cancel( +requestBody: { +/** + * Transaction queue ID + */ +queueId: string; +}, +): CancelablePromise<{ +result: { +/** + * Transaction queue ID + */ +queueId: string; +/** + * Response status + */ +status: string; +/** + * Response message + */ +message: string; +/** + * A transaction hash + */ +transactionHash?: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/transaction/cancel', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Cancel transaction - * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not - * guaranteed to be cancelled. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public cancel(requestBody: { /** - * Transaction queue ID + * Send a signed transaction + * Send a signed transaction + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody + * @returns any Default Response + * @throws ApiError */ - queueId: string; - }): CancelablePromise<{ - result: { - /** - * Transaction queue ID - */ - queueId: string; - /** - * Response status - */ - status: string; - /** - * Response message - */ - message: string; - /** - * A transaction hash - */ - transactionHash?: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/transaction/cancel", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public sendRawTransaction( +chain: string, +requestBody: { +signedTransaction: string; +}, +): CancelablePromise<{ +result: { +/** + * A transaction hash + */ +transactionHash: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/transaction/{chain}/send-signed-transaction', + path: { + 'chain': chain, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a signed transaction - * Send a signed transaction - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public sendRawTransaction( - chain: string, - requestBody: { - signedTransaction: string; - }, - ): CancelablePromise<{ - result: { - /** - * A transaction hash - */ - transactionHash: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/transaction/{chain}/send-signed-transaction", - path: { - chain: chain, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Send a signed user operation + * Send a signed user operation + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public sendSignedUserOp( +chain: string, +requestBody: { +signedUserOp: any; +}, +): CancelablePromise<({ +result: { +/** + * A transaction hash + */ +userOpHash: string; +}; +} | { +error: { +message: string; +}; +})> { + return this.httpRequest.request({ + method: 'POST', + url: '/transaction/{chain}/send-signed-user-op', + path: { + 'chain': chain, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Send a signed user operation - * Send a signed user operation - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public sendSignedUserOp( - chain: string, - requestBody: { - signedUserOp: any; - }, - ): CancelablePromise< - | { - result: { - /** - * A transaction hash - */ - userOpHash: string; - }; - } - | { - error: { - message: string; - }; - } - > { - return this.httpRequest.request({ - method: "POST", - url: "/transaction/{chain}/send-signed-user-op", - path: { - chain: chain, - }, - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction receipt + * Get the transaction receipt from a transaction hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param transactionHash Transaction hash + * @returns any Default Response + * @throws ApiError + */ + public getTransactionReceipt( +chain: string, +transactionHash: string, +): CancelablePromise<{ +result: ({ +to?: string; +from?: string; +contractAddress?: (string | null); +transactionIndex?: number; +root?: string; +gasUsed?: string; +logsBloom?: string; +blockHash?: string; +/** + * A transaction hash + */ +transactionHash?: string; +logs?: Array; +blockNumber?: number; +confirmations?: number; +cumulativeGasUsed?: string; +effectiveGasPrice?: string; +byzantium?: boolean; +type?: number; +status?: number; +} | null); +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/{chain}/tx-hash/{transactionHash}', + path: { + 'chain': chain, + 'transactionHash': transactionHash, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction receipt - * Get the transaction receipt from a transaction hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param transactionHash Transaction hash - * @returns any Default Response - * @throws ApiError - */ - public getTransactionReceipt( - chain: string, - transactionHash: string, - ): CancelablePromise<{ - result: { - to?: string; - from?: string; - contractAddress?: string | null; - transactionIndex?: number; - root?: string; - gasUsed?: string; - logsBloom?: string; - blockHash?: string; - /** - * A transaction hash - */ - transactionHash?: string; - logs?: Array; - blockNumber?: number; - confirmations?: number; - cumulativeGasUsed?: string; - effectiveGasPrice?: string; - byzantium?: boolean; - type?: number; - status?: number; - } | null; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/{chain}/tx-hash/{transactionHash}", - path: { - chain: chain, - transactionHash: transactionHash, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction receipt from user-op hash + * Get the transaction receipt from a user-op hash. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param userOpHash User operation hash + * @returns any Default Response + * @throws ApiError + */ + public useropHashReceipt( +chain: string, +userOpHash: string, +): CancelablePromise<{ +result: any; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/{chain}/userop-hash/{userOpHash}', + path: { + 'chain': chain, + 'userOpHash': userOpHash, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction receipt from user-op hash - * Get the transaction receipt from a user-op hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param userOpHash User operation hash - * @returns any Default Response - * @throws ApiError - */ - public useropHashReceipt( - chain: string, - userOpHash: string, - ): CancelablePromise<{ - result: any; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/{chain}/userop-hash/{userOpHash}", - path: { - chain: chain, - userOpHash: userOpHash, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get transaction logs + * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs. + * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param queueId The queue ID for a mined transaction. + * @param transactionHash The transaction hash for a mined transaction. + * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) + * @returns any Default Response + * @throws ApiError + */ + public getTransactionLogs( +chain: string, +queueId?: string, +transactionHash?: string, +parseLogs?: boolean, +): CancelablePromise<{ +result: Array<{ +/** + * A contract or wallet address + */ +address: string; +topics: Array; +data: string; +blockNumber: string; +/** + * A transaction hash + */ +transactionHash: string; +transactionIndex: number; +blockHash: string; +logIndex: number; +removed: boolean; +/** + * Event name, only returned when `parseLogs` is true + */ +eventName?: string; +/** + * Event arguments. Only returned when `parseLogs` is true + */ +args?: any; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/transaction/logs', + query: { + 'chain': chain, + 'queueId': queueId, + 'transactionHash': transactionHash, + 'parseLogs': parseLogs, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get transaction logs - * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to - * parse the event logs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param queueId The queue ID for a mined transaction. - * @param transactionHash The transaction hash for a mined transaction. - * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) - * @returns any Default Response - * @throws ApiError - */ - public getTransactionLogs( - chain: string, - queueId?: string, - transactionHash?: string, - parseLogs?: boolean, - ): CancelablePromise<{ - result: Array<{ - /** - * A contract or wallet address - */ - address: string; - topics: Array; - data: string; - blockNumber: string; - /** - * A transaction hash - */ - transactionHash: string; - transactionIndex: number; - blockHash: string; - logIndex: number; - removed: boolean; - /** - * Event name, only returned when `parseLogs` is true - */ - eventName?: string; - /** - * Event arguments. Only returned when `parseLogs` is true - */ - args?: any; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/transaction/logs", - query: { - chain: chain, - queueId: queueId, - transactionHash: transactionHash, - parseLogs: parseLogs, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index 6333b2450..eb025cee8 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -2,167 +2,158 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from '../core/CancelablePromise'; +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; export class WebhooksService { - constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Get all webhooks configured - * Get all webhooks configuration data set up on Engine - * @returns any Default Response - * @throws ApiError - */ - public listWebhooks(): CancelablePromise<{ - result: Array<{ - id: number; - url: string; - name: string | null; - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - }>; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/webhooks/get-all", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + constructor(public readonly httpRequest: BaseHttpRequest) {} - /** - * Create a webhook - * Create a webhook to call when a specific Engine event occurs. - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public createWebhook(requestBody: { /** - * Webhook URL. Non-HTTPS URLs are not supported. + * Get all webhooks configured + * Get all webhooks configuration data set up on Engine + * @returns any Default Response + * @throws ApiError */ - url: string; - name?: string; - eventType: - | "queued_transaction" - | "sent_transaction" - | "mined_transaction" - | "errored_transaction" - | "cancelled_transaction" - | "all_transactions" - | "backend_wallet_balance" - | "auth" - | "contract_subscription"; - }): CancelablePromise<{ - result: { - id: number; - url: string; - name: string | null; - secret?: string; - eventType: string; - active: boolean; - createdAt: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/webhooks/create", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + public listWebhooks(): CancelablePromise<{ +result: Array<{ +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/webhooks/get-all', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Revoke webhook - * Revoke a Webhook - * @param requestBody - * @returns any Default Response - * @throws ApiError - */ - public revoke(requestBody: { id: number }): CancelablePromise<{ - result: { - success: boolean; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/webhooks/revoke", - body: requestBody, - mediaType: "application/json", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Create a webhook + * Create a webhook to call when a specific Engine event occurs. + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public createWebhook( +requestBody: { +/** + * Webhook URL. Non-HTTPS URLs are not supported. + */ +url: string; +name?: string; +eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); +}, +): CancelablePromise<{ +result: { +id: number; +url: string; +name: (string | null); +secret?: string; +eventType: string; +active: boolean; +createdAt: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/webhooks/create', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Revoke webhook + * Revoke a Webhook + * @param requestBody + * @returns any Default Response + * @throws ApiError + */ + public revoke( +requestBody: { +id: number; +}, +): CancelablePromise<{ +result: { +success: boolean; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/webhooks/revoke', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Get webhooks event types - * Get the all the webhooks event types - * @returns any Default Response - * @throws ApiError - */ - public getEventTypes(): CancelablePromise<{ - result: Array< - | "queued_transaction" - | "sent_transaction" - | "mined_transaction" - | "errored_transaction" - | "cancelled_transaction" - | "all_transactions" - | "backend_wallet_balance" - | "auth" - | "contract_subscription" - >; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/webhooks/event-types", - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } + /** + * Get webhooks event types + * Get the all the webhooks event types + * @returns any Default Response + * @throws ApiError + */ + public getEventTypes(): CancelablePromise<{ +result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; +}> { + return this.httpRequest.request({ + method: 'GET', + url: '/webhooks/event-types', + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } + + /** + * Test webhook + * Send a test payload to a webhook. + * @param webhookId + * @returns any Default Response + * @throws ApiError + */ + public testWebhook( +webhookId: string, +): CancelablePromise<{ +result: { +ok: boolean; +status: number; +body: string; +}; +}> { + return this.httpRequest.request({ + method: 'POST', + url: '/webhooks/{webhookId}/test', + path: { + 'webhookId': webhookId, + }, + errors: { + 400: `Bad Request`, + 404: `Not Found`, + 500: `Internal Server Error`, + }, + }); + } - /** - * Test webhook - * Send a test payload to a webhook. - * @param webhookId - * @returns any Default Response - * @throws ApiError - */ - public testWebhook(webhookId: string): CancelablePromise<{ - result: { - ok: boolean; - status: number; - body: string; - }; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/webhooks/{webhookId}/test", - path: { - webhookId: webhookId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } } From ea22ae67d753f774c570f7fe5181baf41de69c2a Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 03:48:27 -0600 Subject: [PATCH 09/11] revert script change for now --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 184919e61..54b596802 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "dev:infra": "docker compose -f ./docker-compose.yml up -d", "dev:db": "yarn prisma:setup:dev", "dev:run": "npx nodemon --watch 'src/**/*.ts' --exec 'npx tsx ./src/index.ts' --files src/index.ts", - "prebuild": "rm -r dist", - "build": "tsc -p ./tsconfig.json --outDir dist", + "build": "rm -rf dist && tsc -p ./tsconfig.json --outDir dist", "build:docker": "docker build . -f Dockerfile -t prod", "generate:sdk": "npx tsx ./src/scripts/generate-sdk && cd ./sdk && yarn build", "prisma:setup:dev": "npx tsx ./src/scripts/setup-db.ts", From 18f58887816a7f5002e7045c3109d82ade829125 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 04:19:29 -0600 Subject: [PATCH 10/11] ran biome check --write --- .eslintrc.json | 18 --------- eslint.config.mjs | 37 ------------------- package.json | 12 +++--- src/db/client.ts | 4 +- .../createContractEventLogs.ts | 4 +- .../createContractTransactionReceipts.ts | 4 +- src/db/keypair/delete.ts | 2 +- src/db/keypair/get.ts | 2 +- src/db/keypair/insert.ts | 4 +- src/db/keypair/list.ts | 2 +- src/db/relayer/getRelayerById.ts | 2 +- src/db/transactions/queueTx.ts | 2 +- src/db/wallets/deleteWalletDetails.ts | 2 +- src/db/wallets/getAllWallets.ts | 2 +- src/db/wallets/nonceMap.ts | 6 +-- src/db/wallets/walletNonce.ts | 2 +- src/db/webhooks/createWebhook.ts | 4 +- src/db/webhooks/getAllWebhooks.ts | 2 +- src/lib/chain/chain-capabilities.ts | 2 +- src/schema/prisma.ts | 2 +- src/server/index.ts | 4 +- src/server/middleware/adminRoutes.ts | 6 ++- src/server/middleware/auth.ts | 4 +- src/server/middleware/cors/cors.ts | 4 +- src/server/middleware/cors/index.ts | 2 +- src/server/middleware/cors/vary.ts | 2 +- src/server/middleware/engineMode.ts | 2 +- src/server/middleware/prometheus.ts | 2 +- src/server/middleware/websocket.ts | 6 +-- src/server/routes/admin/nonces.ts | 14 +++---- src/server/routes/admin/transaction.ts | 6 +-- .../routes/auth/access-tokens/create.ts | 2 +- .../routes/auth/access-tokens/getAll.ts | 2 +- .../routes/auth/access-tokens/revoke.ts | 2 +- .../routes/auth/access-tokens/update.ts | 2 +- src/server/routes/auth/keypair/add.ts | 6 +-- src/server/routes/auth/keypair/list.ts | 4 +- src/server/routes/auth/keypair/remove.ts | 4 +- src/server/routes/auth/permissions/getAll.ts | 2 +- src/server/routes/auth/permissions/grant.ts | 2 +- src/server/routes/auth/permissions/revoke.ts | 2 +- src/server/routes/backend-wallet/create.ts | 2 +- src/server/routes/backend-wallet/getAll.ts | 2 +- .../routes/backend-wallet/getBalance.ts | 4 +- src/server/routes/backend-wallet/getNonce.ts | 2 +- .../routes/backend-wallet/getTransactions.ts | 4 +- .../backend-wallet/getTransactionsByNonce.ts | 2 +- src/server/routes/backend-wallet/import.ts | 2 +- src/server/routes/backend-wallet/remove.ts | 6 +-- .../routes/backend-wallet/resetNonces.ts | 8 ++-- .../routes/backend-wallet/sendTransaction.ts | 2 +- .../backend-wallet/sendTransactionBatch.ts | 2 +- .../routes/backend-wallet/signMessage.ts | 4 +- .../routes/backend-wallet/signTransaction.ts | 2 +- .../routes/backend-wallet/signTypedData.ts | 4 +- .../backend-wallet/simulateTransaction.ts | 4 +- src/server/routes/backend-wallet/transfer.ts | 4 +- src/server/routes/backend-wallet/update.ts | 4 +- src/server/routes/backend-wallet/withdraw.ts | 6 +-- src/server/routes/chain/get.ts | 2 +- src/server/routes/chain/getAll.ts | 2 +- src/server/routes/configuration/auth/get.ts | 4 +- .../routes/configuration/auth/update.ts | 4 +- .../backend-wallet-balance/get.ts | 4 +- .../backend-wallet-balance/update.ts | 2 +- src/server/routes/configuration/cache/get.ts | 4 +- .../routes/configuration/cache/update.ts | 4 +- src/server/routes/configuration/chains/get.ts | 2 +- .../routes/configuration/chains/update.ts | 2 +- .../contract-subscriptions/get.ts | 4 +- .../contract-subscriptions/update.ts | 2 +- src/server/routes/configuration/cors/add.ts | 4 +- src/server/routes/configuration/cors/get.ts | 4 +- .../routes/configuration/cors/remove.ts | 4 +- src/server/routes/configuration/cors/set.ts | 4 +- src/server/routes/configuration/ip/get.ts | 4 +- src/server/routes/configuration/ip/set.ts | 4 +- .../routes/configuration/transactions/get.ts | 2 +- .../configuration/transactions/update.ts | 2 +- .../routes/configuration/wallets/get.ts | 2 +- .../routes/configuration/wallets/update.ts | 2 +- .../routes/contract/events/getAllEvents.ts | 4 +- .../contract/events/getContractEventLogs.ts | 2 +- .../events/getEventLogsByTimestamp.ts | 2 +- .../routes/contract/events/getEvents.ts | 4 +- .../contract/events/paginateEventLogs.ts | 2 +- .../contract/extensions/account/index.ts | 2 +- .../extensions/account/read/getAllAdmins.ts | 4 +- .../extensions/account/read/getAllSessions.ts | 4 +- .../extensions/account/write/grantAdmin.ts | 2 +- .../extensions/account/write/grantSession.ts | 2 +- .../extensions/account/write/revokeAdmin.ts | 2 +- .../extensions/account/write/revokeSession.ts | 2 +- .../extensions/account/write/updateSession.ts | 2 +- .../extensions/accountFactory/index.ts | 2 +- .../accountFactory/read/getAllAccounts.ts | 4 +- .../read/getAssociatedAccounts.ts | 4 +- .../accountFactory/read/isAccountDeployed.ts | 4 +- .../extensions/erc1155/read/balanceOf.ts | 2 +- .../extensions/erc1155/read/canClaim.ts | 2 +- .../contract/extensions/erc1155/read/get.ts | 2 +- .../erc1155/read/getActiveClaimConditions.ts | 2 +- .../extensions/erc1155/read/getAll.ts | 2 +- .../erc1155/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc1155/read/getClaimerProofs.ts | 2 +- .../extensions/erc1155/read/getOwned.ts | 2 +- .../extensions/erc1155/read/isApproved.ts | 2 +- .../erc1155/read/signatureGenerate.ts | 6 +-- .../extensions/erc1155/read/totalCount.ts | 2 +- .../extensions/erc1155/read/totalSupply.ts | 2 +- .../extensions/erc1155/write/airdrop.ts | 2 +- .../contract/extensions/erc1155/write/burn.ts | 2 +- .../extensions/erc1155/write/burnBatch.ts | 2 +- .../extensions/erc1155/write/lazyMint.ts | 2 +- .../erc1155/write/mintAdditionalSupplyTo.ts | 2 +- .../extensions/erc1155/write/mintBatchTo.ts | 2 +- .../extensions/erc1155/write/mintTo.ts | 2 +- .../erc1155/write/setApprovalForAll.ts | 2 +- .../erc1155/write/setBatchClaimConditions.ts | 2 +- .../erc1155/write/setClaimConditions.ts | 2 +- .../extensions/erc1155/write/signatureMint.ts | 2 +- .../extensions/erc1155/write/transfer.ts | 4 +- .../extensions/erc1155/write/transferFrom.ts | 4 +- .../erc1155/write/updateClaimConditions.ts | 2 +- .../erc1155/write/updateTokenMetadata.ts | 2 +- .../extensions/erc20/read/allowanceOf.ts | 2 +- .../extensions/erc20/read/balanceOf.ts | 2 +- .../extensions/erc20/read/canClaim.ts | 4 +- .../contract/extensions/erc20/read/get.ts | 2 +- .../erc20/read/getActiveClaimConditions.ts | 2 +- .../erc20/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../extensions/erc20/read/getClaimerProofs.ts | 2 +- .../erc20/read/signatureGenerate.ts | 6 +-- .../extensions/erc20/read/totalSupply.ts | 2 +- .../contract/extensions/erc20/write/burn.ts | 2 +- .../extensions/erc20/write/burnFrom.ts | 2 +- .../extensions/erc20/write/mintBatchTo.ts | 2 +- .../contract/extensions/erc20/write/mintTo.ts | 2 +- .../extensions/erc20/write/setAllowance.ts | 2 +- .../erc20/write/setClaimConditions.ts | 2 +- .../extensions/erc20/write/signatureMint.ts | 2 +- .../extensions/erc20/write/transfer.ts | 2 +- .../extensions/erc20/write/transferFrom.ts | 2 +- .../erc20/write/updateClaimConditions.ts | 2 +- .../extensions/erc721/read/balanceOf.ts | 2 +- .../extensions/erc721/read/canClaim.ts | 2 +- .../contract/extensions/erc721/read/get.ts | 2 +- .../erc721/read/getActiveClaimConditions.ts | 2 +- .../contract/extensions/erc721/read/getAll.ts | 2 +- .../erc721/read/getAllClaimConditions.ts | 2 +- .../read/getClaimIneligibilityReasons.ts | 2 +- .../erc721/read/getClaimerProofs.ts | 2 +- .../extensions/erc721/read/getOwned.ts | 2 +- .../extensions/erc721/read/isApproved.ts | 2 +- .../erc721/read/signatureGenerate.ts | 6 +-- .../erc721/read/signaturePrepare.ts | 6 +-- .../erc721/read/totalClaimedSupply.ts | 2 +- .../extensions/erc721/read/totalCount.ts | 2 +- .../erc721/read/totalUnclaimedSupply.ts | 2 +- .../contract/extensions/erc721/write/burn.ts | 2 +- .../extensions/erc721/write/lazyMint.ts | 4 +- .../extensions/erc721/write/mintBatchTo.ts | 4 +- .../extensions/erc721/write/mintTo.ts | 4 +- .../erc721/write/setApprovalForAll.ts | 4 +- .../erc721/write/setApprovalForToken.ts | 4 +- .../erc721/write/setClaimConditions.ts | 10 ++--- .../extensions/erc721/write/signatureMint.ts | 10 ++--- .../extensions/erc721/write/transfer.ts | 2 +- .../extensions/erc721/write/transferFrom.ts | 2 +- .../erc721/write/updateClaimConditions.ts | 11 +++--- .../erc721/write/updateTokenMetadata.ts | 4 +- .../directListings/read/getAllValid.ts | 2 +- .../directListings/read/getListing.ts | 2 +- .../directListings/read/getTotalCount.ts | 2 +- .../read/isBuyerApprovedForListing.ts | 2 +- .../read/isCurrencyApprovedForListing.ts | 2 +- .../write/approveBuyerForReservedListing.ts | 2 +- .../directListings/write/buyFromListing.ts | 2 +- .../directListings/write/cancelListing.ts | 2 +- .../directListings/write/createListing.ts | 2 +- .../revokeBuyerApprovalForReservedListing.ts | 2 +- .../write/revokeCurrencyApprovalForListing.ts | 5 ++- .../directListings/write/updateListing.ts | 2 +- .../englishAuctions/read/getAll.ts | 2 +- .../englishAuctions/read/getAllValid.ts | 2 +- .../englishAuctions/read/getAuction.ts | 2 +- .../englishAuctions/read/getBidBufferBps.ts | 2 +- .../englishAuctions/read/getMinimumNextBid.ts | 2 +- .../englishAuctions/read/getTotalCount.ts | 2 +- .../englishAuctions/read/getWinner.ts | 2 +- .../englishAuctions/read/getWinningBid.ts | 2 +- .../englishAuctions/read/isWinningBid.ts | 2 +- .../englishAuctions/write/buyoutAuction.ts | 7 ++-- .../englishAuctions/write/cancelAuction.ts | 7 ++-- .../write/closeAuctionForBidder.ts | 7 ++-- .../write/closeAuctionForSeller.ts | 7 ++-- .../englishAuctions/write/executeSale.ts | 2 +- .../englishAuctions/write/makeBid.ts | 2 +- .../extensions/marketplaceV3/index.ts | 2 +- .../marketplaceV3/offers/read/getAll.ts | 2 +- .../marketplaceV3/offers/read/getAllValid.ts | 2 +- .../marketplaceV3/offers/read/getOffer.ts | 2 +- .../offers/read/getTotalCount.ts | 2 +- .../marketplaceV3/offers/write/acceptOffer.ts | 2 +- .../marketplaceV3/offers/write/cancelOffer.ts | 2 +- .../marketplaceV3/offers/write/makeOffer.ts | 2 +- src/server/routes/contract/metadata/abi.ts | 2 +- src/server/routes/contract/metadata/events.ts | 2 +- .../routes/contract/metadata/extensions.ts | 4 +- .../routes/contract/metadata/functions.ts | 4 +- src/server/routes/contract/roles/read/get.ts | 2 +- .../routes/contract/roles/read/getAll.ts | 2 +- .../routes/contract/roles/write/grant.ts | 2 +- .../routes/contract/roles/write/revoke.ts | 2 +- .../royalties/read/getDefaultRoyaltyInfo.ts | 4 +- .../royalties/read/getTokenRoyaltyInfo.ts | 2 +- .../royalties/write/setDefaultRoyaltyInfo.ts | 4 +- .../royalties/write/setTokenRoyaltyInfo.ts | 4 +- .../subscriptions/addContractSubscription.ts | 4 +- .../getContractIndexedBlockRange.ts | 2 +- .../subscriptions/getContractSubscriptions.ts | 4 +- .../contract/subscriptions/getLatestBlock.ts | 2 +- .../removeContractSubscription.ts | 4 +- .../transactions/getTransactionReceipts.ts | 4 +- .../getTransactionReceiptsByTimestamp.ts | 2 +- .../paginateTransactionReceipts.ts | 2 +- src/server/routes/contract/write/write.ts | 4 +- src/server/routes/deploy/contractTypes.ts | 4 +- src/server/routes/deploy/index.ts | 6 +-- src/server/routes/deploy/prebuilt.ts | 6 +-- src/server/routes/deploy/prebuilts/edition.ts | 6 +-- .../routes/deploy/prebuilts/editionDrop.ts | 6 +-- .../routes/deploy/prebuilts/marketplaceV3.ts | 6 +-- .../routes/deploy/prebuilts/multiwrap.ts | 6 +-- .../routes/deploy/prebuilts/nftCollection.ts | 6 +-- src/server/routes/deploy/prebuilts/nftDrop.ts | 6 +-- src/server/routes/deploy/prebuilts/pack.ts | 6 +-- .../routes/deploy/prebuilts/signatureDrop.ts | 6 +-- src/server/routes/deploy/prebuilts/split.ts | 6 +-- src/server/routes/deploy/prebuilts/token.ts | 6 +-- .../routes/deploy/prebuilts/tokenDrop.ts | 6 +-- src/server/routes/deploy/prebuilts/vote.ts | 6 +-- src/server/routes/deploy/published.ts | 4 +- src/server/routes/home.ts | 2 +- src/server/routes/index.ts | 2 +- src/server/routes/relayer/create.ts | 2 +- src/server/routes/relayer/index.ts | 3 +- src/server/routes/relayer/revoke.ts | 2 +- src/server/routes/relayer/update.ts | 2 +- src/server/routes/system/health.ts | 2 +- src/server/routes/system/queue.ts | 2 +- .../routes/transaction/blockchain/getLogs.ts | 4 +- .../transaction/blockchain/getReceipt.ts | 4 +- .../blockchain/getUserOpReceipt.ts | 2 +- .../transaction/blockchain/sendSignedTx.ts | 2 +- .../blockchain/sendSignedUserOp.ts | 3 +- src/server/routes/transaction/cancel.ts | 2 +- src/server/routes/transaction/getAll.ts | 2 +- .../transaction/getAllDeployedContracts.ts | 4 +- src/server/routes/transaction/retry-failed.ts | 4 +- src/server/routes/transaction/retry.ts | 6 +-- src/server/routes/transaction/status.ts | 6 +-- src/server/routes/transaction/syncRetry.ts | 2 +- src/server/routes/webhooks/create.ts | 4 +- src/server/routes/webhooks/events.ts | 4 +- src/server/routes/webhooks/getAll.ts | 2 +- src/server/routes/webhooks/revoke.ts | 2 +- src/server/routes/webhooks/test.ts | 2 +- src/server/schemas/contract/index.ts | 2 +- src/server/schemas/contractSubscription.ts | 2 +- src/server/schemas/erc20/index.ts | 2 +- src/server/schemas/eventLog.ts | 2 +- src/server/schemas/keypairs.ts | 4 +- src/server/schemas/nft/index.ts | 4 +- src/server/schemas/sharedApiSchemas.ts | 2 +- src/server/schemas/transaction/index.ts | 2 +- src/server/schemas/transactionReceipt.ts | 2 +- src/server/schemas/wallet/index.ts | 2 +- src/server/schemas/webhook.ts | 2 +- src/server/schemas/websocket/index.ts | 2 +- src/server/utils/chain.ts | 4 +- src/server/utils/marketplaceV3.ts | 6 ++- src/server/utils/openapi.ts | 2 +- src/server/utils/storage/localStorage.ts | 2 +- src/server/utils/validator.ts | 2 +- .../utils/wallets/createAwsKmsWallet.ts | 2 +- .../utils/wallets/createGcpKmsWallet.ts | 2 +- src/server/utils/wallets/createSmartWallet.ts | 8 ++-- src/server/utils/wallets/getAwsKmsAccount.ts | 2 +- src/server/utils/wallets/getLocalWallet.ts | 2 +- src/server/utils/wallets/getSmartWallet.ts | 10 +++-- src/server/utils/websocket.ts | 10 ++--- src/tests/auth.test.ts | 2 +- src/tests/cors.test.ts | 4 +- src/tests/shared/chain.ts | 2 +- src/tests/swr.test.ts | 2 +- src/utils/account.ts | 4 +- src/utils/cache/getContract.ts | 2 +- src/utils/cache/getSmartWalletV5.ts | 4 +- src/utils/cache/getWallet.ts | 2 +- src/utils/chain.ts | 2 +- src/utils/cron/clearCacheCron.ts | 2 +- src/utils/cron/isValidCron.ts | 4 +- src/utils/transaction/cancelTransaction.ts | 7 ++-- src/utils/transaction/insertTransaction.ts | 4 +- src/utils/transaction/queueTransation.ts | 2 +- .../transaction/simulateQueuedTransaction.ts | 2 +- src/utils/usage.ts | 12 +++--- src/utils/webhook.ts | 2 +- src/worker/queues/processEventLogsQueue.ts | 4 +- .../queues/processTransactionReceiptsQueue.ts | 4 +- src/worker/queues/sendWebhookQueue.ts | 2 +- .../tasks/cancelRecycledNoncesWorker.ts | 8 ++-- src/worker/tasks/chainIndexer.ts | 2 +- .../migratePostgresTransactionsWorker.ts | 6 +-- src/worker/tasks/mineTransactionWorker.ts | 6 +-- src/worker/tasks/nonceHealthCheckWorker.ts | 4 +- src/worker/tasks/nonceResyncWorker.ts | 2 +- src/worker/tasks/processEventLogsWorker.ts | 14 +++---- .../tasks/processTransactionReceiptsWorker.ts | 10 ++--- src/worker/tasks/pruneTransactionsWorker.ts | 2 +- src/worker/tasks/sendTransactionWorker.ts | 8 ++-- src/worker/tasks/sendWebhookWorker.ts | 8 ++-- test/e2e/config.ts | 2 +- test/e2e/scripts/counter.ts | 2 +- test/e2e/tests/extensions.test.ts | 4 +- test/e2e/tests/load.test.ts | 2 +- .../e2e/tests/routes/erc1155-transfer.test.ts | 2 +- test/e2e/tests/routes/erc20-transfer.test.ts | 2 +- test/e2e/tests/routes/erc721-transfer.test.ts | 2 +- test/e2e/tests/setup.ts | 4 +- test/e2e/tests/userop.test.ts | 2 +- test/e2e/utils/anvil.ts | 2 +- test/e2e/utils/transactions.ts | 4 +- vitest.global-setup.ts | 2 +- 337 files changed, 552 insertions(+), 600 deletions(-) delete mode 100644 .eslintrc.json delete mode 100644 eslint.config.mjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 621ab0184..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "rules": { - "no-console": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { "argsIgnorePattern": "^_" } - ] - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 65fc2c596..000000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [ - ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"), - { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - parser: tsParser, - }, - - rules: { - "no-console": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-explicit-any": "off", - - "@typescript-eslint/no-unused-vars": ["error", { - argsIgnorePattern: "^_", - }], - }, - }, -]; \ No newline at end of file diff --git a/package.json b/package.json index 54b596802..30122c84b 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,12 @@ "start:run": "node --experimental-specifier-resolution=node ./dist/index.js", "start:docker": "docker compose --profile engine --env-file ./.env up --remove-orphans", "start:docker-force-build": "docker compose --profile engine --env-file ./.env up --remove-orphans --build", - "lint:fix": "eslint --fix 'src/**/*.ts'", - "lint:fix:sdk": "eslint --fix 'sdk/src/**/*.ts", + "biome:format": "yarn biome format", + "biome:format:fix": "yarn biome format --write", + "biome:lint": "yarn biome lint", + "biome:lint:fix": "yarn biome lint --write", + "biome:check": "yarn biome check", + "biome:check:fix": "yarn biome check --write", "test:unit": "vitest", "test:coverage": "vitest run --coverage", "copy-files": "cp -r ./src/prisma ./dist/" @@ -85,11 +89,7 @@ "@types/pg": "^8.6.6", "@types/uuid": "^9.0.1", "@types/ws": "^8.5.5", - "@typescript-eslint/eslint-plugin": "^8.15.0", - "@typescript-eslint/parser": "^8.15.0", "@vitest/coverage-v8": "^2.0.3", - "eslint": "^9.15.0", - "eslint-config-prettier": "^9.1.0", "openapi-typescript-codegen": "^0.25.0", "prettier": "^2.8.7", "typescript": "^5.1.3", diff --git a/src/db/client.ts b/src/db/client.ts index eb3d84c22..458742b5b 100644 --- a/src/db/client.ts +++ b/src/db/client.ts @@ -1,6 +1,6 @@ import { PrismaClient } from "@prisma/client"; -import pg, { Knex } from "knex"; -import { PrismaTransaction } from "../schema/prisma"; +import pg, { type Knex } from "knex"; +import type { PrismaTransaction } from "../schema/prisma"; import { env } from "../utils/env"; export const prisma = new PrismaClient({ diff --git a/src/db/contractEventLogs/createContractEventLogs.ts b/src/db/contractEventLogs/createContractEventLogs.ts index cb498e9c1..9442f5a27 100644 --- a/src/db/contractEventLogs/createContractEventLogs.ts +++ b/src/db/contractEventLogs/createContractEventLogs.ts @@ -1,5 +1,5 @@ -import { ContractEventLogs, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import type { ContractEventLogs, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts index 1cd733b4c..db011f815 100644 --- a/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts +++ b/src/db/contractTransactionReceipts/createContractTransactionReceipts.ts @@ -1,5 +1,5 @@ -import { ContractTransactionReceipts, Prisma } from "@prisma/client"; -import { PrismaTransaction } from "../../schema/prisma"; +import type { ContractTransactionReceipts, Prisma } from "@prisma/client"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; export interface BulkInsertContractLogsParams { diff --git a/src/db/keypair/delete.ts b/src/db/keypair/delete.ts index 08fd6529c..f731594fb 100644 --- a/src/db/keypair/delete.ts +++ b/src/db/keypair/delete.ts @@ -1,4 +1,4 @@ -import { Keypairs } from "@prisma/client"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const deleteKeypair = async ({ diff --git a/src/db/keypair/get.ts b/src/db/keypair/get.ts index 37e1cf00d..3e095a696 100644 --- a/src/db/keypair/get.ts +++ b/src/db/keypair/get.ts @@ -1,5 +1,5 @@ -import { Keypairs } from "@prisma/client"; import { createHash } from "crypto"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const getKeypairByHash = async ( diff --git a/src/db/keypair/insert.ts b/src/db/keypair/insert.ts index c6d7b737d..17b7dd9b3 100644 --- a/src/db/keypair/insert.ts +++ b/src/db/keypair/insert.ts @@ -1,6 +1,6 @@ -import { Keypairs } from "@prisma/client"; import { createHash } from "crypto"; -import { KeypairAlgorithm } from "../../server/schemas/keypairs"; +import type { Keypairs } from "@prisma/client"; +import type { KeypairAlgorithm } from "../../server/schemas/keypairs"; import { prisma } from "../client"; export const insertKeypair = async ({ diff --git a/src/db/keypair/list.ts b/src/db/keypair/list.ts index cc08bbda8..0bf1dc494 100644 --- a/src/db/keypair/list.ts +++ b/src/db/keypair/list.ts @@ -1,4 +1,4 @@ -import { Keypairs } from "@prisma/client"; +import type { Keypairs } from "@prisma/client"; import { prisma } from "../client"; export const listKeypairs = async (): Promise => { diff --git a/src/db/relayer/getRelayerById.ts b/src/db/relayer/getRelayerById.ts index 315132b5a..9216e5c5f 100644 --- a/src/db/relayer/getRelayerById.ts +++ b/src/db/relayer/getRelayerById.ts @@ -17,7 +17,7 @@ export const getRelayerById = async ({ id }: GetRelayerByIdParams) => { return { ...relayer, - chainId: parseInt(relayer.chainId), + chainId: Number.parseInt(relayer.chainId), allowedContracts: relayer.allowedContracts ? (JSON.parse(relayer.allowedContracts).map((contractAddress: string) => contractAddress.toLowerCase(), diff --git a/src/db/transactions/queueTx.ts b/src/db/transactions/queueTx.ts index 76baa3656..31b4c5bff 100644 --- a/src/db/transactions/queueTx.ts +++ b/src/db/transactions/queueTx.ts @@ -1,6 +1,6 @@ import type { DeployTransaction, Transaction } from "@thirdweb-dev/sdk"; import type { ERC4337EthersSigner } from "@thirdweb-dev/wallets/dist/declarations/src/evm/connectors/smart-wallet/lib/erc4337-signer"; -import { ZERO_ADDRESS, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS } from "thirdweb"; import type { ContractExtension } from "../../schema/extension"; import { parseTransactionOverrides } from "../../server/utils/transactionOverrides"; import { maybeBigInt, normalizeAddress } from "../../utils/primitiveTypes"; diff --git a/src/db/wallets/deleteWalletDetails.ts b/src/db/wallets/deleteWalletDetails.ts index 69e5fd3da..96aeb3860 100644 --- a/src/db/wallets/deleteWalletDetails.ts +++ b/src/db/wallets/deleteWalletDetails.ts @@ -1,4 +1,4 @@ -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { prisma } from "../client"; export const deleteWalletDetails = async (walletAddress: Address) => { diff --git a/src/db/wallets/getAllWallets.ts b/src/db/wallets/getAllWallets.ts index fd8ef80a0..d6e4dbc7a 100644 --- a/src/db/wallets/getAllWallets.ts +++ b/src/db/wallets/getAllWallets.ts @@ -1,4 +1,4 @@ -import { PrismaTransaction } from "../../schema/prisma"; +import type { PrismaTransaction } from "../../schema/prisma"; import { getPrismaWithPostgresTx } from "../client"; interface GetAllWalletsParams { diff --git a/src/db/wallets/nonceMap.ts b/src/db/wallets/nonceMap.ts index 868b00dcc..a8592e0e4 100644 --- a/src/db/wallets/nonceMap.ts +++ b/src/db/wallets/nonceMap.ts @@ -1,4 +1,4 @@ -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { env } from "../../utils/env"; import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; @@ -53,7 +53,7 @@ export const getNonceMap = async (args: { for (let i = 0; i < elementsWithScores.length; i += 2) { result.push({ queueId: elementsWithScores[i], - nonce: parseInt(elementsWithScores[i + 1]), + nonce: Number.parseInt(elementsWithScores[i + 1]), }); } return result; @@ -73,7 +73,7 @@ export const pruneNonceMaps = async () => { let numDeleted = 0; for (const [error, result] of results) { if (!error) { - numDeleted += parseInt(result as string); + numDeleted += Number.parseInt(result as string); } } return numDeleted; diff --git a/src/db/wallets/walletNonce.ts b/src/db/wallets/walletNonce.ts index 041b7d58b..f44d02492 100644 --- a/src/db/wallets/walletNonce.ts +++ b/src/db/wallets/walletNonce.ts @@ -1,8 +1,8 @@ import { + type Address, eth_getTransactionCount, getAddress, getRpcClient, - type Address, } from "thirdweb"; import { getChain } from "../../utils/chain"; import { logger } from "../../utils/logger"; diff --git a/src/db/webhooks/createWebhook.ts b/src/db/webhooks/createWebhook.ts index 8e8bb66d7..981ca2784 100644 --- a/src/db/webhooks/createWebhook.ts +++ b/src/db/webhooks/createWebhook.ts @@ -1,6 +1,6 @@ -import { Webhooks } from "@prisma/client"; import { createHash, randomBytes } from "crypto"; -import { WebhooksEventTypes } from "../../schema/webhooks"; +import type { Webhooks } from "@prisma/client"; +import type { WebhooksEventTypes } from "../../schema/webhooks"; import { prisma } from "../client"; interface CreateWebhooksParams { diff --git a/src/db/webhooks/getAllWebhooks.ts b/src/db/webhooks/getAllWebhooks.ts index 85e93eefc..1f76e76c8 100644 --- a/src/db/webhooks/getAllWebhooks.ts +++ b/src/db/webhooks/getAllWebhooks.ts @@ -1,4 +1,4 @@ -import { Webhooks } from "@prisma/client"; +import type { Webhooks } from "@prisma/client"; import { prisma } from "../client"; export const getAllWebhooks = async (): Promise => { diff --git a/src/lib/chain/chain-capabilities.ts b/src/lib/chain/chain-capabilities.ts index 622b13053..574e75958 100644 --- a/src/lib/chain/chain-capabilities.ts +++ b/src/lib/chain/chain-capabilities.ts @@ -12,7 +12,7 @@ const Services = [ "insight", ] as const; -export type Service = typeof Services[number]; +export type Service = (typeof Services)[number]; export type ChainCapabilities = Array<{ service: Service; diff --git a/src/schema/prisma.ts b/src/schema/prisma.ts index abe01be4c..03c088379 100644 --- a/src/schema/prisma.ts +++ b/src/schema/prisma.ts @@ -1,5 +1,5 @@ import type { Prisma, PrismaClient } from "@prisma/client"; -import { DefaultArgs } from "@prisma/client/runtime/library"; +import type { DefaultArgs } from "@prisma/client/runtime/library"; export type PrismaTransaction = Omit< PrismaClient, diff --git a/src/server/index.ts b/src/server/index.ts index 66d7f2e10..3e9b32f58 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -1,8 +1,8 @@ -import type { TypeBoxTypeProvider } from "@fastify/type-provider-typebox"; -import fastify, { type FastifyInstance } from "fastify"; import * as fs from "node:fs"; import path from "node:path"; import { URL } from "node:url"; +import type { TypeBoxTypeProvider } from "@fastify/type-provider-typebox"; +import fastify, { type FastifyInstance } from "fastify"; import { clearCacheCron } from "../utils/cron/clearCacheCron"; import { env } from "../utils/env"; import { logger } from "../utils/logger"; diff --git a/src/server/middleware/adminRoutes.ts b/src/server/middleware/adminRoutes.ts index ae3becfe3..60921114c 100644 --- a/src/server/middleware/adminRoutes.ts +++ b/src/server/middleware/adminRoutes.ts @@ -1,9 +1,9 @@ +import { timingSafeEqual } from "crypto"; import { createBullBoard } from "@bull-board/api"; import { BullMQAdapter } from "@bull-board/api/bullMQAdapter"; import { FastifyAdapter } from "@bull-board/fastify"; import fastifyBasicAuth from "@fastify/basic-auth"; import type { Queue } from "bullmq"; -import { timingSafeEqual } from "crypto"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { env } from "../../utils/env"; @@ -85,7 +85,9 @@ const assertAdminBasicAuth = (username: string, password: string) => { const buf1 = Buffer.from(password.padEnd(100)); const buf2 = Buffer.from(ADMIN_ROUTES_PASSWORD.padEnd(100)); return timingSafeEqual(buf1, buf2); - } catch { /* empty */ } + } catch { + /* empty */ + } } return false; }; diff --git a/src/server/middleware/auth.ts b/src/server/middleware/auth.ts index c6ad2dd81..5b0f3841e 100644 --- a/src/server/middleware/auth.ts +++ b/src/server/middleware/auth.ts @@ -1,11 +1,11 @@ +import { createHash } from "crypto"; import { parseJWT } from "@thirdweb-dev/auth"; import { ThirdwebAuth, - getToken as getJWT, type ThirdwebAuthUser, + getToken as getJWT, } from "@thirdweb-dev/auth/fastify"; import { AsyncWallet } from "@thirdweb-dev/wallets/evm/wallets/async"; -import { createHash } from "crypto"; import type { FastifyInstance } from "fastify"; import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken, { type JwtPayload } from "jsonwebtoken"; diff --git a/src/server/middleware/cors/cors.ts b/src/server/middleware/cors/cors.ts index e59e24210..2ae1528e2 100644 --- a/src/server/middleware/cors/cors.ts +++ b/src/server/middleware/cors/cors.ts @@ -1,4 +1,4 @@ -import { +import type { FastifyInstance, FastifyReply, FastifyRequest, @@ -16,7 +16,7 @@ declare module "fastify" { } } -type ArrayOfValueOrArray = Array> +type ArrayOfValueOrArray = Array>; type OriginCallback = ( err: Error | null, diff --git a/src/server/middleware/cors/index.ts b/src/server/middleware/cors/index.ts index e964945d9..140828825 100644 --- a/src/server/middleware/cors/index.ts +++ b/src/server/middleware/cors/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { fastifyCors } from "./cors"; export const withCors = async (server: FastifyInstance) => { diff --git a/src/server/middleware/cors/vary.ts b/src/server/middleware/cors/vary.ts index 2a4423138..3ba118daf 100644 --- a/src/server/middleware/cors/vary.ts +++ b/src/server/middleware/cors/vary.ts @@ -70,7 +70,7 @@ function createAddFieldnameToVary(fieldname: string) { validateFieldname(fieldname); - return function (reply: FastifyReply) { + return (reply: FastifyReply) => { let header = reply.getHeader("Vary") as any; if (!header) { diff --git a/src/server/middleware/engineMode.ts b/src/server/middleware/engineMode.ts index 790cd1526..1fd68f1d4 100644 --- a/src/server/middleware/engineMode.ts +++ b/src/server/middleware/engineMode.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { env } from "../../utils/env"; export const withEnforceEngineMode = async (server: FastifyInstance) => { diff --git a/src/server/middleware/prometheus.ts b/src/server/middleware/prometheus.ts index 2b0faaf24..2a3d2fb74 100644 --- a/src/server/middleware/prometheus.ts +++ b/src/server/middleware/prometheus.ts @@ -1,4 +1,4 @@ -import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; +import type { FastifyInstance, FastifyReply, FastifyRequest } from "fastify"; import { env } from "../../utils/env"; import { recordMetrics } from "../../utils/prometheus"; diff --git a/src/server/middleware/websocket.ts b/src/server/middleware/websocket.ts index ae0994c3f..89a6aca6c 100644 --- a/src/server/middleware/websocket.ts +++ b/src/server/middleware/websocket.ts @@ -1,15 +1,15 @@ import WebSocketPlugin from "@fastify/websocket"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { logger } from "../../utils/logger"; export const withWebSocket = async (server: FastifyInstance) => { await server.register(WebSocketPlugin, { - errorHandler: function ( + errorHandler: ( error, conn /* SocketStream */, _req /* FastifyRequest */, _reply /* FastifyReply */, - ) { + ) => { logger({ service: "websocket", level: "error", diff --git a/src/server/routes/admin/nonces.ts b/src/server/routes/admin/nonces.ts index 2a2f528d3..9b8da1d05 100644 --- a/src/server/routes/admin/nonces.ts +++ b/src/server/routes/admin/nonces.ts @@ -1,8 +1,8 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - Address, + type Address, eth_getTransactionCount, getAddress, getRpcClient, @@ -91,7 +91,7 @@ export async function getNonceDetailsRoute(fastify: FastifyInstance) { const { walletAddress, chain } = request.query; const result = await getNonceDetails({ walletAddress: walletAddress ? getAddress(walletAddress) : undefined, - chainId: chain ? parseInt(chain) : undefined, + chainId: chain ? Number.parseInt(chain) : undefined, }); reply.status(StatusCodes.OK).send({ @@ -144,12 +144,12 @@ export const getNonceDetails = async ({ walletAddress: key.walletAddress, chainId: key.chainId, onchainNonce: onchainNonces[index], - lastUsedNonce: parseInt(lastUsedNonceResult[1] as string) ?? 0, + lastUsedNonce: Number.parseInt(lastUsedNonceResult[1] as string) ?? 0, sentNonces: (sentNoncesResult[1] as string[]) - .map((nonce) => parseInt(nonce)) + .map((nonce) => Number.parseInt(nonce)) .sort((a, b) => b - a), recycledNonces: (recycledNoncesResult[1] as string[]) - .map((nonce) => parseInt(nonce)) + .map((nonce) => Number.parseInt(nonce)) .sort((a, b) => b - a), }; }); diff --git a/src/server/routes/admin/transaction.ts b/src/server/routes/admin/transaction.ts index 5827e5d24..d28524e46 100644 --- a/src/server/routes/admin/transaction.ts +++ b/src/server/routes/admin/transaction.ts @@ -1,6 +1,6 @@ -import { Static, Type } from "@sinclair/typebox"; -import { Queue } from "bullmq"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { Queue } from "bullmq"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { stringify } from "thirdweb/utils"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/auth/access-tokens/create.ts b/src/server/routes/auth/access-tokens/create.ts index 9c33113cd..61c480cc3 100644 --- a/src/server/routes/auth/access-tokens/create.ts +++ b/src/server/routes/auth/access-tokens/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { buildJWT } from "@thirdweb-dev/auth"; import { LocalWallet } from "@thirdweb-dev/wallets"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/auth/access-tokens/getAll.ts b/src/server/routes/auth/access-tokens/getAll.ts index 181f35ec8..220faa072 100644 --- a/src/server/routes/auth/access-tokens/getAll.ts +++ b/src/server/routes/auth/access-tokens/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAccessTokens } from "../../../../db/tokens/getAccessTokens"; diff --git a/src/server/routes/auth/access-tokens/revoke.ts b/src/server/routes/auth/access-tokens/revoke.ts index 2d509bb65..f856a8467 100644 --- a/src/server/routes/auth/access-tokens/revoke.ts +++ b/src/server/routes/auth/access-tokens/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { revokeToken } from "../../../../db/tokens/revokeToken"; diff --git a/src/server/routes/auth/access-tokens/update.ts b/src/server/routes/auth/access-tokens/update.ts index a5d730fdb..4f040c088 100644 --- a/src/server/routes/auth/access-tokens/update.ts +++ b/src/server/routes/auth/access-tokens/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateToken } from "../../../../db/tokens/updateToken"; diff --git a/src/server/routes/auth/keypair/add.ts b/src/server/routes/auth/keypair/add.ts index 3ecc24364..adf5f83f5 100644 --- a/src/server/routes/auth/keypair/add.ts +++ b/src/server/routes/auth/keypair/add.ts @@ -1,6 +1,6 @@ -import { Keypairs, Prisma } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Keypairs, Prisma } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { insertKeypair } from "../../../../db/keypair/insert"; import { isWellFormedPublicKey } from "../../../../utils/crypto"; diff --git a/src/server/routes/auth/keypair/list.ts b/src/server/routes/auth/keypair/list.ts index 8c4395f0e..c3e8ec820 100644 --- a/src/server/routes/auth/keypair/list.ts +++ b/src/server/routes/auth/keypair/list.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { listKeypairs } from "../../../../db/keypair/list"; import { KeypairSchema, toKeypairSchema } from "../../../schemas/keypairs"; diff --git a/src/server/routes/auth/keypair/remove.ts b/src/server/routes/auth/keypair/remove.ts index 939979d52..95a878dc0 100644 --- a/src/server/routes/auth/keypair/remove.ts +++ b/src/server/routes/auth/keypair/remove.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deleteKeypair } from "../../../../db/keypair/delete"; import { keypairCache } from "../../../../utils/cache/keypair"; diff --git a/src/server/routes/auth/permissions/getAll.ts b/src/server/routes/auth/permissions/getAll.ts index 7a4f5d4a4..3eececd8f 100644 --- a/src/server/routes/auth/permissions/getAll.ts +++ b/src/server/routes/auth/permissions/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../../db/client"; diff --git a/src/server/routes/auth/permissions/grant.ts b/src/server/routes/auth/permissions/grant.ts index 6f9ef49ee..a894212cb 100644 --- a/src/server/routes/auth/permissions/grant.ts +++ b/src/server/routes/auth/permissions/grant.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updatePermissions } from "../../../../db/permissions/updatePermissions"; diff --git a/src/server/routes/auth/permissions/revoke.ts b/src/server/routes/auth/permissions/revoke.ts index 08f1609bb..0e0745e6b 100644 --- a/src/server/routes/auth/permissions/revoke.ts +++ b/src/server/routes/auth/permissions/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deletePermissions } from "../../../../db/permissions/deletePermissions"; diff --git a/src/server/routes/backend-wallet/create.ts b/src/server/routes/backend-wallet/create.ts index c25ff560c..b0ef7ba66 100644 --- a/src/server/routes/backend-wallet/create.ts +++ b/src/server/routes/backend-wallet/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/getAll.ts b/src/server/routes/backend-wallet/getAll.ts index a9a9b1a48..db6502767 100644 --- a/src/server/routes/backend-wallet/getAll.ts +++ b/src/server/routes/backend-wallet/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAllWallets } from "../../../db/wallets/getAllWallets"; diff --git a/src/server/routes/backend-wallet/getBalance.ts b/src/server/routes/backend-wallet/getBalance.ts index 43dbd7b54..ac4980566 100644 --- a/src/server/routes/backend-wallet/getBalance.ts +++ b/src/server/routes/backend-wallet/getBalance.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/backend-wallet/getNonce.ts b/src/server/routes/backend-wallet/getNonce.ts index 593cc9ed9..968d9e8aa 100644 --- a/src/server/routes/backend-wallet/getNonce.ts +++ b/src/server/routes/backend-wallet/getNonce.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/getTransactions.ts b/src/server/routes/backend-wallet/getTransactions.ts index 5e8dcf89e..099713f6d 100644 --- a/src/server/routes/backend-wallet/getTransactions.ts +++ b/src/server/routes/backend-wallet/getTransactions.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAddress } from "thirdweb"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/backend-wallet/getTransactionsByNonce.ts b/src/server/routes/backend-wallet/getTransactionsByNonce.ts index b804df6aa..4dd931073 100644 --- a/src/server/routes/backend-wallet/getTransactionsByNonce.ts +++ b/src/server/routes/backend-wallet/getTransactionsByNonce.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/backend-wallet/import.ts b/src/server/routes/backend-wallet/import.ts index 510059a14..a9930f46e 100644 --- a/src/server/routes/backend-wallet/import.ts +++ b/src/server/routes/backend-wallet/import.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../utils/cache/getConfig"; diff --git a/src/server/routes/backend-wallet/remove.ts b/src/server/routes/backend-wallet/remove.ts index 431c118d8..526401ae4 100644 --- a/src/server/routes/backend-wallet/remove.ts +++ b/src/server/routes/backend-wallet/remove.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { deleteWalletDetails } from "../../../db/wallets/deleteWalletDetails"; import { AddressSchema } from "../../schemas/address"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/resetNonces.ts b/src/server/routes/backend-wallet/resetNonces.ts index 8a7690637..4b707adb4 100644 --- a/src/server/routes/backend-wallet/resetNonces.ts +++ b/src/server/routes/backend-wallet/resetNonces.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address, getAddress } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { deleteAllNonces, syncLatestNonceFromOnchain, @@ -71,7 +71,7 @@ const getUsedBackendWallets = async (): Promise< return keys.map((key) => { const tokens = key.split(":"); return { - chainId: parseInt(tokens[1]), + chainId: Number.parseInt(tokens[1]), walletAddress: getAddress(tokens[2]), }; }); diff --git a/src/server/routes/backend-wallet/sendTransaction.ts b/src/server/routes/backend-wallet/sendTransaction.ts index bb29f9386..11da83e3c 100644 --- a/src/server/routes/backend-wallet/sendTransaction.ts +++ b/src/server/routes/backend-wallet/sendTransaction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/sendTransactionBatch.ts b/src/server/routes/backend-wallet/sendTransactionBatch.ts index 3d69c4431..5b158804d 100644 --- a/src/server/routes/backend-wallet/sendTransactionBatch.ts +++ b/src/server/routes/backend-wallet/sendTransactionBatch.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Address, Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/signMessage.ts b/src/server/routes/backend-wallet/signMessage.ts index ac810a795..29468f50f 100644 --- a/src/server/routes/backend-wallet/signMessage.ts +++ b/src/server/routes/backend-wallet/signMessage.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { isHex, type Hex } from "thirdweb"; +import { type Hex, isHex } from "thirdweb"; import { arbitrumSepolia } from "thirdweb/chains"; import { getWalletDetails, diff --git a/src/server/routes/backend-wallet/signTransaction.ts b/src/server/routes/backend-wallet/signTransaction.ts index c6a73c2c2..5155e3d09 100644 --- a/src/server/routes/backend-wallet/signTransaction.ts +++ b/src/server/routes/backend-wallet/signTransaction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import type { Hex } from "thirdweb"; diff --git a/src/server/routes/backend-wallet/signTypedData.ts b/src/server/routes/backend-wallet/signTypedData.ts index 6c4705eea..2dacb253a 100644 --- a/src/server/routes/backend-wallet/signTypedData.ts +++ b/src/server/routes/backend-wallet/signTypedData.ts @@ -1,6 +1,6 @@ import type { TypedDataSigner } from "@ethersproject/abstract-signer"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWallet } from "../../../utils/cache/getWallet"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/backend-wallet/simulateTransaction.ts b/src/server/routes/backend-wallet/simulateTransaction.ts index 0b82c6156..c45b976d9 100644 --- a/src/server/routes/backend-wallet/simulateTransaction.ts +++ b/src/server/routes/backend-wallet/simulateTransaction.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { randomUUID } from "node:crypto"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { randomUUID } from "node:crypto"; import type { Address, Hex } from "thirdweb"; import { doSimulateTransaction } from "../../../utils/transaction/simulateQueuedTransaction"; import type { QueuedTransaction } from "../../../utils/transaction/types"; diff --git a/src/server/routes/backend-wallet/transfer.ts b/src/server/routes/backend-wallet/transfer.ts index d45b6cd28..d4b90e5e1 100644 --- a/src/server/routes/backend-wallet/transfer.ts +++ b/src/server/routes/backend-wallet/transfer.ts @@ -1,12 +1,12 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { + type Address, NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS, getContract, toWei, - type Address, } from "thirdweb"; import { transfer as transferERC20 } from "thirdweb/extensions/erc20"; import { isContractDeployed, resolvePromisedValue } from "thirdweb/utils"; diff --git a/src/server/routes/backend-wallet/update.ts b/src/server/routes/backend-wallet/update.ts index 5c916d8d8..2e099a0a1 100644 --- a/src/server/routes/backend-wallet/update.ts +++ b/src/server/routes/backend-wallet/update.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateWalletDetails } from "../../../db/wallets/updateWalletDetails"; import { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/backend-wallet/withdraw.ts b/src/server/routes/backend-wallet/withdraw.ts index e7815ac72..854a0cdf9 100644 --- a/src/server/routes/backend-wallet/withdraw.ts +++ b/src/server/routes/backend-wallet/withdraw.ts @@ -1,11 +1,11 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { - toSerializableTransaction, - toTokens, type Address, type Hex, + toSerializableTransaction, + toTokens, } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { getWalletBalance } from "thirdweb/wallets"; diff --git a/src/server/routes/chain/get.ts b/src/server/routes/chain/get.ts index b01c90bed..9426a1fc9 100644 --- a/src/server/routes/chain/get.ts +++ b/src/server/routes/chain/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getChainMetadata } from "thirdweb/chains"; diff --git a/src/server/routes/chain/getAll.ts b/src/server/routes/chain/getAll.ts index e1b85cf0d..21d811256 100644 --- a/src/server/routes/chain/getAll.ts +++ b/src/server/routes/chain/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { fetchChains } from "@thirdweb-dev/chains"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/configuration/auth/get.ts b/src/server/routes/configuration/auth/get.ts index 9f8bc0f32..6b078fea6 100644 --- a/src/server/routes/configuration/auth/get.ts +++ b/src/server/routes/configuration/auth/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/auth/update.ts b/src/server/routes/configuration/auth/update.ts index 411dd683f..d129607ca 100644 --- a/src/server/routes/configuration/auth/update.ts +++ b/src/server/routes/configuration/auth/update.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/backend-wallet-balance/get.ts b/src/server/routes/configuration/backend-wallet-balance/get.ts index 1fce8a8ee..35b870caa 100644 --- a/src/server/routes/configuration/backend-wallet-balance/get.ts +++ b/src/server/routes/configuration/backend-wallet-balance/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/backend-wallet-balance/update.ts b/src/server/routes/configuration/backend-wallet-balance/update.ts index edb386e9d..c099ebe42 100644 --- a/src/server/routes/configuration/backend-wallet-balance/update.ts +++ b/src/server/routes/configuration/backend-wallet-balance/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/cache/get.ts b/src/server/routes/configuration/cache/get.ts index 2d4542585..9389d1077 100644 --- a/src/server/routes/configuration/cache/get.ts +++ b/src/server/routes/configuration/cache/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cache/update.ts b/src/server/routes/configuration/cache/update.ts index 96d34db0b..515905d0c 100644 --- a/src/server/routes/configuration/cache/update.ts +++ b/src/server/routes/configuration/cache/update.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/chains/get.ts b/src/server/routes/configuration/chains/get.ts index 588927206..1ce6b49f2 100644 --- a/src/server/routes/configuration/chains/get.ts +++ b/src/server/routes/configuration/chains/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/chains/update.ts b/src/server/routes/configuration/chains/update.ts index 5ae3ed225..54e928b86 100644 --- a/src/server/routes/configuration/chains/update.ts +++ b/src/server/routes/configuration/chains/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/contract-subscriptions/get.ts b/src/server/routes/configuration/contract-subscriptions/get.ts index 36d42d582..faf4fe8a0 100644 --- a/src/server/routes/configuration/contract-subscriptions/get.ts +++ b/src/server/routes/configuration/contract-subscriptions/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { diff --git a/src/server/routes/configuration/contract-subscriptions/update.ts b/src/server/routes/configuration/contract-subscriptions/update.ts index 501ce8b4b..318e04c94 100644 --- a/src/server/routes/configuration/contract-subscriptions/update.ts +++ b/src/server/routes/configuration/contract-subscriptions/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/cors/add.ts b/src/server/routes/configuration/cors/add.ts index aace6cb26..313a3d044 100644 --- a/src/server/routes/configuration/cors/add.ts +++ b/src/server/routes/configuration/cors/add.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/cors/get.ts b/src/server/routes/configuration/cors/get.ts index 37a1aa9bb..f5c4f52ad 100644 --- a/src/server/routes/configuration/cors/get.ts +++ b/src/server/routes/configuration/cors/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/cors/remove.ts b/src/server/routes/configuration/cors/remove.ts index d32a819ef..36e1dcc94 100644 --- a/src/server/routes/configuration/cors/remove.ts +++ b/src/server/routes/configuration/cors/remove.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/cors/set.ts b/src/server/routes/configuration/cors/set.ts index 30a0c6946..afb192c40 100644 --- a/src/server/routes/configuration/cors/set.ts +++ b/src/server/routes/configuration/cors/set.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/ip/get.ts b/src/server/routes/configuration/ip/get.ts index 99250011e..3d83e6089 100644 --- a/src/server/routes/configuration/ip/get.ts +++ b/src/server/routes/configuration/ip/get.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/configuration/ip/set.ts b/src/server/routes/configuration/ip/set.ts index e92a319ce..ca813b8d8 100644 --- a/src/server/routes/configuration/ip/set.ts +++ b/src/server/routes/configuration/ip/set.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/transactions/get.ts b/src/server/routes/configuration/transactions/get.ts index 33cdfeac3..c2053a293 100644 --- a/src/server/routes/configuration/transactions/get.ts +++ b/src/server/routes/configuration/transactions/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfig } from "../../../../utils/cache/getConfig"; diff --git a/src/server/routes/configuration/transactions/update.ts b/src/server/routes/configuration/transactions/update.ts index c94db43ce..715f52ea1 100644 --- a/src/server/routes/configuration/transactions/update.ts +++ b/src/server/routes/configuration/transactions/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/configuration/wallets/get.ts b/src/server/routes/configuration/wallets/get.ts index d170cbea5..68516bd71 100644 --- a/src/server/routes/configuration/wallets/get.ts +++ b/src/server/routes/configuration/wallets/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WalletType } from "../../../../schema/wallet"; diff --git a/src/server/routes/configuration/wallets/update.ts b/src/server/routes/configuration/wallets/update.ts index d21182227..08d5e77e9 100644 --- a/src/server/routes/configuration/wallets/update.ts +++ b/src/server/routes/configuration/wallets/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { updateConfiguration } from "../../../../db/configuration/updateConfiguration"; diff --git a/src/server/routes/contract/events/getAllEvents.ts b/src/server/routes/contract/events/getAllEvents.ts index 37aca20be..787dce6ec 100644 --- a/src/server/routes/contract/events/getAllEvents.ts +++ b/src/server/routes/contract/events/getAllEvents.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/events/getContractEventLogs.ts b/src/server/routes/contract/events/getContractEventLogs.ts index 85e0a0c3c..632629520 100644 --- a/src/server/routes/contract/events/getContractEventLogs.ts +++ b/src/server/routes/contract/events/getContractEventLogs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContractEventLogsByBlockAndTopics } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/events/getEventLogsByTimestamp.ts b/src/server/routes/contract/events/getEventLogsByTimestamp.ts index 2cde46d21..7ad1c18c2 100644 --- a/src/server/routes/contract/events/getEventLogsByTimestamp.ts +++ b/src/server/routes/contract/events/getEventLogsByTimestamp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getEventLogsByBlockTimestamp } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/events/getEvents.ts b/src/server/routes/contract/events/getEvents.ts index f30839eba..e88fb21a3 100644 --- a/src/server/routes/contract/events/getEvents.ts +++ b/src/server/routes/contract/events/getEvents.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/events/paginateEventLogs.ts b/src/server/routes/contract/events/paginateEventLogs.ts index 02a4c5212..cdb607f55 100644 --- a/src/server/routes/contract/events/paginateEventLogs.ts +++ b/src/server/routes/contract/events/paginateEventLogs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../db/configuration/getConfiguration"; diff --git a/src/server/routes/contract/extensions/account/index.ts b/src/server/routes/contract/extensions/account/index.ts index 23ba14c0d..63c15cc07 100644 --- a/src/server/routes/contract/extensions/account/index.ts +++ b/src/server/routes/contract/extensions/account/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { getAllAdmins } from "./read/getAllAdmins"; import { getAllSessions } from "./read/getAllSessions"; import { grantAdmin } from "./write/grantAdmin"; diff --git a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts index 13d5d38a2..68127daca 100644 --- a/src/server/routes/contract/extensions/account/read/getAllAdmins.ts +++ b/src/server/routes/contract/extensions/account/read/getAllAdmins.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/extensions/account/read/getAllSessions.ts b/src/server/routes/contract/extensions/account/read/getAllSessions.ts index fd3bd971a..dd57fccc5 100644 --- a/src/server/routes/contract/extensions/account/read/getAllSessions.ts +++ b/src/server/routes/contract/extensions/account/read/getAllSessions.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { sessionSchema } from "../../../../../schemas/account"; diff --git a/src/server/routes/contract/extensions/account/write/grantAdmin.ts b/src/server/routes/contract/extensions/account/write/grantAdmin.ts index 6d5b11e82..3ac8dbe34 100644 --- a/src/server/routes/contract/extensions/account/write/grantAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/grantAdmin.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/grantSession.ts b/src/server/routes/contract/extensions/account/write/grantSession.ts index 0e64558d7..1b1b2bc64 100644 --- a/src/server/routes/contract/extensions/account/write/grantSession.ts +++ b/src/server/routes/contract/extensions/account/write/grantSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts index 2e21671aa..74de36c0e 100644 --- a/src/server/routes/contract/extensions/account/write/revokeAdmin.ts +++ b/src/server/routes/contract/extensions/account/write/revokeAdmin.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/revokeSession.ts b/src/server/routes/contract/extensions/account/write/revokeSession.ts index f71e40218..e12c7bf84 100644 --- a/src/server/routes/contract/extensions/account/write/revokeSession.ts +++ b/src/server/routes/contract/extensions/account/write/revokeSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/account/write/updateSession.ts b/src/server/routes/contract/extensions/account/write/updateSession.ts index 46da67695..560fdc7c5 100644 --- a/src/server/routes/contract/extensions/account/write/updateSession.ts +++ b/src/server/routes/contract/extensions/account/write/updateSession.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/accountFactory/index.ts b/src/server/routes/contract/extensions/accountFactory/index.ts index 1f10720bf..1b1ab07d9 100644 --- a/src/server/routes/contract/extensions/accountFactory/index.ts +++ b/src/server/routes/contract/extensions/accountFactory/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { getAllAccounts } from "./read/getAllAccounts"; import { getAssociatedAccounts } from "./read/getAssociatedAccounts"; import { isAccountDeployed } from "./read/isAccountDeployed"; diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts index 5a5208679..0226183db 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAllAccounts.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts index 66f1ad35a..46eb7a52e 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/getAssociatedAccounts.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; diff --git a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts index 0ccbbde66..23fdfb4b1 100644 --- a/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts +++ b/src/server/routes/contract/extensions/accountFactory/read/isAccountDeployed.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { AddressSchema } from "../../../../../schemas/address"; diff --git a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts index 635da28ae..59194f344 100644 --- a/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc1155/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts index 5b100dd11..5efb82ddc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc1155/read/canClaim.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/get.ts b/src/server/routes/contract/extensions/erc1155/read/get.ts index c9edfafca..69b6f51e3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/get.ts +++ b/src/server/routes/contract/extensions/erc1155/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts index 62f7807b4..cd9d8791d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getAll.ts b/src/server/routes/contract/extensions/erc1155/read/getAll.ts index 8d1018a5b..e823832d3 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts index 5bc021d5d..72fbaae90 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts index d50a6af03..85376bfe1 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts index 59a130fb0..fdfaf22fc 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts index e56383bd0..bda66988d 100644 --- a/src/server/routes/contract/extensions/erc1155/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc1155/read/getOwned.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts index f97a3089a..699e745f5 100644 --- a/src/server/routes/contract/extensions/erc1155/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc1155/read/isApproved.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts index 85e8b8d7b..d00efef77 100644 --- a/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc1155/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import type { NFTInput } from "thirdweb/dist/types/utils/nft/parseNft"; import { generateMintSignature } from "thirdweb/extensions/erc1155"; import { getAccount } from "../../../../../../utils/account"; @@ -12,10 +12,10 @@ import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { + type ercNFTResponseType, nftInputSchema, signature1155InputSchema, signature1155OutputSchema, - type ercNFTResponseType, } from "../../../../../schemas/nft"; import { TokenAmountStringSchema, diff --git a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts index ca225d4e9..f3c3647e2 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts index 54de23b04..8df012d69 100644 --- a/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc1155/read/totalSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts index d8e60a5ec..83de31510 100644 --- a/src/server/routes/contract/extensions/erc1155/write/airdrop.ts +++ b/src/server/routes/contract/extensions/erc1155/write/airdrop.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burn.ts b/src/server/routes/contract/extensions/erc1155/write/burn.ts index 7c1a126df..8cbeee480 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burn.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts index d4dedc504..3e2cb89cf 100644 --- a/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts +++ b/src/server/routes/contract/extensions/erc1155/write/burnBatch.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts index 015284d09..d868ceb35 100644 --- a/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/lazyMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts index f48e90bea..9936c7a93 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintAdditionalSupplyTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts index 1d31b92aa..5c9091f4a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintBatchTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts index 0f72457f8..93f412999 100644 --- a/src/server/routes/contract/extensions/erc1155/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc1155/write/mintTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts index db5a05f60..8e1a04351 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setApprovalForAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts index 702c5ae4e..bf8022a08 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setBatchClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts index cf014efaf..68c51cb3c 100644 --- a/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/setClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts index adc3ed3e8..cf04f0ec3 100644 --- a/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc1155/write/signatureMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { SignedPayload1155 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transfer.ts b/src/server/routes/contract/extensions/erc1155/write/transfer.ts index 4db2395ec..e394ad48a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transfer.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Hex } from "thirdweb"; +import { type Hex, getContract } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../utils/chain"; import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; diff --git a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts index 385857075..a65d89c02 100644 --- a/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc1155/write/transferFrom.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Hex } from "thirdweb"; +import { type Hex, getContract } from "thirdweb"; import { safeTransferFrom } from "thirdweb/extensions/erc1155"; import { getChain } from "../../../../../../utils/chain"; import { getChecksumAddress } from "../../../../../../utils/primitiveTypes"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts index 21bb87a40..c4d96087a 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts index 3c020ff24..38e818e08 100644 --- a/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc1155/write/updateTokenMetadata.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts index 128fd9f86..65e6d7c40 100644 --- a/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/allowanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts index edade3a9f..74e72ac27 100644 --- a/src/server/routes/contract/extensions/erc20/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc20/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/canClaim.ts b/src/server/routes/contract/extensions/erc20/read/canClaim.ts index b38495b17..f1addc3b8 100644 --- a/src/server/routes/contract/extensions/erc20/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc20/read/canClaim.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/get.ts b/src/server/routes/contract/extensions/erc20/read/get.ts index c89338d37..b7cef0718 100644 --- a/src/server/routes/contract/extensions/erc20/read/get.ts +++ b/src/server/routes/contract/extensions/erc20/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts index 8013f7cff..50c068ea4 100644 --- a/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts index 578466a13..faaae74f1 100644 --- a/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts index 832ce01ef..4f0b51578 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts index ad7659b05..6fb5d3ad7 100644 --- a/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc20/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts index 341aabf9d..fb384130a 100644 --- a/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc20/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc20"; import { getAccount } from "../../../../../../utils/account"; import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; @@ -10,9 +10,9 @@ import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; import { thirdwebClient } from "../../../../../../utils/sdk"; import { createCustomError } from "../../../../../middleware/error"; import { + type erc20ResponseType, signature20InputSchema, signature20OutputSchema, - type erc20ResponseType, } from "../../../../../schemas/erc20"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { diff --git a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts index fd3399e97..755e5031a 100644 --- a/src/server/routes/contract/extensions/erc20/read/totalSupply.ts +++ b/src/server/routes/contract/extensions/erc20/read/totalSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc20/write/burn.ts b/src/server/routes/contract/extensions/erc20/write/burn.ts index 54ad7e7ce..5e643fba1 100644 --- a/src/server/routes/contract/extensions/erc20/write/burn.ts +++ b/src/server/routes/contract/extensions/erc20/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts index 956d9f9b3..49a42c98f 100644 --- a/src/server/routes/contract/extensions/erc20/write/burnFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/burnFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts index 2fd89eb9c..1aeda9ace 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintBatchTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/mintTo.ts b/src/server/routes/contract/extensions/erc20/write/mintTo.ts index db3a9968e..b91f7d4e5 100644 --- a/src/server/routes/contract/extensions/erc20/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc20/write/mintTo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts index 80fd18b02..df9c0618e 100644 --- a/src/server/routes/contract/extensions/erc20/write/setAllowance.ts +++ b/src/server/routes/contract/extensions/erc20/write/setAllowance.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts index 57ce2c8c8..f394cee3d 100644 --- a/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/setClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts index 38fd423ff..7244d6be0 100644 --- a/src/server/routes/contract/extensions/erc20/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc20/write/signatureMint.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { SignedPayload20 } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; import type { FastifyInstance } from "fastify"; diff --git a/src/server/routes/contract/extensions/erc20/write/transfer.ts b/src/server/routes/contract/extensions/erc20/write/transfer.ts index 512903a44..c3d3b167e 100644 --- a/src/server/routes/contract/extensions/erc20/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc20/write/transfer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts index ce9ed134c..d01f81295 100644 --- a/src/server/routes/contract/extensions/erc20/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc20/write/transferFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts index 99cd79b48..c4ed61ea1 100644 --- a/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc20/write/updateClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts index 72b9e2aef..267d5f9f4 100644 --- a/src/server/routes/contract/extensions/erc721/read/balanceOf.ts +++ b/src/server/routes/contract/extensions/erc721/read/balanceOf.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/canClaim.ts b/src/server/routes/contract/extensions/erc721/read/canClaim.ts index d80226ccd..c47ae7866 100644 --- a/src/server/routes/contract/extensions/erc721/read/canClaim.ts +++ b/src/server/routes/contract/extensions/erc721/read/canClaim.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/get.ts b/src/server/routes/contract/extensions/erc721/read/get.ts index 11faf6bdc..bdbf7382b 100644 --- a/src/server/routes/contract/extensions/erc721/read/get.ts +++ b/src/server/routes/contract/extensions/erc721/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts index 88164318d..a72065cf8 100644 --- a/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getActiveClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getAll.ts b/src/server/routes/contract/extensions/erc721/read/getAll.ts index 043db6f74..73ea5fc13 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAll.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts index 9158456f5..a8a9af036 100644 --- a/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/read/getAllClaimConditions.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts index c4b069987..c0d78941b 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimIneligibilityReasons.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ClaimEligibility } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts index eee8854cd..ea58d116c 100644 --- a/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts +++ b/src/server/routes/contract/extensions/erc721/read/getClaimerProofs.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/getOwned.ts b/src/server/routes/contract/extensions/erc721/read/getOwned.ts index 847d69c36..f83263f0e 100644 --- a/src/server/routes/contract/extensions/erc721/read/getOwned.ts +++ b/src/server/routes/contract/extensions/erc721/read/getOwned.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/isApproved.ts b/src/server/routes/contract/extensions/erc721/read/isApproved.ts index b8ecc6e8a..a418f7f03 100644 --- a/src/server/routes/contract/extensions/erc721/read/isApproved.ts +++ b/src/server/routes/contract/extensions/erc721/read/isApproved.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts index 0fca0a1f2..88c7124aa 100644 --- a/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts +++ b/src/server/routes/contract/extensions/erc721/read/signatureGenerate.ts @@ -1,7 +1,7 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { getContract, type Address, type Hex } from "thirdweb"; +import { type Address, type Hex, getContract } from "thirdweb"; import { generateMintSignature } from "thirdweb/extensions/erc721"; import { getAccount } from "../../../../../../utils/account"; import { getContract as getContractV4 } from "../../../../../../utils/cache/getContract"; @@ -10,9 +10,9 @@ import { maybeBigInt } from "../../../../../../utils/primitiveTypes"; import { thirdwebClient } from "../../../../../../utils/sdk"; import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { + type ercNFTResponseType, signature721InputSchema, signature721OutputSchema, - type ercNFTResponseType, } from "../../../../../schemas/nft"; import { signature721InputSchemaV5, diff --git a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts index 0636354a2..74546b357 100644 --- a/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts +++ b/src/server/routes/contract/extensions/erc721/read/signaturePrepare.ts @@ -1,14 +1,14 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { createHash, getRandomValues } from "node:crypto"; +import { type Static, Type } from "@sinclair/typebox"; import { MintRequest721 } from "@thirdweb-dev/sdk"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { createHash, getRandomValues } from "node:crypto"; import { + type Hex, ZERO_ADDRESS, getContract, isHex, uint8ArrayToHex, - type Hex, } from "thirdweb"; import { primarySaleRecipient as getDefaultPrimarySaleRecipient, diff --git a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts index 94d6d91bb..b07aad2a8 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalClaimedSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/totalCount.ts b/src/server/routes/contract/extensions/erc721/read/totalCount.ts index 7599028de..457d38bd6 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalCount.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts index 5eb39d2c7..e7cb63fcc 100644 --- a/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts +++ b/src/server/routes/contract/extensions/erc721/read/totalUnclaimedSupply.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/burn.ts b/src/server/routes/contract/extensions/erc721/write/burn.ts index f0591eafa..18c8e88a9 100644 --- a/src/server/routes/contract/extensions/erc721/write/burn.ts +++ b/src/server/routes/contract/extensions/erc721/write/burn.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts index c553454f8..8624af82b 100644 --- a/src/server/routes/contract/extensions/erc721/write/lazyMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/lazyMint.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts index 79c14a801..05851d19c 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintBatchTo.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/mintTo.ts b/src/server/routes/contract/extensions/erc721/write/mintTo.ts index 8099991eb..dc3458937 100644 --- a/src/server/routes/contract/extensions/erc721/write/mintTo.ts +++ b/src/server/routes/contract/extensions/erc721/write/mintTo.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts index b521adf4d..ced42e7a4 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForAll.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts index 8b3f8e7b3..249cc8855 100644 --- a/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts +++ b/src/server/routes/contract/extensions/erc721/write/setApprovalForToken.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts index 8e67bdaae..41be52b5a 100644 --- a/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/setClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, @@ -78,8 +78,8 @@ export async function erc721SetClaimConditions(fastify: FastifyInstance) { return { ...item, startTime: item.startTime - ? isUnixEpochTimestamp(parseInt(item.startTime.toString())) - ? new Date(parseInt(item.startTime.toString()) * 1000) + ? isUnixEpochTimestamp(Number.parseInt(item.startTime.toString())) + ? new Date(Number.parseInt(item.startTime.toString()) * 1000) : new Date(item.startTime) : undefined, }; diff --git a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts index 2a85bb169..c79dcf166 100644 --- a/src/server/routes/contract/extensions/erc721/write/signatureMint.ts +++ b/src/server/routes/contract/extensions/erc721/write/signatureMint.ts @@ -1,16 +1,16 @@ -import { Static, Type } from "@sinclair/typebox"; -import { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; +import { type Static, Type } from "@sinclair/typebox"; +import type { SignedPayload721WithQuantitySignature } from "@thirdweb-dev/sdk"; import { BigNumber } from "ethers"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address, Hex } from "thirdweb"; +import type { Address, Hex } from "thirdweb"; import { mintWithSignature } from "thirdweb/extensions/erc721"; import { resolvePromisedValue } from "thirdweb/utils"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; import { getContractV5 } from "../../../../../../utils/cache/getContractv5"; import { insertTransaction } from "../../../../../../utils/transaction/insertTransaction"; -import { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; +import type { thirdwebSdkVersionSchema } from "../../../../../schemas/httpHeaders/thirdwebSdkVersion"; import { signature721OutputSchema } from "../../../../../schemas/nft"; import { signature721OutputSchemaV5 } from "../../../../../schemas/nft/v5"; import { diff --git a/src/server/routes/contract/extensions/erc721/write/transfer.ts b/src/server/routes/contract/extensions/erc721/write/transfer.ts index 60f00d5bb..3bfac65c9 100644 --- a/src/server/routes/contract/extensions/erc721/write/transfer.ts +++ b/src/server/routes/contract/extensions/erc721/write/transfer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts index 404086221..2f7e9c029 100644 --- a/src/server/routes/contract/extensions/erc721/write/transferFrom.ts +++ b/src/server/routes/contract/extensions/erc721/write/transferFrom.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; diff --git a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts index 8b8faaa49..004d0e9f5 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateClaimConditions.ts @@ -1,11 +1,11 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; import { claimConditionInputSchema, - sanitizedClaimConditionInputSchema, + type sanitizedClaimConditionInputSchema, } from "../../../../../schemas/claimConditions"; import { contractParamSchema, @@ -80,10 +80,11 @@ export async function erc721UpdateClaimConditions(fastify: FastifyInstance) { ...claimConditionInput, startTime: claimConditionInput.startTime ? isUnixEpochTimestamp( - parseInt(claimConditionInput.startTime.toString()), + Number.parseInt(claimConditionInput.startTime.toString()), ) ? new Date( - parseInt(claimConditionInput.startTime.toString()) * 1000, + Number.parseInt(claimConditionInput.startTime.toString()) * + 1000, ) : new Date(claimConditionInput.startTime) : undefined, diff --git a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts index 48ba8e64f..8bcc17300 100644 --- a/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts +++ b/src/server/routes/contract/extensions/erc721/write/updateTokenMetadata.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts index 6b3182668..aa3110e0e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts index c3dee400c..c3a4254eb 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts index 0eec709b4..ba1bdeabc 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts index 05ff2336a..97dc4f741 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isBuyerApprovedForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts index 02b353a97..095adc8e0 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/read/isCurrencyApprovedForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts index c9b697a25..a13b6eec8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/approveBuyerForReservedListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts index cd042ce0a..8f4d28b30 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/buyFromListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts index 17222f50a..01aeb9990 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/cancelListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts index 74c7f63d8..d6e9037bf 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/createListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts index 7e45a7ffb..5a90b2644 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeBuyerApprovalForReservedListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts index f57dc6551..7b63e1d2f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/revokeCurrencyApprovalForListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -18,7 +18,8 @@ import { getChainIdFromChain } from "../../../../../../utils/chain"; const requestSchema = marketplaceV3ContractParamSchema; const requestBodySchema = Type.Object({ listingId: Type.String({ - description: "The ID of the listing you want to revoke currency approval for.", + description: + "The ID of the listing you want to revoke currency approval for.", }), currencyContractAddress: { ...AddressSchema, diff --git a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts index 63db76bd4..51af8e79a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/directListings/write/updateListing.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts index 674368c5b..0d4fa5c5a 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts index d99b58077..5fdf64bdd 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts index c8aeea372..e951ef6d8 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts index 5f3dfc767..460165e3c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getBidBufferBps.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts index 8f1f7499f..4ca06dde7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getMinimumNextBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts index e44013962..b33daeaf5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts index 6781ca0d1..ef253f402 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinner.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts index 5963326cc..3ee8b9b9b 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/getWinningBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts index 08c3b6e20..1caeb0378 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/read/isWinningBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts index e383a5efc..7f6411e2e 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/buyoutAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -69,9 +69,8 @@ export async function englishAuctionsBuyoutAuction(fastify: FastifyInstance) { accountAddress, }); - const tx = await contract.englishAuctions.buyoutAuction.prepare( - listingId, - ); + const tx = + await contract.englishAuctions.buyoutAuction.prepare(listingId); const queueId = await queueTx({ tx, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts index 6cff7e0fb..fe1234ce7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/cancelAuction.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -70,9 +70,8 @@ export async function englishAuctionsCancelAuction(fastify: FastifyInstance) { accountAddress, }); - const tx = await contract.englishAuctions.cancelAuction.prepare( - listingId, - ); + const tx = + await contract.englishAuctions.cancelAuction.prepare(listingId); const queueId = await queueTx({ tx, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts index 9b94e1c59..c3bdd88ec 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForBidder.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -74,9 +74,8 @@ meaning the seller receives the payment from the highest bid.`, accountAddress, }); - const tx = await contract.englishAuctions.closeAuctionForBidder.prepare( - listingId, - ); + const tx = + await contract.englishAuctions.closeAuctionForBidder.prepare(listingId); const queueId = await queueTx({ tx, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts index 13ac42e9b..ff4c76ac2 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/closeAuctionForSeller.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; @@ -73,9 +73,8 @@ You must also call closeAuctionForBidder to execute the sale for the buyer, mean accountAddress, }); - const tx = await contract.englishAuctions.closeAuctionForSeller.prepare( - listingId, - ); + const tx = + await contract.englishAuctions.closeAuctionForSeller.prepare(listingId); const queueId = await queueTx({ tx, diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts index c7067adc9..a8a4fb4a9 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/executeSale.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts index f21952310..b67419a7c 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/englishAuctions/write/makeBid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/index.ts b/src/server/routes/contract/extensions/marketplaceV3/index.ts index aa637a707..e2b8638d3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/index.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/index.ts @@ -1,4 +1,4 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { directListingsGetAll } from "./directListings/read/getAll"; import { directListingsGetAllValid } from "./directListings/read/getAllValid"; import { directListingsGetListing } from "./directListings/read/getListing"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts index 6497ed6d5..796b0b59f 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts index e913d2911..f3bd6e5c5 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getAllValid.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts index 4eb1991cb..5049048fe 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts index 86f476220..6bcaae250 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/read/getTotalCount.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts index f1614a731..0b40594c3 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/acceptOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts index aa205c3ac..0390b51a7 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/cancelOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts index 3cc4deb43..9e7e1dfb1 100644 --- a/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts +++ b/src/server/routes/contract/extensions/marketplaceV3/offers/write/makeOffer.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/metadata/abi.ts b/src/server/routes/contract/metadata/abi.ts index 738ca9cf5..ee7bf48b6 100644 --- a/src/server/routes/contract/metadata/abi.ts +++ b/src/server/routes/contract/metadata/abi.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/metadata/events.ts b/src/server/routes/contract/metadata/events.ts index 2237adc74..bd2845e94 100644 --- a/src/server/routes/contract/metadata/events.ts +++ b/src/server/routes/contract/metadata/events.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/metadata/extensions.ts b/src/server/routes/contract/metadata/extensions.ts index 847e435a5..660d645f5 100644 --- a/src/server/routes/contract/metadata/extensions.ts +++ b/src/server/routes/contract/metadata/extensions.ts @@ -1,6 +1,6 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { getAllDetectedExtensionNames } from "@thirdweb-dev/sdk"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; import { diff --git a/src/server/routes/contract/metadata/functions.ts b/src/server/routes/contract/metadata/functions.ts index c9e83f33e..9fb7a9bda 100644 --- a/src/server/routes/contract/metadata/functions.ts +++ b/src/server/routes/contract/metadata/functions.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../utils/cache/getContract"; import { abiFunctionSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/contract/roles/read/get.ts b/src/server/routes/contract/roles/read/get.ts index 6fc8dfb75..89465e1c0 100644 --- a/src/server/routes/contract/roles/read/get.ts +++ b/src/server/routes/contract/roles/read/get.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/roles/read/getAll.ts b/src/server/routes/contract/roles/read/getAll.ts index b29221593..87a217d4c 100644 --- a/src/server/routes/contract/roles/read/getAll.ts +++ b/src/server/routes/contract/roles/read/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/roles/write/grant.ts b/src/server/routes/contract/roles/write/grant.ts index c82ad2269..dd1f31a75 100644 --- a/src/server/routes/contract/roles/write/grant.ts +++ b/src/server/routes/contract/roles/write/grant.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/roles/write/revoke.ts b/src/server/routes/contract/roles/write/revoke.ts index 4b1173132..2f47ceb30 100644 --- a/src/server/routes/contract/roles/write/revoke.ts +++ b/src/server/routes/contract/roles/write/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; diff --git a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts index c6282d135..cad04a4d2 100644 --- a/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getDefaultRoyaltyInfo.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; import { royaltySchema } from "../../../../schemas/contract"; diff --git a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts index fec257ad5..2e72836ed 100644 --- a/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/read/getTokenRoyaltyInfo.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts index acfb5c8fd..0d4935b16 100644 --- a/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setDefaultRoyaltyInfo.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts index 4d12d72b0..d4ff6f424 100644 --- a/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts +++ b/src/server/routes/contract/royalties/write/setTokenRoyaltyInfo.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { queueTx } from "../../../../../db/transactions/queueTx"; import { getContract } from "../../../../../utils/cache/getContract"; diff --git a/src/server/routes/contract/subscriptions/addContractSubscription.ts b/src/server/routes/contract/subscriptions/addContractSubscription.ts index 3bbdaa0b3..0c6b84a71 100644 --- a/src/server/routes/contract/subscriptions/addContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/addContractSubscription.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContract } from "thirdweb"; import { isContractDeployed } from "thirdweb/utils"; diff --git a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts index e708cd8b2..8f3ebbeff 100644 --- a/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts +++ b/src/server/routes/contract/subscriptions/getContractIndexedBlockRange.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getContractEventLogsIndexedBlockRange } from "../../../../db/contractEventLogs/getContractEventLogs"; diff --git a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts index 81fb1ac2d..e02fb0891 100644 --- a/src/server/routes/contract/subscriptions/getContractSubscriptions.ts +++ b/src/server/routes/contract/subscriptions/getContractSubscriptions.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAllContractSubscriptions } from "../../../../db/contractSubscriptions/getContractSubscriptions"; import { diff --git a/src/server/routes/contract/subscriptions/getLatestBlock.ts b/src/server/routes/contract/subscriptions/getLatestBlock.ts index 49f81e09c..5155aed0d 100644 --- a/src/server/routes/contract/subscriptions/getLatestBlock.ts +++ b/src/server/routes/contract/subscriptions/getLatestBlock.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getLastIndexedBlock } from "../../../../db/chainIndexers/getChainIndexer"; diff --git a/src/server/routes/contract/subscriptions/removeContractSubscription.ts b/src/server/routes/contract/subscriptions/removeContractSubscription.ts index 3b0711c75..f467ac506 100644 --- a/src/server/routes/contract/subscriptions/removeContractSubscription.ts +++ b/src/server/routes/contract/subscriptions/removeContractSubscription.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { deleteContractSubscription } from "../../../../db/contractSubscriptions/deleteContractSubscription"; import { deleteWebhook } from "../../../../db/webhooks/revokeWebhook"; diff --git a/src/server/routes/contract/transactions/getTransactionReceipts.ts b/src/server/routes/contract/transactions/getTransactionReceipts.ts index 87b90a530..e0baa6fd0 100644 --- a/src/server/routes/contract/transactions/getTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/getTransactionReceipts.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isContractSubscribed } from "../../../../db/contractSubscriptions/getContractSubscriptions"; import { getContractTransactionReceiptsByBlock } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; diff --git a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts index 2c76ec6da..3357d2825 100644 --- a/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts +++ b/src/server/routes/contract/transactions/getTransactionReceiptsByTimestamp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getTransactionReceiptsByBlockTimestamp } from "../../../../db/contractTransactionReceipts/getContractTransactionReceipts"; diff --git a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts index 0d13b9b1d..68f558af3 100644 --- a/src/server/routes/contract/transactions/paginateTransactionReceipts.ts +++ b/src/server/routes/contract/transactions/paginateTransactionReceipts.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getConfiguration } from "../../../../db/configuration/getConfiguration"; diff --git a/src/server/routes/contract/write/write.ts b/src/server/routes/contract/write/write.ts index b47049786..5e5a0667b 100644 --- a/src/server/routes/contract/write/write.ts +++ b/src/server/routes/contract/write/write.ts @@ -1,8 +1,8 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prepareContractCall, resolveMethod } from "thirdweb"; -import { parseAbiParams, type AbiFunction } from "thirdweb/utils"; +import { type AbiFunction, parseAbiParams } from "thirdweb/utils"; import { getContractV5 } from "../../../../utils/cache/getContractv5"; import { prettifyError } from "../../../../utils/error"; import { queueTransaction } from "../../../../utils/transaction/queueTransation"; diff --git a/src/server/routes/deploy/contractTypes.ts b/src/server/routes/deploy/contractTypes.ts index 9340bbb23..57ba64eaa 100644 --- a/src/server/routes/deploy/contractTypes.ts +++ b/src/server/routes/deploy/contractTypes.ts @@ -1,6 +1,6 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { PREBUILT_CONTRACTS_MAP } from "@thirdweb-dev/sdk"; -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/deploy/index.ts b/src/server/routes/deploy/index.ts index 15301f23b..1cde592c2 100644 --- a/src/server/routes/deploy/index.ts +++ b/src/server/routes/deploy/index.ts @@ -1,4 +1,6 @@ -import { FastifyInstance } from "fastify"; +import type { FastifyInstance } from "fastify"; +import { contractTypes } from "./contractTypes"; +import { deployPrebuilt } from "./prebuilt"; import { deployPrebuiltEdition } from "./prebuilts/edition"; import { deployPrebuiltEditionDrop } from "./prebuilts/editionDrop"; import { deployPrebuiltMarketplaceV3 } from "./prebuilts/marketplaceV3"; @@ -11,9 +13,7 @@ import { deployPrebuiltSplit } from "./prebuilts/split"; import { deployPrebuiltToken } from "./prebuilts/token"; import { deployPrebuiltTokenDrop } from "./prebuilts/tokenDrop"; import { deployPrebuiltVote } from "./prebuilts/vote"; -import { deployPrebuilt } from "./prebuilt"; import { deployPublished } from "./published"; -import { contractTypes } from "./contractTypes"; export const prebuiltsRoutes = async (fastify: FastifyInstance) => { await fastify.register(deployPrebuiltEdition); diff --git a/src/server/routes/deploy/prebuilt.ts b/src/server/routes/deploy/prebuilt.ts index 38815a755..c7b709e13 100644 --- a/src/server/routes/deploy/prebuilt.ts +++ b/src/server/routes/deploy/prebuilt.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../db/transactions/queueTx"; import { getSdk } from "../../../utils/cache/getSdk"; import { AddressSchema } from "../../schemas/address"; diff --git a/src/server/routes/deploy/prebuilts/edition.ts b/src/server/routes/deploy/prebuilts/edition.ts index 15b99b65b..047bb20e4 100644 --- a/src/server/routes/deploy/prebuilts/edition.ts +++ b/src/server/routes/deploy/prebuilts/edition.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/editionDrop.ts b/src/server/routes/deploy/prebuilts/editionDrop.ts index 9e2c11bbd..ba4ca0eaa 100644 --- a/src/server/routes/deploy/prebuilts/editionDrop.ts +++ b/src/server/routes/deploy/prebuilts/editionDrop.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/marketplaceV3.ts b/src/server/routes/deploy/prebuilts/marketplaceV3.ts index 8635946c9..b2a2b7512 100644 --- a/src/server/routes/deploy/prebuilts/marketplaceV3.ts +++ b/src/server/routes/deploy/prebuilts/marketplaceV3.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/multiwrap.ts b/src/server/routes/deploy/prebuilts/multiwrap.ts index 95df0dd8a..0e789d8dc 100644 --- a/src/server/routes/deploy/prebuilts/multiwrap.ts +++ b/src/server/routes/deploy/prebuilts/multiwrap.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/nftCollection.ts b/src/server/routes/deploy/prebuilts/nftCollection.ts index 002f6e629..1c0ff6ebb 100644 --- a/src/server/routes/deploy/prebuilts/nftCollection.ts +++ b/src/server/routes/deploy/prebuilts/nftCollection.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/nftDrop.ts b/src/server/routes/deploy/prebuilts/nftDrop.ts index 740df4fe8..4acc0b7de 100644 --- a/src/server/routes/deploy/prebuilts/nftDrop.ts +++ b/src/server/routes/deploy/prebuilts/nftDrop.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/pack.ts b/src/server/routes/deploy/prebuilts/pack.ts index 1c7c0e44f..1422e754a 100644 --- a/src/server/routes/deploy/prebuilts/pack.ts +++ b/src/server/routes/deploy/prebuilts/pack.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/signatureDrop.ts b/src/server/routes/deploy/prebuilts/signatureDrop.ts index f5f54d385..1b39cddcf 100644 --- a/src/server/routes/deploy/prebuilts/signatureDrop.ts +++ b/src/server/routes/deploy/prebuilts/signatureDrop.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/split.ts b/src/server/routes/deploy/prebuilts/split.ts index 8b9435a3e..134c1aae4 100644 --- a/src/server/routes/deploy/prebuilts/split.ts +++ b/src/server/routes/deploy/prebuilts/split.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/token.ts b/src/server/routes/deploy/prebuilts/token.ts index 13980f951..03b18c47c 100644 --- a/src/server/routes/deploy/prebuilts/token.ts +++ b/src/server/routes/deploy/prebuilts/token.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/tokenDrop.ts b/src/server/routes/deploy/prebuilts/tokenDrop.ts index 6129ecfa7..fcc68e0aa 100644 --- a/src/server/routes/deploy/prebuilts/tokenDrop.ts +++ b/src/server/routes/deploy/prebuilts/tokenDrop.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/prebuilts/vote.ts b/src/server/routes/deploy/prebuilts/vote.ts index 2073993cd..7c1af948a 100644 --- a/src/server/routes/deploy/prebuilts/vote.ts +++ b/src/server/routes/deploy/prebuilts/vote.ts @@ -1,7 +1,7 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { queueTx } from "../../../../db/transactions/queueTx"; import { getSdk } from "../../../../utils/cache/getSdk"; import { contractDeployBasicSchema } from "../../../schemas/contract"; diff --git a/src/server/routes/deploy/published.ts b/src/server/routes/deploy/published.ts index 96fd698bb..05c26ef3f 100644 --- a/src/server/routes/deploy/published.ts +++ b/src/server/routes/deploy/published.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isAddress } from "thirdweb"; import { queueTx } from "../../../db/transactions/queueTx"; diff --git a/src/server/routes/home.ts b/src/server/routes/home.ts index 212126800..dfa9d7386 100644 --- a/src/server/routes/home.ts +++ b/src/server/routes/home.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; diff --git a/src/server/routes/index.ts b/src/server/routes/index.ts index 9daf6b452..eb6215ee4 100644 --- a/src/server/routes/index.ts +++ b/src/server/routes/index.ts @@ -58,9 +58,9 @@ import { getEvents } from "./contract/events/getEvents"; import { pageEventLogs } from "./contract/events/paginateEventLogs"; import { accountRoutes } from "./contract/extensions/account"; import { accountFactoryRoutes } from "./contract/extensions/accountFactory"; -import { erc1155Routes } from "./contract/extensions/erc1155"; import { erc20Routes } from "./contract/extensions/erc20"; import { erc721Routes } from "./contract/extensions/erc721"; +import { erc1155Routes } from "./contract/extensions/erc1155"; import { marketplaceV3Routes } from "./contract/extensions/marketplaceV3/index"; import { getABI } from "./contract/metadata/abi"; import { extractEvents } from "./contract/metadata/events"; diff --git a/src/server/routes/relayer/create.ts b/src/server/routes/relayer/create.ts index 1cda9f9b1..acb6d6b2e 100644 --- a/src/server/routes/relayer/create.ts +++ b/src/server/routes/relayer/create.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/relayer/index.ts b/src/server/routes/relayer/index.ts index 6c63752b4..471a65ad8 100644 --- a/src/server/routes/relayer/index.ts +++ b/src/server/routes/relayer/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { ethers, utils } from "ethers"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; @@ -60,7 +60,6 @@ const requestBodySchema = Type.Union([ }), ]); - // eslint-disable-next-line @typescript-eslint/no-unused-vars const responseBodySchema = Type.Composite([ Type.Object({ diff --git a/src/server/routes/relayer/revoke.ts b/src/server/routes/relayer/revoke.ts index c69b8515d..8c57ed696 100644 --- a/src/server/routes/relayer/revoke.ts +++ b/src/server/routes/relayer/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/relayer/update.ts b/src/server/routes/relayer/update.ts index aca004e0f..fbb55a684 100644 --- a/src/server/routes/relayer/update.ts +++ b/src/server/routes/relayer/update.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { prisma } from "../../../db/client"; diff --git a/src/server/routes/system/health.ts b/src/server/routes/system/health.ts index a21cea5ef..e0eb9deb9 100644 --- a/src/server/routes/system/health.ts +++ b/src/server/routes/system/health.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { isDatabaseReachable } from "../../../db/client"; diff --git a/src/server/routes/system/queue.ts b/src/server/routes/system/queue.ts index 92763139e..4ac875c83 100644 --- a/src/server/routes/system/queue.ts +++ b/src/server/routes/system/queue.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/blockchain/getLogs.ts b/src/server/routes/transaction/blockchain/getLogs.ts index f3a68da2e..5a4fc8008 100644 --- a/src/server/routes/transaction/blockchain/getLogs.ts +++ b/src/server/routes/transaction/blockchain/getLogs.ts @@ -1,15 +1,15 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { AbiEvent } from "abitype"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import superjson from "superjson"; import { + type Hex, eth_getTransactionReceipt, getContract, getRpcClient, parseEventLogs, prepareEvent, - type Hex, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { TransactionDB } from "../../../../db/transactions/db"; diff --git a/src/server/routes/transaction/blockchain/getReceipt.ts b/src/server/routes/transaction/blockchain/getReceipt.ts index 13cfd7786..570f21f69 100644 --- a/src/server/routes/transaction/blockchain/getReceipt.ts +++ b/src/server/routes/transaction/blockchain/getReceipt.ts @@ -1,11 +1,11 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { + type Hex, eth_getTransactionReceipt, getRpcClient, toHex, - type Hex, } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { TransactionReceipt } from "viem"; diff --git a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts index c04fe6561..3cae5bc43 100644 --- a/src/server/routes/transaction/blockchain/getUserOpReceipt.ts +++ b/src/server/routes/transaction/blockchain/getUserOpReceipt.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { env } from "../../../../utils/env"; diff --git a/src/server/routes/transaction/blockchain/sendSignedTx.ts b/src/server/routes/transaction/blockchain/sendSignedTx.ts index 5fc53a188..56f3ce58c 100644 --- a/src/server/routes/transaction/blockchain/sendSignedTx.ts +++ b/src/server/routes/transaction/blockchain/sendSignedTx.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_sendRawTransaction, getRpcClient, isHex } from "thirdweb"; diff --git a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts index 880a050bd..b2e143215 100644 --- a/src/server/routes/transaction/blockchain/sendSignedUserOp.ts +++ b/src/server/routes/transaction/blockchain/sendSignedUserOp.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { Value } from "@sinclair/typebox/value"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; @@ -9,7 +9,6 @@ import { standardResponseSchema } from "../../../schemas/sharedApiSchemas"; import { walletChainParamSchema } from "../../../schemas/wallet"; import { getChainIdFromChain } from "../../../utils/chain"; - // eslint-disable-next-line @typescript-eslint/no-unused-vars const UserOp = Type.Object({ sender: Type.String(), diff --git a/src/server/routes/transaction/cancel.ts b/src/server/routes/transaction/cancel.ts index 743d783b0..f521f2250 100644 --- a/src/server/routes/transaction/cancel.ts +++ b/src/server/routes/transaction/cancel.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/getAll.ts b/src/server/routes/transaction/getAll.ts index d8c023167..43ea0eb9b 100644 --- a/src/server/routes/transaction/getAll.ts +++ b/src/server/routes/transaction/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/getAllDeployedContracts.ts b/src/server/routes/transaction/getAllDeployedContracts.ts index 4bcd88a61..dedf69ce2 100644 --- a/src/server/routes/transaction/getAllDeployedContracts.ts +++ b/src/server/routes/transaction/getAllDeployedContracts.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/retry-failed.ts b/src/server/routes/transaction/retry-failed.ts index 0227f2ca3..67f78d5bf 100644 --- a/src/server/routes/transaction/retry-failed.ts +++ b/src/server/routes/transaction/retry-failed.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { eth_getTransactionReceipt, getRpcClient } from "thirdweb"; import { TransactionDB } from "../../../db/transactions/db"; diff --git a/src/server/routes/transaction/retry.ts b/src/server/routes/transaction/retry.ts index c8716e2dd..d968bb879 100644 --- a/src/server/routes/transaction/retry.ts +++ b/src/server/routes/transaction/retry.ts @@ -1,9 +1,9 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; import { maybeBigInt } from "../../../utils/primitiveTypes"; -import { SentTransaction } from "../../../utils/transaction/types"; +import type { SentTransaction } from "../../../utils/transaction/types"; import { SendTransactionQueue } from "../../../worker/queues/sendTransactionQueue"; import { createCustomError } from "../../middleware/error"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/transaction/status.ts b/src/server/routes/transaction/status.ts index 877d26122..63a57b55b 100644 --- a/src/server/routes/transaction/status.ts +++ b/src/server/routes/transaction/status.ts @@ -1,6 +1,6 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import type { SocketStream } from "@fastify/websocket"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../../db/transactions/db"; import { logger } from "../../../utils/logger"; diff --git a/src/server/routes/transaction/syncRetry.ts b/src/server/routes/transaction/syncRetry.ts index 7185c2802..b1288b5e2 100644 --- a/src/server/routes/transaction/syncRetry.ts +++ b/src/server/routes/transaction/syncRetry.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { toSerializableTransaction } from "thirdweb"; diff --git a/src/server/routes/webhooks/create.ts b/src/server/routes/webhooks/create.ts index a1cc44b32..0cf53e97b 100644 --- a/src/server/routes/webhooks/create.ts +++ b/src/server/routes/webhooks/create.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { insertWebhook } from "../../../db/webhooks/createWebhook"; import { WebhooksEventTypes } from "../../../schema/webhooks"; diff --git a/src/server/routes/webhooks/events.ts b/src/server/routes/webhooks/events.ts index 1e621e771..afb43f390 100644 --- a/src/server/routes/webhooks/events.ts +++ b/src/server/routes/webhooks/events.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { FastifyInstance } from "fastify"; +import { type Static, Type } from "@sinclair/typebox"; +import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { WebhooksEventTypes } from "../../../schema/webhooks"; import { standardResponseSchema } from "../../schemas/sharedApiSchemas"; diff --git a/src/server/routes/webhooks/getAll.ts b/src/server/routes/webhooks/getAll.ts index 9e22617f4..a73cb0f19 100644 --- a/src/server/routes/webhooks/getAll.ts +++ b/src/server/routes/webhooks/getAll.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getAllWebhooks } from "../../../db/webhooks/getAllWebhooks"; diff --git a/src/server/routes/webhooks/revoke.ts b/src/server/routes/webhooks/revoke.ts index d6725c6ba..c06d86eab 100644 --- a/src/server/routes/webhooks/revoke.ts +++ b/src/server/routes/webhooks/revoke.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWebhook } from "../../../db/webhooks/getWebhook"; diff --git a/src/server/routes/webhooks/test.ts b/src/server/routes/webhooks/test.ts index 68bc341c6..196939b66 100644 --- a/src/server/routes/webhooks/test.ts +++ b/src/server/routes/webhooks/test.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { FastifyInstance } from "fastify"; import { StatusCodes } from "http-status-codes"; import { getWebhook } from "../../../db/webhooks/getWebhook"; diff --git a/src/server/schemas/contract/index.ts b/src/server/schemas/contract/index.ts index ed27ac8e6..89e3739f4 100644 --- a/src/server/schemas/contract/index.ts +++ b/src/server/schemas/contract/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "../address"; import type { contractSchemaTypes } from "../sharedApiSchemas"; diff --git a/src/server/schemas/contractSubscription.ts b/src/server/schemas/contractSubscription.ts index fc7939f72..75aad7485 100644 --- a/src/server/schemas/contractSubscription.ts +++ b/src/server/schemas/contractSubscription.ts @@ -1,5 +1,5 @@ import type { ContractSubscriptions, Webhooks } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "./address"; import { WebhookSchema, toWebhookSchema } from "./webhook"; diff --git a/src/server/schemas/erc20/index.ts b/src/server/schemas/erc20/index.ts index 76a2a98db..1b8df828d 100644 --- a/src/server/schemas/erc20/index.ts +++ b/src/server/schemas/erc20/index.ts @@ -1,4 +1,4 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema } from "../address"; export const erc20MetadataSchema = Type.Object({ diff --git a/src/server/schemas/eventLog.ts b/src/server/schemas/eventLog.ts index bf3f6a9d8..e51fe633f 100644 --- a/src/server/schemas/eventLog.ts +++ b/src/server/schemas/eventLog.ts @@ -1,5 +1,5 @@ import type { ContractEventLogs } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema, TransactionHashSchema } from "./address"; export const eventLogSchema = Type.Object({ diff --git a/src/server/schemas/keypairs.ts b/src/server/schemas/keypairs.ts index 31a3a7bc7..5e0a85bc3 100644 --- a/src/server/schemas/keypairs.ts +++ b/src/server/schemas/keypairs.ts @@ -1,5 +1,5 @@ -import { Keypairs } from "@prisma/client"; -import { Static, Type } from "@sinclair/typebox"; +import type { Keypairs } from "@prisma/client"; +import { type Static, Type } from "@sinclair/typebox"; // https://github.com/auth0/node-jsonwebtoken#algorithms-supported const _supportedAlgorithms = [ diff --git a/src/server/schemas/nft/index.ts b/src/server/schemas/nft/index.ts index 31ae133b7..f1d646bce 100644 --- a/src/server/schemas/nft/index.ts +++ b/src/server/schemas/nft/index.ts @@ -1,5 +1,5 @@ -import { Static, Type } from "@sinclair/typebox"; -import { BigNumber } from "ethers"; +import { type Static, Type } from "@sinclair/typebox"; +import type { BigNumber } from "ethers"; import { AddressSchema } from "../address"; import { NumberStringSchema } from "../number"; diff --git a/src/server/schemas/sharedApiSchemas.ts b/src/server/schemas/sharedApiSchemas.ts index 61053cb75..0859a940c 100644 --- a/src/server/schemas/sharedApiSchemas.ts +++ b/src/server/schemas/sharedApiSchemas.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { PREBUILT_CONTRACTS_MAP } from "@thirdweb-dev/sdk"; import type { RouteGenericInterface } from "fastify"; import type { FastifySchema } from "fastify/types/schema"; diff --git a/src/server/schemas/transaction/index.ts b/src/server/schemas/transaction/index.ts index 0db9dae34..ccd484127 100644 --- a/src/server/schemas/transaction/index.ts +++ b/src/server/schemas/transaction/index.ts @@ -1,4 +1,4 @@ -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import type { Hex } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { AnyTransaction } from "../../../utils/transaction/types"; diff --git a/src/server/schemas/transactionReceipt.ts b/src/server/schemas/transactionReceipt.ts index 5d10a8e16..72d3e3186 100644 --- a/src/server/schemas/transactionReceipt.ts +++ b/src/server/schemas/transactionReceipt.ts @@ -1,5 +1,5 @@ import type { ContractTransactionReceipts } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { AddressSchema, TransactionHashSchema } from "./address"; export const transactionReceiptSchema = Type.Object({ diff --git a/src/server/schemas/wallet/index.ts b/src/server/schemas/wallet/index.ts index 4f5a87c9e..201a881e3 100644 --- a/src/server/schemas/wallet/index.ts +++ b/src/server/schemas/wallet/index.ts @@ -1,5 +1,5 @@ import { Type } from "@sinclair/typebox"; -import { getAddress, type Address } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { env } from "../../../utils/env"; import { badAddressError } from "../../middleware/error"; import { AddressSchema } from "../address"; diff --git a/src/server/schemas/webhook.ts b/src/server/schemas/webhook.ts index 3e7fbc36d..1fe125a8d 100644 --- a/src/server/schemas/webhook.ts +++ b/src/server/schemas/webhook.ts @@ -1,5 +1,5 @@ import type { Webhooks } from "@prisma/client"; -import { Type, type Static } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; export const WebhookSchema = Type.Object({ id: Type.Integer(), diff --git a/src/server/schemas/websocket/index.ts b/src/server/schemas/websocket/index.ts index a1168fc07..77b68f082 100644 --- a/src/server/schemas/websocket/index.ts +++ b/src/server/schemas/websocket/index.ts @@ -1,5 +1,5 @@ // types.ts -import { WebSocket } from "ws"; +import type { WebSocket } from "ws"; export interface UserSubscription { socket: WebSocket; diff --git a/src/server/utils/chain.ts b/src/server/utils/chain.ts index 38ac60ae1..c2a3c9b14 100644 --- a/src/server/utils/chain.ts +++ b/src/server/utils/chain.ts @@ -17,7 +17,9 @@ export const getChainIdFromChain = async (input: string): Promise => { if (chainV4.status !== "deprecated") { return chainV4.chainId; } - } catch { /* empty */ } + } catch { + /* empty */ + } throw badChainError(input); }; diff --git a/src/server/utils/marketplaceV3.ts b/src/server/utils/marketplaceV3.ts index b880c9e4c..19a61a445 100644 --- a/src/server/utils/marketplaceV3.ts +++ b/src/server/utils/marketplaceV3.ts @@ -1,4 +1,8 @@ -import { DirectListingV3, EnglishAuction, OfferV3 } from "@thirdweb-dev/sdk"; +import type { + DirectListingV3, + EnglishAuction, + OfferV3, +} from "@thirdweb-dev/sdk"; export const formatDirectListingV3Result = (listing: DirectListingV3) => { return { diff --git a/src/server/utils/openapi.ts b/src/server/utils/openapi.ts index 6b6e1b06f..d3906a806 100644 --- a/src/server/utils/openapi.ts +++ b/src/server/utils/openapi.ts @@ -1,5 +1,5 @@ -import { FastifyInstance } from "fastify"; import fs from "fs"; +import type { FastifyInstance } from "fastify"; export const writeOpenApiToFile = (server: FastifyInstance) => { try { diff --git a/src/server/utils/storage/localStorage.ts b/src/server/utils/storage/localStorage.ts index 8c5557faa..c8ae69367 100644 --- a/src/server/utils/storage/localStorage.ts +++ b/src/server/utils/storage/localStorage.ts @@ -1,5 +1,5 @@ -import type { AsyncStorage } from "@thirdweb-dev/wallets"; import fs from "node:fs"; +import type { AsyncStorage } from "@thirdweb-dev/wallets"; import { prisma } from "../../../db/client"; import { WalletType } from "../../../schema/wallet"; import { logger } from "../../../utils/logger"; diff --git a/src/server/utils/validator.ts b/src/server/utils/validator.ts index cde9192b2..15e525cc8 100644 --- a/src/server/utils/validator.ts +++ b/src/server/utils/validator.ts @@ -6,8 +6,8 @@ import type { } from "../schemas/erc20"; import type { ercNFTResponseType, - signature1155InputSchema, signature721InputSchema, + signature1155InputSchema, } from "../schemas/nft"; const timestampValidator = (value: number | string | undefined): boolean => { diff --git a/src/server/utils/wallets/createAwsKmsWallet.ts b/src/server/utils/wallets/createAwsKmsWallet.ts index 1d4b75b50..e6d3c85e5 100644 --- a/src/server/utils/wallets/createAwsKmsWallet.ts +++ b/src/server/utils/wallets/createAwsKmsWallet.ts @@ -1,8 +1,8 @@ import { CreateKeyCommand, KMSClient } from "@aws-sdk/client-kms"; import { + type AwsKmsWalletParams, FetchAwsKmsWalletParamsError, fetchAwsKmsWalletParams, - type AwsKmsWalletParams, } from "./fetchAwsKmsWalletParams"; import { importAwsKmsWallet } from "./importAwsKmsWallet"; diff --git a/src/server/utils/wallets/createGcpKmsWallet.ts b/src/server/utils/wallets/createGcpKmsWallet.ts index 2b4b47201..f71d82c3b 100644 --- a/src/server/utils/wallets/createGcpKmsWallet.ts +++ b/src/server/utils/wallets/createGcpKmsWallet.ts @@ -4,8 +4,8 @@ import { WalletType } from "../../../schema/wallet"; import { thirdwebClient } from "../../../utils/sdk"; import { FetchGcpKmsWalletParamsError, - fetchGcpKmsWalletParams, type GcpKmsWalletParams, + fetchGcpKmsWalletParams, } from "./fetchGcpKmsWalletParams"; import { getGcpKmsResourcePath } from "./gcpKmsResourcePath"; import { getGcpKmsAccount } from "./getGcpKmsAccount"; diff --git a/src/server/utils/wallets/createSmartWallet.ts b/src/server/utils/wallets/createSmartWallet.ts index 5859a430a..32e0170ac 100644 --- a/src/server/utils/wallets/createSmartWallet.ts +++ b/src/server/utils/wallets/createSmartWallet.ts @@ -1,16 +1,16 @@ -import { defineChain, type Address, type Chain } from "thirdweb"; -import { smartWallet, type Account } from "thirdweb/wallets"; +import { type Address, type Chain, defineChain } from "thirdweb"; +import { type Account, smartWallet } from "thirdweb/wallets"; import { createWalletDetails } from "../../../db/wallets/createWalletDetails"; import { WalletType } from "../../../schema/wallet"; import { thirdwebClient } from "../../../utils/sdk"; import { splitAwsKmsArn } from "./awsKmsArn"; import { - createAwsKmsKey, type CreateAwsKmsWalletParams, + createAwsKmsKey, } from "./createAwsKmsWallet"; import { - createGcpKmsKey, type CreateGcpKmsWalletParams, + createGcpKmsKey, } from "./createGcpKmsWallet"; import { generateLocalWallet } from "./createLocalWallet"; import { getAwsKmsAccount } from "./getAwsKmsAccount"; diff --git a/src/server/utils/wallets/getAwsKmsAccount.ts b/src/server/utils/wallets/getAwsKmsAccount.ts index 91e99104d..50a499856 100644 --- a/src/server/utils/wallets/getAwsKmsAccount.ts +++ b/src/server/utils/wallets/getAwsKmsAccount.ts @@ -2,10 +2,10 @@ import type { KMSClientConfig } from "@aws-sdk/client-kms"; import { KmsSigner } from "aws-kms-signer"; import type { Hex, ThirdwebClient } from "thirdweb"; import { + type Address, eth_sendRawTransaction, getRpcClient, keccak256, - type Address, } from "thirdweb"; import { serializeTransaction } from "thirdweb/transaction"; import { hashMessage } from "thirdweb/utils"; diff --git a/src/server/utils/wallets/getLocalWallet.ts b/src/server/utils/wallets/getLocalWallet.ts index 0f4456423..5cf0ac3c9 100644 --- a/src/server/utils/wallets/getLocalWallet.ts +++ b/src/server/utils/wallets/getLocalWallet.ts @@ -2,7 +2,7 @@ import { LocalWallet } from "@thirdweb-dev/wallets"; import { Wallet } from "ethers"; import type { Address } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; -import { privateKeyToAccount, type Account } from "thirdweb/wallets"; +import { type Account, privateKeyToAccount } from "thirdweb/wallets"; import { getWalletDetails } from "../../../db/wallets/getWalletDetails"; import { getChain } from "../../../utils/chain"; import { env } from "../../../utils/env"; diff --git a/src/server/utils/wallets/getSmartWallet.ts b/src/server/utils/wallets/getSmartWallet.ts index 54cbeaec8..686e7f6a1 100644 --- a/src/server/utils/wallets/getSmartWallet.ts +++ b/src/server/utils/wallets/getSmartWallet.ts @@ -1,4 +1,4 @@ -import { SmartWallet, type EVMWallet } from "@thirdweb-dev/wallets"; +import { type EVMWallet, SmartWallet } from "@thirdweb-dev/wallets"; import { getContract } from "../../../utils/cache/getContract"; import { env } from "../../../utils/env"; import { redis } from "../../../utils/redis/redis"; @@ -31,7 +31,9 @@ export const getSmartWallet = async ({ resolvedFactoryAddress = (await redis.get(`account-factory:${accountAddress.toLowerCase()}`)) ?? undefined; - } catch { /* empty */ } + } catch { + /* empty */ + } } if (!resolvedFactoryAddress) { @@ -41,7 +43,9 @@ export const getSmartWallet = async ({ contractAddress: accountAddress, }); resolvedFactoryAddress = await contract.call("factory"); - } catch { /* empty */ } + } catch { + /* empty */ + } } if (!resolvedFactoryAddress) { diff --git a/src/server/utils/websocket.ts b/src/server/utils/websocket.ts index 9bf614815..331770988 100644 --- a/src/server/utils/websocket.ts +++ b/src/server/utils/websocket.ts @@ -1,9 +1,9 @@ -import { SocketStream } from "@fastify/websocket"; -import { Static } from "@sinclair/typebox"; -import { FastifyRequest } from "fastify"; +import type { SocketStream } from "@fastify/websocket"; +import type { Static } from "@sinclair/typebox"; +import type { FastifyRequest } from "fastify"; import { logger } from "../../utils/logger"; -import { TransactionSchema } from "../schemas/transaction"; -import { UserSubscription, subscriptionsData } from "../schemas/websocket"; +import type { TransactionSchema } from "../schemas/transaction"; +import { type UserSubscription, subscriptionsData } from "../schemas/websocket"; // websocket timeout, i.e., ws connection closed after 10 seconds const timeoutDuration = 10 * 60 * 1000; diff --git a/src/tests/auth.test.ts b/src/tests/auth.test.ts index 9ae91c8c9..5150050af 100644 --- a/src/tests/auth.test.ts +++ b/src/tests/auth.test.ts @@ -1,7 +1,7 @@ import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { LocalWallet } from "@thirdweb-dev/wallets"; -import { FastifyRequest } from "fastify/types/request"; +import type { FastifyRequest } from "fastify/types/request"; import jsonwebtoken from "jsonwebtoken"; import { getPermissions } from "../db/permissions/getPermissions"; import { WebhooksEventTypes } from "../schema/webhooks"; diff --git a/src/tests/cors.test.ts b/src/tests/cors.test.ts index 321709953..cd890753d 100644 --- a/src/tests/cors.test.ts +++ b/src/tests/cors.test.ts @@ -3,10 +3,10 @@ import { sanitizeOrigin } from "../server/middleware/cors/cors"; describe("sanitizeOrigin", () => { it("with leading and trailing slashes", () => { - expect(sanitizeOrigin("/foobar/")).toEqual(RegExp("foobar")); + expect(sanitizeOrigin("/foobar/")).toEqual(/foobar/); }); it("with leading wildcard", () => { - expect(sanitizeOrigin("*.foobar.com")).toEqual(RegExp(".*.foobar.com")); + expect(sanitizeOrigin("*.foobar.com")).toEqual(/.*.foobar.com/); }); it("with thirdweb domains", () => { expect(sanitizeOrigin("https://thirdweb-preview.com")).toEqual( diff --git a/src/tests/shared/chain.ts b/src/tests/shared/chain.ts index aed41dbdc..a475d2179 100644 --- a/src/tests/shared/chain.ts +++ b/src/tests/shared/chain.ts @@ -1,6 +1,6 @@ import { defineChain } from "thirdweb"; import { anvil } from "thirdweb/chains"; -import { createTestClient, http } from "viem"; +import { http, createTestClient } from "viem"; export const ANVIL_CHAIN = defineChain({ ...anvil, diff --git a/src/tests/swr.test.ts b/src/tests/swr.test.ts index ce709ddf3..599fe62cf 100644 --- a/src/tests/swr.test.ts +++ b/src/tests/swr.test.ts @@ -1,5 +1,5 @@ import { afterEach, beforeEach, describe, expect, test, vi } from "vitest"; -import { createSWRCache, type SWRCache } from "../lib/cache/swr"; +import { type SWRCache, createSWRCache } from "../lib/cache/swr"; describe("SWRCache", () => { let cache: SWRCache; diff --git a/src/utils/account.ts b/src/utils/account.ts index 0c8373f7d..57d62a912 100644 --- a/src/utils/account.ts +++ b/src/utils/account.ts @@ -1,10 +1,10 @@ import LRUMap from "mnemonist/lru-map"; -import { getAddress, type Address, type Chain } from "thirdweb"; +import { type Address, type Chain, getAddress } from "thirdweb"; import type { Account } from "thirdweb/wallets"; import { + type ParsedWalletDetails, getWalletDetails, isSmartBackendWallet, - type ParsedWalletDetails, } from "../db/wallets/getWalletDetails"; import { WalletType } from "../schema/wallet"; import { splitAwsKmsArn } from "../server/utils/wallets/awsKmsArn"; diff --git a/src/utils/cache/getContract.ts b/src/utils/cache/getContract.ts index d7186a596..6022adcca 100644 --- a/src/utils/cache/getContract.ts +++ b/src/utils/cache/getContract.ts @@ -1,4 +1,4 @@ -import { Static, Type } from "@sinclair/typebox"; +import { type Static, Type } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; import { createCustomError } from "../../server/middleware/error"; import { abiSchema } from "../../server/schemas/contract"; diff --git a/src/utils/cache/getSmartWalletV5.ts b/src/utils/cache/getSmartWalletV5.ts index 7ab01f275..82e1a21ca 100644 --- a/src/utils/cache/getSmartWalletV5.ts +++ b/src/utils/cache/getSmartWalletV5.ts @@ -1,6 +1,6 @@ import LRUMap from "mnemonist/lru-map"; -import { getContract, readContract, type Address, type Chain } from "thirdweb"; -import { smartWallet, type Account } from "thirdweb/wallets"; +import { type Address, type Chain, getContract, readContract } from "thirdweb"; +import { type Account, smartWallet } from "thirdweb/wallets"; import { getAccount } from "../account"; import { thirdwebClient } from "../sdk"; diff --git a/src/utils/cache/getWallet.ts b/src/utils/cache/getWallet.ts index 6b078594b..230ba1782 100644 --- a/src/utils/cache/getWallet.ts +++ b/src/utils/cache/getWallet.ts @@ -3,9 +3,9 @@ import { AwsKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/aws-kms"; import { GcpKmsWallet } from "@thirdweb-dev/wallets/evm/wallets/gcp-kms"; import LRUMap from "mnemonist/lru-map"; import { + type ParsedWalletDetails, WalletDetailsError, getWalletDetails, - type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; import type { PrismaTransaction } from "../../schema/prisma"; import { WalletType } from "../../schema/wallet"; diff --git a/src/utils/chain.ts b/src/utils/chain.ts index 0b15e27cd..bc9ccd586 100644 --- a/src/utils/chain.ts +++ b/src/utils/chain.ts @@ -1,4 +1,4 @@ -import { defineChain, type Chain } from "thirdweb"; +import { type Chain, defineChain } from "thirdweb"; import { getConfig } from "./cache/getConfig"; /** diff --git a/src/utils/cron/clearCacheCron.ts b/src/utils/cron/clearCacheCron.ts index c6bf0f0b3..217aa39ce 100644 --- a/src/utils/cron/clearCacheCron.ts +++ b/src/utils/cron/clearCacheCron.ts @@ -1,7 +1,7 @@ import cron from "node-cron"; import { clearCache } from "../cache/clearCache"; import { getConfig } from "../cache/getConfig"; -import { env } from "../env"; +import type { env } from "../env"; let task: cron.ScheduledTask; export const clearCacheCron = async ( diff --git a/src/utils/cron/isValidCron.ts b/src/utils/cron/isValidCron.ts index 849e905d0..81e672a88 100644 --- a/src/utils/cron/isValidCron.ts +++ b/src/utils/cron/isValidCron.ts @@ -28,7 +28,7 @@ export const isValidCron = (input: string): boolean => { let parsedSecondsValue: number | null = null; if (seconds.startsWith("*/")) { - parsedSecondsValue = parseInt(seconds.split("/")[1]); + parsedSecondsValue = Number.parseInt(seconds.split("/")[1]); } // Check for specific invalid patterns in seconds field @@ -66,7 +66,7 @@ const checkCronFieldInterval = ( fieldName: string, ) => { if (field.startsWith("*/")) { - const parsedValue = parseInt(field.split("/")[1]); + const parsedValue = Number.parseInt(field.split("/")[1]); if (parsedValue < minValue || parsedValue > maxValue) { throw createCustomError( `Invalid cron expression. ${fieldName} must be between ${minValue} and ${maxValue} when using an interval.`, diff --git a/src/utils/transaction/cancelTransaction.ts b/src/utils/transaction/cancelTransaction.ts index 29ee5fc66..b2de0f7d0 100644 --- a/src/utils/transaction/cancelTransaction.ts +++ b/src/utils/transaction/cancelTransaction.ts @@ -1,4 +1,4 @@ -import { Address, toSerializableTransaction } from "thirdweb"; +import { type Address, toSerializableTransaction } from "thirdweb"; import { getAccount } from "../account"; import { getChain } from "../chain"; import { getChecksumAddress } from "../primitiveTypes"; @@ -41,8 +41,7 @@ export const sendCancellationTransaction = async ( } const account = await getAccount({ chainId, from }); - const { transactionHash } = await account.sendTransaction( - populatedTransaction, - ); + const { transactionHash } = + await account.sendTransaction(populatedTransaction); return transactionHash; }; diff --git a/src/utils/transaction/insertTransaction.ts b/src/utils/transaction/insertTransaction.ts index fe79018fb..259d98de9 100644 --- a/src/utils/transaction/insertTransaction.ts +++ b/src/utils/transaction/insertTransaction.ts @@ -1,10 +1,10 @@ -import { StatusCodes } from "http-status-codes"; import { randomUUID } from "node:crypto"; +import { StatusCodes } from "http-status-codes"; import { TransactionDB } from "../../db/transactions/db"; import { + type ParsedWalletDetails, getWalletDetails, isSmartBackendWallet, - type ParsedWalletDetails, } from "../../db/wallets/getWalletDetails"; import { doesChainSupportService } from "../../lib/chain/chain-capabilities"; import { createCustomError } from "../../server/middleware/error"; diff --git a/src/utils/transaction/queueTransation.ts b/src/utils/transaction/queueTransation.ts index cdaf2245d..833af51e4 100644 --- a/src/utils/transaction/queueTransation.ts +++ b/src/utils/transaction/queueTransation.ts @@ -1,10 +1,10 @@ import type { Static } from "@sinclair/typebox"; import { StatusCodes } from "http-status-codes"; import { - encode, type Address, type Hex, type PreparedTransaction, + encode, } from "thirdweb"; import { resolvePromisedValue } from "thirdweb/utils"; import { createCustomError } from "../../server/middleware/error"; diff --git a/src/utils/transaction/simulateQueuedTransaction.ts b/src/utils/transaction/simulateQueuedTransaction.ts index 5b94db96f..8015b3c20 100644 --- a/src/utils/transaction/simulateQueuedTransaction.ts +++ b/src/utils/transaction/simulateQueuedTransaction.ts @@ -1,7 +1,7 @@ import { + type PreparedTransaction, prepareTransaction, simulateTransaction, - type PreparedTransaction, } from "thirdweb"; import { stringify } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; diff --git a/src/utils/usage.ts b/src/utils/usage.ts index 5d218b787..9ea6ed83a 100644 --- a/src/utils/usage.ts +++ b/src/utils/usage.ts @@ -1,11 +1,11 @@ -import { Static } from "@sinclair/typebox"; -import { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; -import { FastifyInstance } from "fastify"; -import { Address, Hex } from "thirdweb"; +import type { Static } from "@sinclair/typebox"; +import type { UsageEvent } from "@thirdweb-dev/service-utils/cf-worker"; +import type { FastifyInstance } from "fastify"; +import type { Address, Hex } from "thirdweb"; import { ADMIN_QUEUES_BASEPATH } from "../server/middleware/adminRoutes"; import { OPENAPI_ROUTES } from "../server/middleware/open-api"; -import { contractParamSchema } from "../server/schemas/sharedApiSchemas"; -import { walletWithAddressParamSchema } from "../server/schemas/wallet"; +import type { contractParamSchema } from "../server/schemas/sharedApiSchemas"; +import type { walletWithAddressParamSchema } from "../server/schemas/wallet"; import { getChainIdFromChain } from "../server/utils/chain"; import { env } from "./env"; import { logger } from "./logger"; diff --git a/src/utils/webhook.ts b/src/utils/webhook.ts index f8597e9ca..ef9e17643 100644 --- a/src/utils/webhook.ts +++ b/src/utils/webhook.ts @@ -1,5 +1,5 @@ -import type { Webhooks } from "@prisma/client"; import crypto from "node:crypto"; +import type { Webhooks } from "@prisma/client"; import { prettifyError } from "./error"; export const generateSignature = ( diff --git a/src/worker/queues/processEventLogsQueue.ts b/src/worker/queues/processEventLogsQueue.ts index 1c32ad36f..edfd42ec9 100644 --- a/src/worker/queues/processEventLogsQueue.ts +++ b/src/worker/queues/processEventLogsQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import SuperJSON from "superjson"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { getConfig } from "../../utils/cache/getConfig"; import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -36,7 +36,7 @@ export class ProcessEventsLogQueue { // This backoff attempts at intervals: // 30s, 1m, 2m, 4m, 8m, 16m, 32m, ~1h, ~2h, ~4h for (let i = 0; i < requeryDelays.length; i++) { - const delay = parseInt(requeryDelays[i]) * 1000; + const delay = Number.parseInt(requeryDelays[i]) * 1000; const attempts = i === requeryDelays.length - 1 ? 10 : 0; await this.q.add(jobName, serialized, { delay, diff --git a/src/worker/queues/processTransactionReceiptsQueue.ts b/src/worker/queues/processTransactionReceiptsQueue.ts index 0f595e73f..94c2959ad 100644 --- a/src/worker/queues/processTransactionReceiptsQueue.ts +++ b/src/worker/queues/processTransactionReceiptsQueue.ts @@ -1,6 +1,6 @@ import { Queue } from "bullmq"; import superjson from "superjson"; -import { Address } from "thirdweb"; +import type { Address } from "thirdweb"; import { getConfig } from "../../utils/cache/getConfig"; import { redis } from "../../utils/redis/redis"; import { defaultJobOptions } from "./queues"; @@ -36,7 +36,7 @@ export class ProcessTransactionReceiptsQueue { // This backoff attempts at intervals: // 30s, 1m, 2m, 4m, 8m, 16m, 32m, ~1h, ~2h, ~4h for (let i = 0; i < requeryDelays.length; i++) { - const delay = parseInt(requeryDelays[i]) * 1000; + const delay = Number.parseInt(requeryDelays[i]) * 1000; const attempts = i === requeryDelays.length - 1 ? 10 : 0; await this.q.add(jobName, serialized, { delay, diff --git a/src/worker/queues/sendWebhookQueue.ts b/src/worker/queues/sendWebhookQueue.ts index 1861e4375..4a30be5a0 100644 --- a/src/worker/queues/sendWebhookQueue.ts +++ b/src/worker/queues/sendWebhookQueue.ts @@ -6,8 +6,8 @@ import type { import { Queue } from "bullmq"; import SuperJSON from "superjson"; import { - WebhooksEventTypes, type BackendWalletBalanceWebhookParams, + WebhooksEventTypes, } from "../../schema/webhooks"; import { getWebhooksByEventType } from "../../utils/cache/getWebhook"; import { logger } from "../../utils/logger"; diff --git a/src/worker/tasks/cancelRecycledNoncesWorker.ts b/src/worker/tasks/cancelRecycledNoncesWorker.ts index e93e91256..5acb8f9f5 100644 --- a/src/worker/tasks/cancelRecycledNoncesWorker.ts +++ b/src/worker/tasks/cancelRecycledNoncesWorker.ts @@ -1,5 +1,5 @@ -import { Job, Processor, Worker } from "bullmq"; -import { Address } from "thirdweb"; +import { type Job, type Processor, Worker } from "bullmq"; +import type { Address } from "thirdweb"; import { recycleNonce } from "../../db/wallets/walletNonce"; import { isNonceAlreadyUsedError } from "../../utils/error"; import { logger } from "../../utils/logger"; @@ -68,7 +68,7 @@ const handler: Processor = async (job: Job) => { const fromRecycledNoncesKey = (key: string) => { const [, chainId, walletAddress] = key.split(":"); return { - chainId: parseInt(chainId), + chainId: Number.parseInt(chainId), walletAddress: walletAddress as Address, }; }; @@ -89,5 +89,5 @@ const getAndDeleteRecycledNonces = async (key: string) => { throw new Error(`Error getting members of ${key}: ${error}`); } // No need to sort here as ZRANGE returns elements in ascending order - return (nonces as string[]).map((v) => parseInt(v)); + return (nonces as string[]).map((v) => Number.parseInt(v)); }; diff --git a/src/worker/tasks/chainIndexer.ts b/src/worker/tasks/chainIndexer.ts index a7fbcc304..8746a0dd6 100644 --- a/src/worker/tasks/chainIndexer.ts +++ b/src/worker/tasks/chainIndexer.ts @@ -1,8 +1,8 @@ import { + type Address, eth_blockNumber, eth_getBlockByNumber, getRpcClient, - type Address, } from "thirdweb"; import { getBlockForIndexing } from "../../db/chainIndexers/getChainIndexer"; import { upsertChainIndexer } from "../../db/chainIndexers/upsertChainIndexer"; diff --git a/src/worker/tasks/migratePostgresTransactionsWorker.ts b/src/worker/tasks/migratePostgresTransactionsWorker.ts index 7547d9b75..6b6a7e166 100644 --- a/src/worker/tasks/migratePostgresTransactionsWorker.ts +++ b/src/worker/tasks/migratePostgresTransactionsWorker.ts @@ -1,6 +1,6 @@ -import type { Transactions } from "@prisma/client"; -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import type { Transactions } from "@prisma/client"; +import { type Job, type Processor, Worker } from "bullmq"; import type { Hex } from "thirdweb"; import { getPrismaWithPostgresTx, prisma } from "../../db/client"; import { TransactionDB } from "../../db/transactions/db"; @@ -198,7 +198,7 @@ const toQueuedTransaction = (row: Transactions): QueuedTransaction => { resendCount: 0, isUserOp: !!row.accountAddress, - chainId: parseInt(row.chainId), + chainId: Number.parseInt(row.chainId), from: normalizeAddress(row.fromAddress), to: normalizeAddress(row.toAddress), value: row.value ? BigInt(row.value) : 0n, diff --git a/src/worker/tasks/mineTransactionWorker.ts b/src/worker/tasks/mineTransactionWorker.ts index bed88e803..ad2d1c06f 100644 --- a/src/worker/tasks/mineTransactionWorker.ts +++ b/src/worker/tasks/mineTransactionWorker.ts @@ -1,14 +1,14 @@ -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Address, eth_getBalance, eth_getTransactionByHash, eth_getTransactionReceipt, getAddress, getRpcClient, toTokens, - type Address, } from "thirdweb"; import { stringify } from "thirdweb/utils"; import { getUserOpReceipt, getUserOpReceiptRaw } from "thirdweb/wallets/smart"; @@ -34,8 +34,8 @@ import type { import { enqueueTransactionWebhook } from "../../utils/transaction/webhook"; import { reportUsage } from "../../utils/usage"; import { - MineTransactionQueue, type MineTransactionData, + MineTransactionQueue, } from "../queues/mineTransactionQueue"; import { SendTransactionQueue } from "../queues/sendTransactionQueue"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; diff --git a/src/worker/tasks/nonceHealthCheckWorker.ts b/src/worker/tasks/nonceHealthCheckWorker.ts index 7581273cc..a9093230b 100644 --- a/src/worker/tasks/nonceHealthCheckWorker.ts +++ b/src/worker/tasks/nonceHealthCheckWorker.ts @@ -1,5 +1,5 @@ -import { Worker, type Job, type Processor } from "bullmq"; -import { getAddress, type Address } from "thirdweb"; +import { type Job, type Processor, Worker } from "bullmq"; +import { type Address, getAddress } from "thirdweb"; import { getUsedBackendWallets, inspectNonce, diff --git a/src/worker/tasks/nonceResyncWorker.ts b/src/worker/tasks/nonceResyncWorker.ts index 9a0642250..2e446a0de 100644 --- a/src/worker/tasks/nonceResyncWorker.ts +++ b/src/worker/tasks/nonceResyncWorker.ts @@ -1,4 +1,4 @@ -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import { eth_getTransactionCount, getRpcClient } from "thirdweb"; import { inspectNonce, diff --git a/src/worker/tasks/processEventLogsWorker.ts b/src/worker/tasks/processEventLogsWorker.ts index 843e6037c..0ed8301a0 100644 --- a/src/worker/tasks/processEventLogsWorker.ts +++ b/src/worker/tasks/processEventLogsWorker.ts @@ -1,18 +1,18 @@ import type { Prisma, Webhooks } from "@prisma/client"; import type { AbiEvent } from "abitype"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { - eth_getBlockByHash, - getContract, - getContractEvents, - getRpcClient, - prepareEvent, type Address, type Chain, type Hex, type PreparedEvent, type ThirdwebContract, + eth_getBlockByHash, + getContract, + getContractEvents, + getRpcClient, + prepareEvent, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; import { bulkInsertContractEventLogs } from "../../db/contractEventLogs/createContractEventLogs"; @@ -24,7 +24,7 @@ import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; import { - EnqueueProcessEventLogsData, + type EnqueueProcessEventLogsData, ProcessEventsLogQueue, } from "../queues/processEventLogsQueue"; import { logWorkerExceptions } from "../queues/queues"; diff --git a/src/worker/tasks/processTransactionReceiptsWorker.ts b/src/worker/tasks/processTransactionReceiptsWorker.ts index d8cdb23ae..451ae74c6 100644 --- a/src/worker/tasks/processTransactionReceiptsWorker.ts +++ b/src/worker/tasks/processTransactionReceiptsWorker.ts @@ -1,17 +1,17 @@ import type { Prisma } from "@prisma/client"; import type { AbiEvent } from "abitype"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Address, + type ThirdwebContract, eth_getBlockByNumber, eth_getTransactionReceipt, getContract, getRpcClient, - type Address, - type ThirdwebContract, } from "thirdweb"; import { resolveContractAbi } from "thirdweb/contract"; -import { decodeFunctionData, type Abi, type Hash } from "viem"; +import { type Abi, type Hash, decodeFunctionData } from "viem"; import { bulkInsertContractTransactionReceipts } from "../../db/contractTransactionReceipts/createContractTransactionReceipts"; import { WebhooksEventTypes } from "../../schema/webhooks"; import { getChain } from "../../utils/chain"; @@ -20,8 +20,8 @@ import { normalizeAddress } from "../../utils/primitiveTypes"; import { redis } from "../../utils/redis/redis"; import { thirdwebClient } from "../../utils/sdk"; import { - ProcessTransactionReceiptsQueue, type EnqueueProcessTransactionReceiptsData, + ProcessTransactionReceiptsQueue, } from "../queues/processTransactionReceiptsQueue"; import { logWorkerExceptions } from "../queues/queues"; import { SendWebhookQueue } from "../queues/sendWebhookQueue"; diff --git a/src/worker/tasks/pruneTransactionsWorker.ts b/src/worker/tasks/pruneTransactionsWorker.ts index 9ba8a361a..54127de5b 100644 --- a/src/worker/tasks/pruneTransactionsWorker.ts +++ b/src/worker/tasks/pruneTransactionsWorker.ts @@ -1,4 +1,4 @@ -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import { TransactionDB } from "../../db/transactions/db"; import { pruneNonceMaps } from "../../db/wallets/nonceMap"; import { env } from "../../utils/env"; diff --git a/src/worker/tasks/sendTransactionWorker.ts b/src/worker/tasks/sendTransactionWorker.ts index f3015bd75..c0c38ff5b 100644 --- a/src/worker/tasks/sendTransactionWorker.ts +++ b/src/worker/tasks/sendTransactionWorker.ts @@ -1,21 +1,21 @@ -import { Worker, type Job, type Processor } from "bullmq"; import assert from "node:assert"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { + type Hex, getAddress, getContract, readContract, toSerializableTransaction, toTokens, - type Hex, } from "thirdweb"; import { getChainMetadata } from "thirdweb/chains"; import { stringify } from "thirdweb/utils"; import type { Account } from "thirdweb/wallets"; import { + type UserOperation, bundleUserOp, createAndSignUserOp, - type UserOperation, } from "thirdweb/wallets/smart"; import { getContractAddress } from "viem"; import { TransactionDB } from "../../db/transactions/db"; @@ -54,8 +54,8 @@ import { reportUsage } from "../../utils/usage"; import { MineTransactionQueue } from "../queues/mineTransactionQueue"; import { logWorkerExceptions } from "../queues/queues"; import { - SendTransactionQueue, type SendTransactionData, + SendTransactionQueue, } from "../queues/sendTransactionQueue"; /** diff --git a/src/worker/tasks/sendWebhookWorker.ts b/src/worker/tasks/sendWebhookWorker.ts index a8cf60c23..ff7143f1a 100644 --- a/src/worker/tasks/sendWebhookWorker.ts +++ b/src/worker/tasks/sendWebhookWorker.ts @@ -1,20 +1,20 @@ import type { Static } from "@sinclair/typebox"; -import { Worker, type Job, type Processor } from "bullmq"; +import { type Job, type Processor, Worker } from "bullmq"; import superjson from "superjson"; import { TransactionDB } from "../../db/transactions/db"; import { - WebhooksEventTypes, type BackendWalletBalanceWebhookParams, + WebhooksEventTypes, } from "../../schema/webhooks"; import { toEventLogSchema } from "../../server/schemas/eventLog"; import { - toTransactionSchema, type TransactionSchema, + toTransactionSchema, } from "../../server/schemas/transaction"; import { toTransactionReceiptSchema } from "../../server/schemas/transactionReceipt"; import { logger } from "../../utils/logger"; import { redis } from "../../utils/redis/redis"; -import { sendWebhookRequest, type WebhookResponse } from "../../utils/webhook"; +import { type WebhookResponse, sendWebhookRequest } from "../../utils/webhook"; import { SendWebhookQueue, type WebhookJob } from "../queues/sendWebhookQueue"; const handler: Processor = async (job: Job) => { diff --git a/test/e2e/config.ts b/test/e2e/config.ts index 83cd7d067..75b2345f8 100644 --- a/test/e2e/config.ts +++ b/test/e2e/config.ts @@ -1,5 +1,5 @@ import assert from "assert"; -import { anvil, type Chain } from "thirdweb/chains"; +import { type Chain, anvil } from "thirdweb/chains"; assert(process.env.ENGINE_URL, "ENGINE_URL is required"); assert(process.env.ENGINE_ACCESS_TOKEN, "ENGINE_ACCESS_TOKEN is required"); diff --git a/test/e2e/scripts/counter.ts b/test/e2e/scripts/counter.ts index ccb9bd8de..9a0960b4e 100644 --- a/test/e2e/scripts/counter.ts +++ b/test/e2e/scripts/counter.ts @@ -1,9 +1,9 @@ // Anvil chain outputs every RPC call to stdout // You can save the output to a file and then use this script to count the number of times a specific RPC call is made. +import { join } from "path"; import { argv } from "bun"; import { readFile } from "fs/promises"; -import { join } from "path"; const file = join(__dirname, argv[2]); diff --git a/test/e2e/tests/extensions.test.ts b/test/e2e/tests/extensions.test.ts index 1126f2877..335b0bc49 100644 --- a/test/e2e/tests/extensions.test.ts +++ b/test/e2e/tests/extensions.test.ts @@ -1,7 +1,7 @@ +import { beforeAll, describe, expect, test } from "bun:test"; import assert from "assert"; import { sleep } from "bun"; -import { beforeAll, describe, expect, test } from "bun:test"; -import { getAddress, type Address } from "viem"; +import { type Address, getAddress } from "viem"; import { CONFIG } from "../config"; import type { setupEngine } from "../utils/engine"; import { setup } from "./setup"; diff --git a/test/e2e/tests/load.test.ts b/test/e2e/tests/load.test.ts index 1e31a2e4b..664421395 100644 --- a/test/e2e/tests/load.test.ts +++ b/test/e2e/tests/load.test.ts @@ -1,6 +1,6 @@ +import { describe, expect, test } from "bun:test"; import assert from "assert"; import { sleep } from "bun"; -import { describe, expect, test } from "bun:test"; import { getAddress } from "viem"; import { CONFIG } from "../config"; import { printStats } from "../utils/statistics"; diff --git a/test/e2e/tests/routes/erc1155-transfer.test.ts b/test/e2e/tests/routes/erc1155-transfer.test.ts index b2c015700..fb0a87a31 100644 --- a/test/e2e/tests/routes/erc1155-transfer.test.ts +++ b/test/e2e/tests/routes/erc1155-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/routes/erc20-transfer.test.ts b/test/e2e/tests/routes/erc20-transfer.test.ts index 7a22c149e..638d9f24f 100644 --- a/test/e2e/tests/routes/erc20-transfer.test.ts +++ b/test/e2e/tests/routes/erc20-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, toWei, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS, toWei } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/routes/erc721-transfer.test.ts b/test/e2e/tests/routes/erc721-transfer.test.ts index c8844467a..d3eb241a9 100644 --- a/test/e2e/tests/routes/erc721-transfer.test.ts +++ b/test/e2e/tests/routes/erc721-transfer.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import assert from "node:assert"; -import { ZERO_ADDRESS, type Address } from "thirdweb"; +import { type Address, ZERO_ADDRESS } from "thirdweb"; import { CONFIG } from "../../config"; import { getEngineBackendWalletB, type setupEngine } from "../../utils/engine"; import { pollTransactionStatus } from "../../utils/transactions"; diff --git a/test/e2e/tests/setup.ts b/test/e2e/tests/setup.ts index c65b07e06..14cd21770 100644 --- a/test/e2e/tests/setup.ts +++ b/test/e2e/tests/setup.ts @@ -1,12 +1,12 @@ -import { env, sleep } from "bun"; import { afterAll, beforeAll } from "bun:test"; +import { env, sleep } from "bun"; import { createChain, getEngineBackendWallet, setupEngine, } from "../utils/engine"; -import { createThirdwebClient, type Address } from "thirdweb"; +import { type Address, createThirdwebClient } from "thirdweb"; import { CONFIG } from "../config"; import { startAnvil, stopAnvil } from "../utils/anvil"; diff --git a/test/e2e/tests/userop.test.ts b/test/e2e/tests/userop.test.ts index 18c5cba6d..fc1c54e7c 100644 --- a/test/e2e/tests/userop.test.ts +++ b/test/e2e/tests/userop.test.ts @@ -1,6 +1,6 @@ import { beforeAll, describe, expect, test } from "bun:test"; import { randomBytes } from "crypto"; -import { getAddress, type Address } from "thirdweb"; +import { type Address, getAddress } from "thirdweb"; import { sepolia } from "thirdweb/chains"; import { DEFAULT_ACCOUNT_FACTORY_V0_6 } from "thirdweb/wallets/smart"; import type { ApiError } from "../../../sdk/dist/declarations/src/core/ApiError"; diff --git a/test/e2e/utils/anvil.ts b/test/e2e/utils/anvil.ts index 57f00be76..488cc7b1f 100644 --- a/test/e2e/utils/anvil.ts +++ b/test/e2e/utils/anvil.ts @@ -1,4 +1,4 @@ -import { createServer, type CreateServerReturnType } from "prool"; +import { type CreateServerReturnType, createServer } from "prool"; import { anvil } from "prool/instances"; let server: CreateServerReturnType | undefined; diff --git a/test/e2e/utils/transactions.ts b/test/e2e/utils/transactions.ts index 7e51b5a6c..c365cefd2 100644 --- a/test/e2e/utils/transactions.ts +++ b/test/e2e/utils/transactions.ts @@ -1,6 +1,6 @@ import { sleep } from "bun"; -import { type Address } from "viem"; -import { Engine } from "../../../sdk"; +import type { Address } from "viem"; +import type { Engine } from "../../../sdk"; import { CONFIG } from "../config"; type Timing = { diff --git a/vitest.global-setup.ts b/vitest.global-setup.ts index 53f215c91..8f5316946 100644 --- a/vitest.global-setup.ts +++ b/vitest.global-setup.ts @@ -1,5 +1,5 @@ -import { config } from "dotenv"; import path from "node:path"; +import { config } from "dotenv"; config({ path: [path.resolve(".env.test.local"), path.resolve(".env.test")], From bb4fb51f0270c6b84d68ed35553476aa6378e823 Mon Sep 17 00:00:00 2001 From: "Nicholas St. Germain" Date: Tue, 26 Nov 2024 04:31:12 -0600 Subject: [PATCH 11/11] revert all changes in sdk --- sdk/.babelrc | 4 +- sdk/old_openapi.json | 28139 ++++------------ sdk/src/Engine.ts | 9 +- sdk/src/services/AccessTokensService.ts | 106 +- sdk/src/services/AccountFactoryService.ts | 188 +- sdk/src/services/AccountService.ts | 554 +- sdk/src/services/BackendWalletService.ts | 1118 +- sdk/src/services/ChainService.ts | 178 +- sdk/src/services/ConfigurationService.ts | 605 +- sdk/src/services/ContractEventsService.ts | 50 +- sdk/src/services/ContractMetadataService.ts | 212 +- sdk/src/services/ContractRolesService.ts | 262 +- sdk/src/services/ContractRoyaltiesService.ts | 280 +- sdk/src/services/ContractService.ts | 174 +- .../services/ContractSubscriptionsService.ts | 229 +- sdk/src/services/DefaultService.ts | 11 - sdk/src/services/DeployService.ts | 1742 +- sdk/src/services/Erc1155Service.ts | 3096 +- sdk/src/services/Erc20Service.ts | 1850 +- sdk/src/services/Erc721Service.ts | 3038 +- sdk/src/services/KeypairService.ts | 150 +- .../MarketplaceDirectListingsService.ts | 1252 +- .../MarketplaceEnglishAuctionsService.ts | 982 +- sdk/src/services/MarketplaceOffersService.ts | 686 +- sdk/src/services/PermissionsService.ts | 76 +- sdk/src/services/RelayerService.ts | 216 +- sdk/src/services/TransactionService.ts | 680 +- sdk/src/services/WebhooksService.ts | 118 +- 28 files changed, 15633 insertions(+), 30372 deletions(-) diff --git a/sdk/.babelrc b/sdk/.babelrc index 614696c6c..e15ac017a 100644 --- a/sdk/.babelrc +++ b/sdk/.babelrc @@ -1,5 +1,3 @@ { - "presets": [ - "@babel/preset-typescript" - ] + "presets": ["@babel/preset-typescript"] } diff --git a/sdk/old_openapi.json b/sdk/old_openapi.json index 8fe058676..caf76231c 100644 --- a/sdk/old_openapi.json +++ b/sdk/old_openapi.json @@ -22,32 +22,20 @@ }, "paths": { "/json": { - "get": { - "responses": { - "200": { - "description": "Default Response" - } - } - } + "get": { "responses": { "200": { "description": "Default Response" } } } }, "/backend-wallet/create": { "post": { "operationId": "create", "summary": "Create backend wallet", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Create a backend wallet.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "label": { - "type": "string" - } - } + "properties": { "label": { "type": "string" } } } } } @@ -69,24 +57,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { - "type": "string" - } + "status": { "type": "string" } }, - "required": [ - "walletAddress", - "status" - ] + "required": ["walletAddress", "status"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { - "result": { - "walletAddress": "0x....", - "status": "success" - } + "result": { "walletAddress": "0x....", "status": "success" } } } } @@ -103,19 +81,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -141,19 +111,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -179,19 +141,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -213,16 +167,11 @@ "delete": { "operationId": "removeBackendWallet", "summary": "Remove backend wallet", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Remove an existing backend wallet. NOTE: This is an irreversible action for local wallets. Ensure any funds are transferred out before removing a local wallet.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -240,24 +189,12 @@ "properties": { "result": { "type": "object", - "properties": { - "status": { - "type": "string" - } - }, - "required": [ - "status" - ] + "properties": { "status": { "type": "string" } }, + "required": ["status"] } }, - "required": [ - "result" - ], - "example": { - "result": { - "status": "success" - } - } + "required": ["result"], + "example": { "result": { "status": "success" } } } } } @@ -273,19 +210,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -311,19 +240,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -349,19 +270,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -383,9 +296,7 @@ "post": { "operationId": "import", "summary": "Import backend wallet", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Import an existing wallet as a backend wallet.", "requestBody": { "content": { @@ -397,9 +308,7 @@ "properties": { "awsKmsKeyId": { "description": "AWS KMS key ID", - "examples": [ - "12345678-1234-1234-1234-123456789012" - ], + "examples": ["12345678-1234-1234-1234-123456789012"], "type": "string" }, "awsKmsArn": { @@ -410,33 +319,23 @@ "type": "string" } }, - "required": [ - "awsKmsKeyId", - "awsKmsArn" - ] + "required": ["awsKmsKeyId", "awsKmsArn"] }, { "type": "object", "properties": { "gcpKmsKeyId": { "description": "GCP KMS key ID", - "examples": [ - "12345678-1234-1234-1234-123456789012" - ], + "examples": ["12345678-1234-1234-1234-123456789012"], "type": "string" }, "gcpKmsKeyVersionId": { "description": "GCP KMS key version ID", - "examples": [ - "1" - ], + "examples": ["1"], "type": "string" } }, - "required": [ - "gcpKmsKeyId", - "gcpKmsKeyVersionId" - ] + "required": ["gcpKmsKeyId", "gcpKmsKeyVersionId"] }, { "anyOf": [ @@ -448,9 +347,7 @@ "type": "string" } }, - "required": [ - "privateKey" - ] + "required": ["privateKey"] }, { "type": "object", @@ -460,9 +357,7 @@ "type": "string" } }, - "required": [ - "mnemonic" - ] + "required": ["mnemonic"] }, { "type": "object", @@ -476,10 +371,7 @@ "type": "string" } }, - "required": [ - "encryptedJson", - "password" - ] + "required": ["encryptedJson", "password"] } ] } @@ -497,10 +389,7 @@ } }, "example3": { - "value": { - "encryptedJson": "", - "password": "password123" - } + "value": { "encryptedJson": "", "password": "password123" } }, "example4": { "value": { @@ -535,24 +424,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { - "type": "string" - } + "status": { "type": "string" } }, - "required": [ - "walletAddress", - "status" - ] + "required": ["walletAddress", "status"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { - "result": { - "walletAddress": "0x....", - "status": "success" - } + "result": { "walletAddress": "0x....", "status": "success" } } } } @@ -569,19 +448,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -607,19 +478,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -645,19 +508,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -679,9 +534,7 @@ "post": { "operationId": "update", "summary": "Update backend wallet", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Update a backend wallet.", "requestBody": { "content": { @@ -695,13 +548,9 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "label": { - "type": "string" - } + "label": { "type": "string" } }, - "required": [ - "walletAddress" - ] + "required": ["walletAddress"] } } }, @@ -724,24 +573,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "status": { - "type": "string" - } + "status": { "type": "string" } }, - "required": [ - "walletAddress", - "status" - ] + "required": ["walletAddress", "status"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { - "result": { - "walletAddress": "0x....", - "status": "success" - } + "result": { "walletAddress": "0x....", "status": "success" } } } } @@ -758,19 +597,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -796,19 +627,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -834,19 +657,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -868,15 +683,11 @@ "get": { "operationId": "getBalance", "summary": "Get balance", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Get the native balance for a backend wallet.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -884,10 +695,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -912,21 +720,11 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "walletAddress", @@ -938,9 +736,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "walletAddress": "0x...", @@ -966,19 +762,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1004,19 +792,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1042,19 +822,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1076,16 +848,11 @@ "get": { "operationId": "getAll", "summary": "Get all backend wallets", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Get all backend wallets.", "parameters": [ { - "schema": { - "default": "1", - "type": "number" - }, + "schema": { "default": "1", "type": "number" }, "example": "1", "in": "query", "name": "page", @@ -1093,10 +860,7 @@ "description": "The page of wallets to get." }, { - "schema": { - "default": "10", - "type": "number" - }, + "schema": { "default": "10", "type": "number" }, "example": "10", "in": "query", "name": "limit", @@ -1133,9 +897,7 @@ "description": "A label for your wallet", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "awsKmsKeyId": { @@ -1144,9 +906,7 @@ "description": "AWS KMS Key ID", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "awsKmsArn": { @@ -1155,9 +915,7 @@ "description": "AWS KMS Key ARN", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gcpKmsKeyId": { @@ -1166,9 +924,7 @@ "description": "GCP KMS Key ID", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gcpKmsKeyRingId": { @@ -1177,9 +933,7 @@ "description": "GCP KMS Key Ring ID", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gcpKmsLocationId": { @@ -1188,9 +942,7 @@ "description": "GCP KMS Location ID", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gcpKmsKeyVersionId": { @@ -1199,9 +951,7 @@ "description": "GCP KMS Key Version ID", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gcpKmsResourcePath": { @@ -1210,9 +960,7 @@ "description": "GCP KMS Resource Path", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -1231,9 +979,7 @@ } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { @@ -1265,19 +1011,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1303,19 +1041,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1341,19 +1071,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1375,9 +1097,7 @@ "post": { "operationId": "transfer", "summary": "Transfer tokens", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Transfer native currency or ERC20 tokens to another wallet.", "requestBody": { "content": { @@ -1427,10 +1147,7 @@ } } }, - "required": [ - "to", - "amount" - ] + "required": ["to", "amount"] } } }, @@ -1438,19 +1155,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -1458,10 +1170,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1469,9 +1178,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1494,14 +1201,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -1522,19 +1225,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1560,19 +1255,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1598,19 +1285,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1632,9 +1311,7 @@ "post": { "operationId": "withdraw", "summary": "Withdraw funds", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Withdraw all funds from this wallet to another wallet.", "requestBody": { "content": { @@ -1649,9 +1326,7 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "required": [ - "toAddress" - ] + "required": ["toAddress"] } } }, @@ -1659,19 +1334,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -1679,10 +1349,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1690,9 +1357,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -1709,19 +1374,11 @@ "properties": { "result": { "type": "object", - "properties": { - "transactionHash": { - "type": "string" - } - }, - "required": [ - "transactionHash" - ] + "properties": { "transactionHash": { "type": "string" } }, + "required": ["transactionHash"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -1737,19 +1394,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1775,19 +1424,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1813,19 +1454,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -1847,9 +1480,7 @@ "post": { "operationId": "sendTransaction", "summary": "Send a transaction", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Send a transaction with transaction parameters", "requestBody": { "content": { @@ -1863,14 +1494,8 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "data": { - "type": "string", - "example": "0x..." - }, - "value": { - "type": "string", - "example": "10000000" - }, + "data": { "type": "string", "example": "0x..." }, + "value": { "type": "string", "example": "10000000" }, "txOverrides": { "type": "object", "properties": { @@ -1892,18 +1517,13 @@ } } }, - "required": [ - "data", - "value" - ] + "required": ["data", "value"] }, "example": { "toAddress": "0x7a0ce8524bea337f0bee853b68fabde145dac0a0", "data": "0x449a52f800000000000000000000000043cae0d7fe86c713530e679ce02574743b2ee9fc0000000000000000000000000000000000000000000000000de0b6b3a7640000", "value": "0x00", - "txOverrides": { - "gas": "50000" - } + "txOverrides": { "gas": "50000" } } } }, @@ -1911,19 +1531,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -1931,10 +1546,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -1942,19 +1554,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -1962,10 +1569,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -1989,14 +1593,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -2017,19 +1617,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2055,19 +1647,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2093,19 +1677,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2127,9 +1703,7 @@ "post": { "operationId": "sendTransactionBatch", "summary": "Send a batch of raw transactions", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Send a batch of raw transactions with transaction parameters", "requestBody": { "content": { @@ -2145,14 +1719,8 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "data": { - "type": "string", - "example": "0x..." - }, - "value": { - "type": "string", - "example": "10000000" - }, + "data": { "type": "string", "example": "0x..." }, + "value": { "type": "string", "example": "10000000" }, "txOverrides": { "type": "object", "properties": { @@ -2179,10 +1747,7 @@ } } }, - "required": [ - "data", - "value" - ] + "required": ["data", "value"] } } } @@ -2190,9 +1755,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -2200,10 +1763,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2211,9 +1771,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2233,19 +1791,13 @@ "properties": { "queueIds": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "queueIds" - ] + "required": ["queueIds"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -2261,19 +1813,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2299,19 +1843,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2337,19 +1873,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2371,9 +1899,7 @@ "post": { "operationId": "signTransaction", "summary": "Sign a transaction", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Sign a transaction", "requestBody": { "content": { @@ -2384,53 +1910,27 @@ "transaction": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "from": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "gasLimit": { - "type": "string" - }, - "gasPrice": { - "type": "string" - }, - "data": { - "type": "string" - }, - "value": { - "type": "string" - }, - "chainId": { - "type": "number" - }, - "type": { - "type": "number" - }, + "to": { "type": "string" }, + "from": { "type": "string" }, + "nonce": { "type": "string" }, + "gasLimit": { "type": "string" }, + "gasPrice": { "type": "string" }, + "data": { "type": "string" }, + "value": { "type": "string" }, + "chainId": { "type": "number" }, + "type": { "type": "number" }, "accessList": {}, - "maxFeePerGas": { - "type": "string" - }, - "maxPriorityFeePerGas": { - "type": "string" - }, + "maxFeePerGas": { "type": "string" }, + "maxPriorityFeePerGas": { "type": "string" }, "customData": { "type": "object", "additionalProperties": {} }, - "ccipReadEnabled": { - "type": "boolean" - } + "ccipReadEnabled": { "type": "boolean" } } } }, - "required": [ - "transaction" - ] + "required": ["transaction"] } } }, @@ -2438,10 +1938,7 @@ }, "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2449,9 +1946,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2465,14 +1960,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] } } } @@ -2488,19 +1977,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2526,19 +2007,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2564,19 +2037,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2598,9 +2063,7 @@ "post": { "operationId": "signMessage", "summary": "Sign a message", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Send a message", "requestBody": { "content": { @@ -2608,16 +2071,10 @@ "schema": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "isBytes": { - "type": "boolean" - } + "message": { "type": "string" }, + "isBytes": { "type": "boolean" } }, - "required": [ - "message" - ] + "required": ["message"] } } }, @@ -2625,10 +2082,7 @@ }, "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2636,9 +2090,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2652,14 +2104,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] } } } @@ -2675,19 +2121,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2713,19 +2151,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2751,19 +2181,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2785,9 +2207,7 @@ "post": { "operationId": "signTypedData", "summary": "Sign an EIP-712 message", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Send an EIP-712 message (\"typed data\")", "requestBody": { "content": { @@ -2811,11 +2231,7 @@ "properties": {} } }, - "required": [ - "domain", - "types", - "value" - ] + "required": ["domain", "types", "value"] } } }, @@ -2823,10 +2239,7 @@ }, "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -2834,9 +2247,7 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, @@ -2850,14 +2261,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] } } } @@ -2873,19 +2278,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2911,19 +2308,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2949,19 +2338,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -2983,17 +2364,11 @@ "get": { "operationId": "getTransactionsForBackendWallet", "summary": "Get recent transactions", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Get recent transactions for this backend wallet.", "parameters": [ { - "schema": { - "default": 1, - "minimum": 1, - "type": "integer" - }, + "schema": { "default": 1, "minimum": 1, "type": "integer" }, "example": 1, "in": "query", "name": "page", @@ -3001,10 +2376,7 @@ "description": "Specify the page number." }, { - "schema": { - "default": 100, - "type": "integer" - }, + "schema": { "default": 100, "type": "integer" }, "example": 100, "in": "query", "name": "limit", @@ -3015,30 +2387,10 @@ "schema": { "default": "queued", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["cancelled"] }, + { "type": "string", "enum": ["errored"] } ] }, "in": "query", @@ -3047,9 +2399,7 @@ "description": "The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued'" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -3057,10 +2407,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -3090,44 +2437,17 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "sent" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["sent"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["errored"] }, + { "type": "string", "enum": ["cancelled"] } ], "example": "queued" }, @@ -3137,9 +2457,7 @@ "description": "The chain ID for the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "fromAddress": { @@ -3148,9 +2466,7 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "toAddress": { @@ -3159,9 +2475,7 @@ "description": "The contract address to be called", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "data": { @@ -3170,9 +2484,7 @@ "description": "Encoded calldata", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "extension": { @@ -3181,9 +2493,7 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "value": { @@ -3192,9 +2502,7 @@ "description": "The amount of native currency to send", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "nonce": { @@ -3207,9 +2515,7 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasLimit": { @@ -3218,9 +2524,7 @@ "description": "The max gas unit limit", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasPrice": { @@ -3229,9 +2533,7 @@ "description": "The gas price used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxFeePerGas": { @@ -3240,9 +2542,7 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxPriorityFeePerGas": { @@ -3251,9 +2551,7 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionType": { @@ -3262,9 +2560,7 @@ "description": "The type of transaction", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionHash": { @@ -3273,9 +2569,7 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "queuedAt": { @@ -3284,9 +2578,7 @@ "description": "When the transaction is enqueued", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAt": { @@ -3295,9 +2587,7 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "minedAt": { @@ -3306,9 +2596,7 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cancelledAt": { @@ -3317,9 +2605,7 @@ "description": "When the transactino is cancelled", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractAddress": { @@ -3328,9 +2614,7 @@ "description": "The address for a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractType": { @@ -3339,9 +2623,7 @@ "description": "The type of a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "errorMessage": { @@ -3350,9 +2632,7 @@ "description": "The error that occurred", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAtBlockNumber": { @@ -3361,9 +2641,7 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "blockNumber": { @@ -3372,9 +2650,7 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryCount": { @@ -3387,9 +2663,7 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxFeePerGas": { @@ -3398,9 +2672,7 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxPriorityFeePerGas": { @@ -3409,9 +2681,7 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "signerAddress": { @@ -3424,9 +2694,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "accountAddress": { @@ -3439,9 +2707,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "target": { @@ -3454,9 +2720,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "sender": { @@ -3469,128 +2733,74 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "initCode": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "verificationGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "preVerificationGas": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "paymasterAndData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "userOpHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionName": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionArgs": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "onChainTxStatus": { "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } + { "type": "number" }, + { "type": "null" } ] }, "onchainStatus": { "anyOf": [ - { - "type": "string", - "enum": [ - "success" - ] - }, - { - "type": "string", - "enum": [ - "reverted" - ] - }, - { - "type": "null" - } + { "type": "string", "enum": ["success"] }, + { "type": "string", "enum": ["reverted"] }, + { "type": "null" } ] }, "effectiveGasPrice": { @@ -3599,9 +2809,7 @@ "description": "Effective Gas Price", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cumulativeGasUsed": { @@ -3610,9 +2818,7 @@ "description": "Cumulative Gas Used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -3666,14 +2872,10 @@ } } }, - "required": [ - "transactions" - ] + "required": ["transactions"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -3689,19 +2891,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -3727,19 +2921,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -3765,19 +2951,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -3799,16 +2977,11 @@ "get": { "operationId": "getTransactionsForBackendWalletByNonce", "summary": "Get recent transactions by nonce", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Get recent transactions for this backend wallet, sorted by descending nonce.", "parameters": [ { - "schema": { - "minimum": 0, - "type": "integer" - }, + "schema": { "minimum": 0, "type": "integer" }, "example": 100, "in": "query", "name": "fromNonce", @@ -3816,10 +2989,7 @@ "description": "The earliest nonce, inclusive." }, { - "schema": { - "minimum": 0, - "type": "integer" - }, + "schema": { "minimum": 0, "type": "integer" }, "example": 100, "in": "query", "name": "toNonce", @@ -3827,9 +2997,7 @@ "description": "The latest nonce, inclusive. If omitted, queries up to the latest sent nonce." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -3837,10 +3005,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -3861,9 +3026,7 @@ "items": { "type": "object", "properties": { - "nonce": { - "type": "number" - }, + "nonce": { "type": "number" }, "transaction": { "anyOf": [ { @@ -3875,9 +3038,7 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "status": { @@ -3890,35 +3051,13 @@ "cancelled" ], "anyOf": [ + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["sent"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["errored"] }, { "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "sent" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] + "enum": ["cancelled"] } ] }, @@ -3928,9 +3067,7 @@ "description": "The chain ID for the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "fromAddress": { @@ -3939,9 +3076,7 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "toAddress": { @@ -3950,9 +3085,7 @@ "description": "The contract address to be called", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "data": { @@ -3961,9 +3094,7 @@ "description": "Encoded calldata", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "extension": { @@ -3972,9 +3103,7 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "value": { @@ -3983,9 +3112,7 @@ "description": "The amount of native currency to send", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "nonce": { @@ -3998,9 +3125,7 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasLimit": { @@ -4009,9 +3134,7 @@ "description": "The max gas unit limit", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasPrice": { @@ -4020,9 +3143,7 @@ "description": "The gas price used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxFeePerGas": { @@ -4031,9 +3152,7 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxPriorityFeePerGas": { @@ -4042,9 +3161,7 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionType": { @@ -4053,9 +3170,7 @@ "description": "The type of transaction", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionHash": { @@ -4064,9 +3179,7 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "queuedAt": { @@ -4075,9 +3188,7 @@ "description": "When the transaction is enqueued", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAt": { @@ -4086,9 +3197,7 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "minedAt": { @@ -4097,9 +3206,7 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cancelledAt": { @@ -4108,9 +3215,7 @@ "description": "When the transactino is cancelled", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractAddress": { @@ -4119,9 +3224,7 @@ "description": "The address for a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractType": { @@ -4130,9 +3233,7 @@ "description": "The type of a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "errorMessage": { @@ -4141,9 +3242,7 @@ "description": "The error that occurred", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAtBlockNumber": { @@ -4152,9 +3251,7 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "blockNumber": { @@ -4163,9 +3260,7 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryCount": { @@ -4178,9 +3273,7 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxFeePerGas": { @@ -4189,9 +3282,7 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxPriorityFeePerGas": { @@ -4200,9 +3291,7 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "signerAddress": { @@ -4215,9 +3304,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "accountAddress": { @@ -4230,9 +3317,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "target": { @@ -4245,9 +3330,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "sender": { @@ -4260,128 +3343,77 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "initCode": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "verificationGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "preVerificationGas": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "paymasterAndData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "userOpHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionName": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionArgs": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "onChainTxStatus": { "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } + { "type": "number" }, + { "type": "null" } ] }, "onchainStatus": { "anyOf": [ + { "type": "string", "enum": ["success"] }, { "type": "string", - "enum": [ - "success" - ] + "enum": ["reverted"] }, - { - "type": "string", - "enum": [ - "reverted" - ] - }, - { - "type": "null" - } + { "type": "null" } ] }, "effectiveGasPrice": { @@ -4390,9 +3422,7 @@ "description": "Effective Gas Price", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cumulativeGasUsed": { @@ -4401,9 +3431,7 @@ "description": "Cumulative Gas Used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -4455,22 +3483,15 @@ "cumulativeGasUsed" ] }, - { - "type": "string" - } + { "type": "string" } ] } }, - "required": [ - "nonce", - "transaction" - ] + "required": ["nonce", "transaction"] } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -4486,19 +3507,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4524,19 +3537,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4562,19 +3567,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4596,9 +3593,7 @@ "post": { "operationId": "resetNonces", "summary": "Reset nonces", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Reset nonces for all backend wallets. This is for debugging purposes and does not impact held tokens.", "responses": { "200": { @@ -4610,24 +3605,12 @@ "properties": { "result": { "type": "object", - "properties": { - "status": { - "type": "string" - } - }, - "required": [ - "status" - ] + "properties": { "status": { "type": "string" } }, + "required": ["status"] } }, - "required": [ - "result" - ], - "example": { - "result": { - "status": "success" - } - } + "required": ["result"], + "example": { "result": { "status": "success" } } } } } @@ -4643,19 +3626,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4681,19 +3656,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4719,19 +3686,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4753,15 +3712,11 @@ "get": { "operationId": "getNonce", "summary": "Get nonce", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -4769,10 +3724,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "walletAddress", @@ -4790,24 +3742,12 @@ "properties": { "result": { "type": "object", - "properties": { - "nonce": { - "type": "number" - } - }, - "required": [ - "nonce" - ] + "properties": { "nonce": { "type": "number" } }, + "required": ["nonce"] } }, - "required": [ - "result" - ], - "example": { - "result": { - "nonce": 100 - } - } + "required": ["result"], + "example": { "result": { "nonce": 100 } } } } } @@ -4823,19 +3763,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4861,19 +3793,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4899,19 +3823,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -4933,9 +3849,7 @@ "post": { "operationId": "simulateTransaction", "summary": "Simulate a transaction", - "tags": [ - "Backend Wallet" - ], + "tags": ["Backend Wallet"], "description": "Simulate a transaction with transaction parameters", "requestBody": { "content": { @@ -4963,14 +3877,8 @@ "type": "array", "items": { "anyOf": [ - { - "description": "String argument", - "type": "string" - }, - { - "description": "Numeric argument", - "type": "number" - }, + { "description": "String argument", "type": "string" }, + { "description": "Numeric argument", "type": "number" }, { "description": "Boolean argument", "type": "boolean" @@ -4988,14 +3896,9 @@ ] } }, - "data": { - "description": "Raw calldata", - "type": "string" - } + "data": { "description": "Raw calldata", "type": "string" } }, - "required": [ - "toAddress" - ] + "required": ["toAddress"] } } }, @@ -5003,9 +3906,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -5013,10 +3914,7 @@ "description": "Chain ID" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -5024,19 +3922,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -5044,10 +3937,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -5071,14 +3961,10 @@ "type": "boolean" } }, - "required": [ - "success" - ] + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -5094,19 +3980,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5132,19 +4010,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5170,19 +4040,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5204,9 +4066,7 @@ "get": { "operationId": "getWalletsConfiguration", "summary": "Get wallets configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get wallets configuration", "responses": { "200": { @@ -5221,57 +4081,26 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ] - } + "type": { "type": "string", "enum": ["local"] } }, - "required": [ - "type" - ] + "required": ["type"] }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "aws-kms" - ] - }, - "awsAccessKeyId": { - "type": "string" - }, - "awsRegion": { - "type": "string" - } + "type": { "type": "string", "enum": ["aws-kms"] }, + "awsAccessKeyId": { "type": "string" }, + "awsRegion": { "type": "string" } }, - "required": [ - "type", - "awsAccessKeyId", - "awsRegion" - ] + "required": ["type", "awsAccessKeyId", "awsRegion"] }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "gcp-kms" - ] - }, - "gcpApplicationProjectId": { - "type": "string" - }, - "gcpKmsLocationId": { - "type": "string" - }, - "gcpKmsKeyRingId": { - "type": "string" - }, + "type": { "type": "string", "enum": ["gcp-kms"] }, + "gcpApplicationProjectId": { "type": "string" }, + "gcpKmsLocationId": { "type": "string" }, + "gcpKmsKeyRingId": { "type": "string" }, "gcpApplicationCredentialEmail": { "type": "string" } @@ -5287,9 +4116,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -5305,19 +4132,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5343,19 +4162,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5381,19 +4192,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5413,9 +4216,7 @@ "post": { "operationId": "updateWalletsConfiguration", "summary": "Update wallets configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update wallets configuration", "requestBody": { "content": { @@ -5425,35 +4226,17 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ] - } + "type": { "type": "string", "enum": ["local"] } }, - "required": [ - "type" - ] + "required": ["type"] }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "aws-kms" - ] - }, - "awsAccessKeyId": { - "type": "string" - }, - "awsSecretAccessKey": { - "type": "string" - }, - "awsRegion": { - "type": "string" - } + "type": { "type": "string", "enum": ["aws-kms"] }, + "awsAccessKeyId": { "type": "string" }, + "awsSecretAccessKey": { "type": "string" }, + "awsRegion": { "type": "string" } }, "required": [ "type", @@ -5465,27 +4248,12 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "gcp-kms" - ] - }, - "gcpApplicationProjectId": { - "type": "string" - }, - "gcpKmsLocationId": { - "type": "string" - }, - "gcpKmsKeyRingId": { - "type": "string" - }, - "gcpApplicationCredentialEmail": { - "type": "string" - }, - "gcpApplicationCredentialPrivateKey": { - "type": "string" - } + "type": { "type": "string", "enum": ["gcp-kms"] }, + "gcpApplicationProjectId": { "type": "string" }, + "gcpKmsLocationId": { "type": "string" }, + "gcpKmsKeyRingId": { "type": "string" }, + "gcpApplicationCredentialEmail": { "type": "string" }, + "gcpApplicationCredentialPrivateKey": { "type": "string" } }, "required": [ "type", @@ -5499,11 +4267,7 @@ ] }, "examples": { - "example1": { - "value": { - "type": "local" - } - }, + "example1": { "value": { "type": "local" } }, "example2": { "value": { "type": "aws-kms", @@ -5539,57 +4303,26 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "local" - ] - } + "type": { "type": "string", "enum": ["local"] } }, - "required": [ - "type" - ] + "required": ["type"] }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "aws-kms" - ] - }, - "awsAccessKeyId": { - "type": "string" - }, - "awsRegion": { - "type": "string" - } + "type": { "type": "string", "enum": ["aws-kms"] }, + "awsAccessKeyId": { "type": "string" }, + "awsRegion": { "type": "string" } }, - "required": [ - "type", - "awsAccessKeyId", - "awsRegion" - ] + "required": ["type", "awsAccessKeyId", "awsRegion"] }, { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "gcp-kms" - ] - }, - "gcpApplicationProjectId": { - "type": "string" - }, - "gcpKmsLocationId": { - "type": "string" - }, - "gcpKmsKeyRingId": { - "type": "string" - }, + "type": { "type": "string", "enum": ["gcp-kms"] }, + "gcpApplicationProjectId": { "type": "string" }, + "gcpKmsLocationId": { "type": "string" }, + "gcpKmsKeyRingId": { "type": "string" }, "gcpApplicationCredentialEmail": { "type": "string" } @@ -5605,9 +4338,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -5623,19 +4354,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5661,19 +4384,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5699,19 +4414,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5733,9 +4440,7 @@ "get": { "operationId": "getChainsConfiguration", "summary": "Get chain overrides configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get chain overrides configuration", "responses": { "200": { @@ -5781,11 +4486,7 @@ "type": "number" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] }, "shortName": { "description": "Chain short name", @@ -5807,9 +4508,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -5825,19 +4524,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5863,19 +4554,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5901,19 +4584,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -5933,9 +4608,7 @@ "post": { "operationId": "updateChainsConfiguration", "summary": "Update chain overrides configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update chain overrides configuration", "requestBody": { "content": { @@ -5979,11 +4652,7 @@ "type": "number" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] }, "shortName": { "description": "Chain short name", @@ -6005,18 +4674,14 @@ } } }, - "required": [ - "chainOverrides" - ] + "required": ["chainOverrides"] }, "example": { "chainOverrides": [ { "name": "Localhost", "chain": "ETH", - "rpc": [ - "http://localhost:8545" - ], + "rpc": ["http://localhost:8545"], "nativeCurrency": { "name": "Ether", "symbol": "ETH", @@ -6075,11 +4740,7 @@ "type": "number" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] }, "shortName": { "description": "Chain short name", @@ -6101,9 +4762,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -6119,19 +4778,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6157,19 +4808,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6195,19 +4838,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6229,9 +4864,7 @@ "get": { "operationId": "getTransactionConfiguration", "summary": "Get transaction processing configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get transactions processing configuration", "responses": { "200": { @@ -6244,56 +4877,21 @@ "result": { "type": "object", "properties": { - "minTxsToProcess": { - "type": "number" - }, - "maxTxsToProcess": { - "type": "number" - }, + "minTxsToProcess": { "type": "number" }, + "maxTxsToProcess": { "type": "number" }, "minedTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "maxTxsToUpdate": { - "type": "number" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, + "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "minEllapsedBlocksBeforeRetry": { - "type": "number" - }, - "maxFeePerGasForRetries": { - "type": "string" - }, - "maxPriorityFeePerGasForRetries": { - "type": "string" - }, - "maxRetriesPerTx": { - "type": "number" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, + "minEllapsedBlocksBeforeRetry": { "type": "number" }, + "maxFeePerGasForRetries": { "type": "string" }, + "maxPriorityFeePerGasForRetries": { "type": "string" }, + "maxRetriesPerTx": { "type": "number" }, "clearCacheCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] } }, "required": [ @@ -6310,9 +4908,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -6328,19 +4924,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6366,19 +4954,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6404,19 +4984,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6436,9 +5008,7 @@ "post": { "operationId": "updateTransactionConfiguration", "summary": "Update transaction processing configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update transaction processing configuration", "requestBody": { "content": { @@ -6446,47 +5016,19 @@ "schema": { "type": "object", "properties": { - "minTxsToProcess": { - "type": "number" - }, - "maxTxsToProcess": { - "type": "number" - }, + "minTxsToProcess": { "type": "number" }, + "maxTxsToProcess": { "type": "number" }, "minedTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "maxTxsToUpdate": { - "type": "number" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, + "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "minEllapsedBlocksBeforeRetry": { - "type": "number" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, - "maxFeePerGasForRetries": { - "type": "string" - }, - "maxPriorityFeePerGasForRetries": { - "type": "string" - }, - "maxRetriesPerTx": { - "type": "number" - } + "minEllapsedBlocksBeforeRetry": { "type": "number" }, + "maxFeePerGasForRetries": { "type": "string" }, + "maxPriorityFeePerGasForRetries": { "type": "string" }, + "maxRetriesPerTx": { "type": "number" } } } } @@ -6503,47 +5045,19 @@ "result": { "type": "object", "properties": { - "minTxsToProcess": { - "type": "number" - }, - "maxTxsToProcess": { - "type": "number" - }, + "minTxsToProcess": { "type": "number" }, + "maxTxsToProcess": { "type": "number" }, "minedTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "maxTxsToUpdate": { - "type": "number" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, + "maxTxsToUpdate": { "type": "number" }, "retryTxListenerCronSchedule": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "minEllapsedBlocksBeforeRetry": { - "type": "number" - }, - "maxFeePerGasForRetries": { - "type": "string" - }, - "maxPriorityFeePerGasForRetries": { - "type": "string" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, - "maxRetriesPerTx": { - "type": "number" - } + "minEllapsedBlocksBeforeRetry": { "type": "number" }, + "maxFeePerGasForRetries": { "type": "string" }, + "maxPriorityFeePerGasForRetries": { "type": "string" }, + "maxRetriesPerTx": { "type": "number" } }, "required": [ "minTxsToProcess", @@ -6558,9 +5072,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -6576,19 +5088,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6614,19 +5118,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6652,19 +5148,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6686,9 +5174,7 @@ "get": { "operationId": "getAuthConfiguration", "summary": "Get auth configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get auth configuration", "responses": { "200": { @@ -6700,19 +5186,11 @@ "properties": { "result": { "type": "object", - "properties": { - "domain": { - "type": "string" - } - }, - "required": [ - "domain" - ] + "properties": { "domain": { "type": "string" } }, + "required": ["domain"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -6728,19 +5206,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6766,19 +5236,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6804,19 +5266,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6836,23 +5290,15 @@ "post": { "operationId": "updateAuthConfiguration", "summary": "Update auth configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update auth configuration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "domain": { - "type": "string" - } - }, - "required": [ - "domain" - ] + "properties": { "domain": { "type": "string" } }, + "required": ["domain"] } } }, @@ -6868,19 +5314,11 @@ "properties": { "result": { "type": "object", - "properties": { - "domain": { - "type": "string" - } - }, - "required": [ - "domain" - ] + "properties": { "domain": { "type": "string" } }, + "required": ["domain"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -6896,19 +5334,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6934,19 +5364,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -6972,19 +5394,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7006,9 +5420,7 @@ "get": { "operationId": "getBackendWalletBalanceConfiguration", "summary": "Get wallet-balance configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get wallet-balance configuration", "responses": { "200": { @@ -7026,14 +5438,10 @@ "type": "string" } }, - "required": [ - "minWalletBalance" - ] + "required": ["minWalletBalance"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7049,19 +5457,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7087,19 +5487,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7125,19 +5517,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7157,9 +5541,7 @@ "post": { "operationId": "updateBackendWalletBalanceConfiguration", "summary": "Update backend wallet balance configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update backend wallet balance configuration", "requestBody": { "content": { @@ -7192,14 +5574,10 @@ "type": "string" } }, - "required": [ - "minWalletBalance" - ] + "required": ["minWalletBalance"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7215,19 +5593,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7253,19 +5623,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7291,19 +5653,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7325,9 +5679,7 @@ "get": { "operationId": "getCorsConfiguration", "summary": "Get CORS configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get CORS configuration", "responses": { "200": { @@ -7337,16 +5689,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7362,19 +5707,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7400,19 +5737,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7438,19 +5767,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7470,9 +5791,7 @@ "post": { "operationId": "addUrlToCorsConfiguration", "summary": "Add a CORS URL", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Add a URL to allow client-side calls to Engine", "requestBody": { "content": { @@ -7489,9 +5808,7 @@ } } }, - "required": [ - "urlsToAdd" - ] + "required": ["urlsToAdd"] }, "example": { "urlsToAdd": [ @@ -7511,16 +5828,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7536,19 +5846,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7574,19 +5876,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7612,19 +5906,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7644,9 +5930,7 @@ "delete": { "operationId": "removeUrlToCorsConfiguration", "summary": "Remove CORS URLs", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Remove URLs from CORS configuration", "requestBody": { "content": { @@ -7662,9 +5946,7 @@ } } }, - "required": [ - "urlsToRemove" - ] + "required": ["urlsToRemove"] }, "example": { "urlsToRemove": [ @@ -7684,16 +5966,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7709,19 +5984,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7747,19 +6014,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7785,19 +6044,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7817,9 +6068,7 @@ "put": { "operationId": "setUrlsToCorsConfiguration", "summary": "Set CORS URLs", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Replaces the CORS URLs to allow client-side calls to Engine", "requestBody": { "content": { @@ -7836,15 +6085,10 @@ } } }, - "required": [ - "urls" - ] + "required": ["urls"] }, "example": { - "urls": [ - "https://example.com", - "https://subdomain.example.com" - ] + "urls": ["https://example.com", "https://subdomain.example.com"] } } }, @@ -7858,16 +6102,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -7883,19 +6120,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7921,19 +6150,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7959,19 +6180,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -7993,9 +6206,7 @@ "get": { "operationId": "getCacheConfiguration", "summary": "Get cache configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get cache configuration", "responses": { "200": { @@ -8008,18 +6219,12 @@ "result": { "type": "object", "properties": { - "clearCacheCronSchedule": { - "type": "string" - } + "clearCacheCronSchedule": { "type": "string" } }, - "required": [ - "clearCacheCronSchedule" - ] + "required": ["clearCacheCronSchedule"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8035,19 +6240,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8073,19 +6270,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8111,19 +6300,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8143,9 +6324,7 @@ "post": { "operationId": "updateCacheConfiguration", "summary": "Update cache configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update cache configuration", "requestBody": { "content": { @@ -8160,9 +6339,7 @@ "type": "string" } }, - "required": [ - "clearCacheCronSchedule" - ] + "required": ["clearCacheCronSchedule"] } } }, @@ -8179,18 +6356,12 @@ "result": { "type": "object", "properties": { - "clearCacheCronSchedule": { - "type": "string" - } + "clearCacheCronSchedule": { "type": "string" } }, - "required": [ - "clearCacheCronSchedule" - ] + "required": ["clearCacheCronSchedule"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8206,19 +6377,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8244,19 +6407,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8282,19 +6437,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8316,9 +6463,7 @@ "get": { "operationId": "getContractSubscriptionsConfiguration", "summary": "Get Contract Subscriptions configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get the configuration for Contract Subscriptions", "responses": { "200": { @@ -8331,9 +6476,7 @@ "result": { "type": "object", "properties": { - "maxBlocksToIndex": { - "type": "number" - }, + "maxBlocksToIndex": { "type": "number" }, "contractSubscriptionsRequeryDelaySeconds": { "type": "string" } @@ -8344,9 +6487,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8362,19 +6503,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8400,19 +6533,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8438,19 +6563,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8470,9 +6587,7 @@ "post": { "operationId": "updateContractSubscriptionsConfiguration", "summary": "Update Contract Subscriptions configuration", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Update the configuration for Contract Subscriptions", "requestBody": { "content": { @@ -8504,9 +6619,7 @@ "result": { "type": "object", "properties": { - "maxBlocksToIndex": { - "type": "number" - }, + "maxBlocksToIndex": { "type": "number" }, "contractSubscriptionsRequeryDelaySeconds": { "type": "string" } @@ -8517,9 +6630,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8535,19 +6646,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8573,19 +6676,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8611,19 +6706,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8645,9 +6732,7 @@ "get": { "operationId": "getIpAllowlist", "summary": "Get Allowed IP Addresses", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Get the list of allowed IP addresses", "responses": { "200": { @@ -8657,16 +6742,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8682,19 +6760,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8720,19 +6790,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8758,19 +6820,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8790,9 +6844,7 @@ "put": { "operationId": "setIpAllowlist", "summary": "Set IP Allowlist", - "tags": [ - "Configuration" - ], + "tags": ["Configuration"], "description": "Replaces the IP Allowlist array to allow calls to Engine", "requestBody": { "content": { @@ -8810,16 +6862,9 @@ } } }, - "required": [ - "ips" - ] + "required": ["ips"] }, - "example": { - "ips": [ - "8.8.8.8", - "172.217.255.255" - ] - } + "example": { "ips": ["8.8.8.8", "172.217.255.255"] } } }, "required": true @@ -8832,16 +6877,9 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -8857,19 +6895,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8895,19 +6925,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8933,19 +6955,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -8967,9 +6981,7 @@ "get": { "operationId": "getAll", "summary": "Get all webhooks configured", - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "description": "Get all webhooks configuration data set up on Engine", "responses": { "200": { @@ -8984,34 +6996,15 @@ "items": { "type": "object", "properties": { - "url": { - "type": "string" - }, + "url": { "type": "string" }, "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "secret": { - "type": "string" - }, - "eventType": { - "type": "string" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, - "active": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "id": { - "type": "number" - } + "secret": { "type": "string" }, + "eventType": { "type": "string" }, + "active": { "type": "boolean" }, + "createdAt": { "type": "string" }, + "id": { "type": "number" } }, "required": [ "url", @@ -9024,9 +7017,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -9042,19 +7033,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9080,19 +7063,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9118,19 +7093,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9152,9 +7119,7 @@ "post": { "operationId": "create", "summary": "Create a webhook", - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "description": "Create a webhook to call when certain blockchain events occur.", "requestBody": { "content": { @@ -9167,73 +7132,22 @@ "type": "string", "example": "https://example.com/webhook" }, - "name": { - "minLength": 3, - "type": "string" - }, + "name": { "minLength": 3, "type": "string" }, "eventType": { "anyOf": [ - { - "type": "string", - "enum": [ - "queued_transaction" - ] - }, - { - "type": "string", - "enum": [ - "sent_transaction" - ] - }, - { - "type": "string", - "enum": [ - "mined_transaction" - ] - }, - { - "type": "string", - "enum": [ - "errored_transaction" - ] - }, - { - "type": "string", - "enum": [ - "cancelled_transaction" - ] - }, - { - "type": "string", - "enum": [ - "all_transactions" - ] - }, - { - "type": "string", - "enum": [ - "backend_wallet_balance" - ] - }, - { - "type": "string", - "enum": [ - "auth" - ] - }, - { - "type": "string", - "enum": [ - "contract_subscription" - ] - } + { "type": "string", "enum": ["queued_transaction"] }, + { "type": "string", "enum": ["sent_transaction"] }, + { "type": "string", "enum": ["mined_transaction"] }, + { "type": "string", "enum": ["errored_transaction"] }, + { "type": "string", "enum": ["cancelled_transaction"] }, + { "type": "string", "enum": ["all_transactions"] }, + { "type": "string", "enum": ["backend_wallet_balance"] }, + { "type": "string", "enum": ["auth"] }, + { "type": "string", "enum": ["contract_subscription"] } ] } }, - "required": [ - "url", - "eventType" - ] + "required": ["url", "eventType"] }, "examples": { "example1": { @@ -9308,34 +7222,15 @@ "result": { "type": "object", "properties": { - "url": { - "type": "string" - }, + "url": { "type": "string" }, "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "secret": { - "type": "string" - }, - "eventType": { - "type": "string" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, - "active": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "id": { - "type": "number" - } + "secret": { "type": "string" }, + "eventType": { "type": "string" }, + "active": { "type": "boolean" }, + "createdAt": { "type": "string" }, + "id": { "type": "number" } }, "required": [ "url", @@ -9347,9 +7242,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -9365,19 +7258,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9403,19 +7288,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9441,19 +7318,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9475,23 +7344,15 @@ "post": { "operationId": "revoke", "summary": "Revoke webhook", - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "description": "Revoke a Webhook", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "id": { - "type": "number" - } - }, - "required": [ - "id" - ] + "properties": { "id": { "type": "number" } }, + "required": ["id"] } } }, @@ -9507,19 +7368,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -9535,19 +7388,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9573,19 +7418,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9611,19 +7448,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9645,9 +7474,7 @@ "get": { "operationId": "getEventTypes", "summary": "Get webhooks event types", - "tags": [ - "Webhooks" - ], + "tags": ["Webhooks"], "description": "Get the all the webhooks event types", "responses": { "200": { @@ -9661,67 +7488,29 @@ "type": "array", "items": { "anyOf": [ + { "type": "string", "enum": ["queued_transaction"] }, + { "type": "string", "enum": ["sent_transaction"] }, + { "type": "string", "enum": ["mined_transaction"] }, + { "type": "string", "enum": ["errored_transaction"] }, { "type": "string", - "enum": [ - "queued_transaction" - ] - }, - { - "type": "string", - "enum": [ - "sent_transaction" - ] - }, - { - "type": "string", - "enum": [ - "mined_transaction" - ] - }, - { - "type": "string", - "enum": [ - "errored_transaction" - ] - }, - { - "type": "string", - "enum": [ - "cancelled_transaction" - ] - }, - { - "type": "string", - "enum": [ - "all_transactions" - ] - }, - { - "type": "string", - "enum": [ - "backend_wallet_balance" - ] + "enum": ["cancelled_transaction"] }, + { "type": "string", "enum": ["all_transactions"] }, { "type": "string", - "enum": [ - "auth" - ] + "enum": ["backend_wallet_balance"] }, + { "type": "string", "enum": ["auth"] }, { "type": "string", - "enum": [ - "contract_subscription" - ] + "enum": ["contract_subscription"] } ] } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -9737,19 +7526,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9775,19 +7556,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9813,19 +7586,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9847,9 +7612,7 @@ "get": { "operationId": "getAll", "summary": "Get all permissions", - "tags": [ - "Permissions" - ], + "tags": ["Permissions"], "description": "Get all users with their corresponding permissions", "responses": { "200": { @@ -9870,31 +7633,16 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "permissions": { - "type": "string" - }, + "permissions": { "type": "string" }, "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] } }, - "required": [ - "walletAddress", - "permissions", - "label" - ] + "required": ["walletAddress", "permissions", "label"] } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -9910,19 +7658,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9948,19 +7688,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -9986,19 +7718,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10020,9 +7744,7 @@ "post": { "operationId": "grant", "summary": "Grant permissions to user", - "tags": [ - "Permissions" - ], + "tags": ["Permissions"], "description": "Grant permissions to a user", "requestBody": { "content": { @@ -10038,28 +7760,13 @@ }, "permissions": { "anyOf": [ - { - "type": "string", - "enum": [ - "ADMIN" - ] - }, - { - "type": "string", - "enum": [ - "OWNER" - ] - } + { "type": "string", "enum": ["ADMIN"] }, + { "type": "string", "enum": ["OWNER"] } ] }, - "label": { - "type": "string" - } + "label": { "type": "string" } }, - "required": [ - "walletAddress", - "permissions" - ] + "required": ["walletAddress", "permissions"] } } }, @@ -10075,19 +7782,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -10103,19 +7802,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10141,19 +7832,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10179,19 +7862,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10213,9 +7888,7 @@ "post": { "operationId": "revoke", "summary": "Revoke permissions from user", - "tags": [ - "Permissions" - ], + "tags": ["Permissions"], "description": "Revoke a user's permissions", "requestBody": { "content": { @@ -10230,9 +7903,7 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "required": [ - "walletAddress" - ] + "required": ["walletAddress"] } } }, @@ -10248,19 +7919,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -10276,19 +7939,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10314,19 +7969,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10352,19 +7999,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10386,9 +8025,7 @@ "get": { "operationId": "getAll", "summary": "Get all access tokens", - "tags": [ - "Access Tokens" - ], + "tags": ["Access Tokens"], "description": "Get all access tokens", "responses": { "200": { @@ -10403,33 +8040,18 @@ "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "tokenMask": { - "type": "string" - }, + "id": { "type": "string" }, + "tokenMask": { "type": "string" }, "walletAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "createdAt": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, + "createdAt": { "type": "string" }, + "expiresAt": { "type": "string" }, "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] } }, "required": [ @@ -10443,9 +8065,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -10461,19 +8081,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10499,19 +8111,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10537,19 +8141,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10571,20 +8167,14 @@ "post": { "operationId": "create", "summary": "Create a new access token", - "tags": [ - "Access Tokens" - ], + "tags": ["Access Tokens"], "description": "Create a new access token", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "label": { - "type": "string" - } - } + "properties": { "label": { "type": "string" } } } } } @@ -10600,37 +8190,20 @@ "result": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "tokenMask": { - "type": "string" - }, + "id": { "type": "string" }, + "tokenMask": { "type": "string" }, "walletAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "createdAt": { - "type": "string" - }, - "expiresAt": { - "type": "string" - }, + "createdAt": { "type": "string" }, + "expiresAt": { "type": "string" }, "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, - "accessToken": { - "type": "string" - } + "accessToken": { "type": "string" } }, "required": [ "id", @@ -10643,9 +8216,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -10661,19 +8232,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10699,19 +8262,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10737,19 +8292,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10771,23 +8318,15 @@ "post": { "operationId": "revoke", "summary": "Revoke an access token", - "tags": [ - "Access Tokens" - ], + "tags": ["Access Tokens"], "description": "Revoke an access token", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ] + "properties": { "id": { "type": "string" } }, + "required": ["id"] } } }, @@ -10803,19 +8342,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -10831,19 +8362,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10869,19 +8392,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10907,19 +8422,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -10941,9 +8448,7 @@ "post": { "operationId": "update", "summary": "Update an access token", - "tags": [ - "Access Tokens" - ], + "tags": ["Access Tokens"], "description": "Update an access token", "requestBody": { "content": { @@ -10951,16 +8456,10 @@ "schema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - } + "id": { "type": "string" }, + "label": { "type": "string" } }, - "required": [ - "id" - ] + "required": ["id"] } } }, @@ -10976,19 +8475,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -11004,19 +8495,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11042,19 +8525,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11080,19 +8555,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11114,9 +8581,7 @@ "get": { "operationId": "list", "summary": "List public keys", - "tags": [ - "Keypair" - ], + "tags": ["Keypair"], "description": "List the public keys configured with Engine", "responses": { "200": { @@ -11168,9 +8633,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -11186,19 +8649,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11224,19 +8679,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11262,19 +8709,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11296,9 +8735,7 @@ "post": { "operationId": "add", "summary": "Add public key", - "tags": [ - "Keypair" - ], + "tags": ["Keypair"], "description": "Add the public key for a keypair", "requestBody": { "content": { @@ -11312,70 +8749,20 @@ }, "algorithm": { "anyOf": [ - { - "type": "string", - "enum": [ - "RS256" - ] - }, - { - "type": "string", - "enum": [ - "RS384" - ] - }, - { - "type": "string", - "enum": [ - "RS512" - ] - }, - { - "type": "string", - "enum": [ - "ES256" - ] - }, - { - "type": "string", - "enum": [ - "ES384" - ] - }, - { - "type": "string", - "enum": [ - "ES512" - ] - }, - { - "type": "string", - "enum": [ - "PS256" - ] - }, - { - "type": "string", - "enum": [ - "PS384" - ] - }, - { - "type": "string", - "enum": [ - "PS512" - ] - } + { "type": "string", "enum": ["RS256"] }, + { "type": "string", "enum": ["RS384"] }, + { "type": "string", "enum": ["RS512"] }, + { "type": "string", "enum": ["ES256"] }, + { "type": "string", "enum": ["ES384"] }, + { "type": "string", "enum": ["ES512"] }, + { "type": "string", "enum": ["PS256"] }, + { "type": "string", "enum": ["PS384"] }, + { "type": "string", "enum": ["PS512"] } ] }, - "label": { - "type": "string" - } + "label": { "type": "string" } }, - "required": [ - "publicKey", - "algorithm" - ] + "required": ["publicKey", "algorithm"] } } }, @@ -11431,14 +8818,10 @@ ] } }, - "required": [ - "keypair" - ] + "required": ["keypair"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -11454,19 +8837,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11492,19 +8867,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11530,19 +8897,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11564,23 +8923,15 @@ "post": { "operationId": "remove", "summary": "Remove public key", - "tags": [ - "Keypair" - ], + "tags": ["Keypair"], "description": "Remove the public key for a keypair", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "hash": { - "type": "string" - } - }, - "required": [ - "hash" - ] + "properties": { "hash": { "type": "string" } }, + "required": ["hash"] } } }, @@ -11596,19 +8947,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -11624,19 +8967,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11662,19 +8997,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11700,19 +9027,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11734,22 +9053,14 @@ "get": { "operationId": "get", "summary": "Get chain details", - "tags": [ - "Chain" - ], + "tags": ["Chain"], "description": "Get details about a chain.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "examples": { - "1": { - "value": "1" - }, - "ethereum": { - "value": "ethereum" - } + "1": { "value": "1" }, + "ethereum": { "value": "ethereum" } }, "in": "query", "name": "chain", @@ -11799,11 +9110,7 @@ "type": "number" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] }, "shortName": { "description": "Chain short name", @@ -11824,9 +9131,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": { @@ -11860,19 +9165,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11898,19 +9195,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11936,19 +9225,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -11970,9 +9251,7 @@ "get": { "operationId": "getAll", "summary": "Get all chain details", - "tags": [ - "Chain" - ], + "tags": ["Chain"], "description": "Get details about all supported chains.", "responses": { "200": { @@ -12018,11 +9297,7 @@ "type": "number" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] }, "shortName": { "description": "Chain short name", @@ -12044,9 +9319,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -12098,19 +9371,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12136,19 +9401,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12174,19 +9431,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12208,9 +9457,7 @@ "get": { "operationId": "getAll", "summary": "Get all meta-transaction relayers", - "tags": [ - "Relayer" - ], + "tags": ["Relayer"], "description": "Get all meta-transaction relayers", "responses": { "200": { @@ -12225,22 +9472,11 @@ "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, + "id": { "type": "string" }, "name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] - }, - "chainId": { - "type": "string" + "anyOf": [{ "type": "string" }, { "type": "null" }] }, + "chainId": { "type": "string" }, "backendWalletAddress": { "description": "A contract or wallet address", "type": "string", @@ -12251,26 +9487,18 @@ "anyOf": [ { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, - { - "type": "null" - } + { "type": "null" } ] }, "allowedForwarders": { "anyOf": [ { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -12285,9 +9513,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -12303,19 +9529,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12341,19 +9559,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12379,19 +9589,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12413,9 +9615,7 @@ "post": { "operationId": "create", "summary": "Create a new meta-transaction relayer", - "tags": [ - "Relayer" - ], + "tags": ["Relayer"], "description": "Create a new meta-transaction relayer", "requestBody": { "content": { @@ -12423,12 +9623,8 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "chain": { - "type": "string" - }, + "name": { "type": "string" }, + "chain": { "type": "string" }, "backendWalletAddress": { "description": "The address of the backend wallet to use for relaying transactions.", "type": "string", @@ -12454,21 +9650,14 @@ } } }, - "required": [ - "chain", - "backendWalletAddress" - ] + "required": ["chain", "backendWalletAddress"] }, "example": { "name": "My relayer", "chain": "mainnet", "backendWalletAddress": "0", - "allowedContracts": [ - "0x1234...." - ], - "allowedForwarders": [ - "0x1234..." - ] + "allowedContracts": ["0x1234...."], + "allowedForwarders": ["0x1234..."] } } }, @@ -12484,19 +9673,11 @@ "properties": { "result": { "type": "object", - "properties": { - "relayerId": { - "type": "string" - } - }, - "required": [ - "relayerId" - ] + "properties": { "relayerId": { "type": "string" } }, + "required": ["relayerId"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -12512,19 +9693,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12550,19 +9723,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12588,19 +9753,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12622,23 +9779,15 @@ "post": { "operationId": "revoke", "summary": "Revoke a relayer", - "tags": [ - "Relayer" - ], + "tags": ["Relayer"], "description": "Revoke a relayer", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ] + "properties": { "id": { "type": "string" } }, + "required": ["id"] } } }, @@ -12654,19 +9803,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -12682,19 +9823,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12720,19 +9853,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12758,19 +9883,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12792,9 +9909,7 @@ "post": { "operationId": "update", "summary": "Update a relayer", - "tags": [ - "Relayer" - ], + "tags": ["Relayer"], "description": "Update a relayer", "requestBody": { "content": { @@ -12802,15 +9917,9 @@ "schema": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "chain": { - "type": "string" - }, + "id": { "type": "string" }, + "name": { "type": "string" }, + "chain": { "type": "string" }, "backendWalletAddress": { "description": "A contract or wallet address", "type": "string", @@ -12819,20 +9928,14 @@ }, "allowedContracts": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "allowedForwarders": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "id" - ] + "required": ["id"] } } }, @@ -12848,19 +9951,11 @@ "properties": { "result": { "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ] + "properties": { "success": { "type": "boolean" } }, + "required": ["success"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -12876,19 +9971,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12914,19 +10001,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12952,19 +10031,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -12986,9 +10057,7 @@ "post": { "operationId": "relay", "summary": "Relay a meta-transaction", - "tags": [ - "Relayer" - ], + "tags": ["Relayer"], "description": "Relay an EIP-2771 meta-transaction", "requestBody": { "content": { @@ -12998,36 +10067,17 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "forward" - ] - }, + "type": { "type": "string", "enum": ["forward"] }, "request": { "type": "object", "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "value": { - "type": "string" - }, - "gas": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "data": { - "type": "string" - }, - "chainid": { - "type": "string" - } + "from": { "type": "string" }, + "to": { "type": "string" }, + "value": { "type": "string" }, + "gas": { "type": "string" }, + "nonce": { "type": "string" }, + "data": { "type": "string" }, + "chainid": { "type": "string" } }, "required": [ "from", @@ -13038,9 +10088,7 @@ "data" ] }, - "signature": { - "type": "string" - }, + "signature": { "type": "string" }, "forwarderAddress": { "description": "A contract or wallet address", "examples": [ @@ -13060,33 +10108,16 @@ { "type": "object", "properties": { - "type": { - "type": "string", - "enum": [ - "permit" - ] - }, + "type": { "type": "string", "enum": ["permit"] }, "request": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "owner": { - "type": "string" - }, - "spender": { - "type": "string" - }, - "value": { - "type": "string" - }, - "nonce": { - "type": "string" - }, - "deadline": { - "type": "string" - } + "to": { "type": "string" }, + "owner": { "type": "string" }, + "spender": { "type": "string" }, + "value": { "type": "string" }, + "nonce": { "type": "string" }, + "deadline": { "type": "string" } }, "required": [ "to", @@ -13097,53 +10128,29 @@ "deadline" ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "type", - "request", - "signature" - ] + "required": ["type", "request", "signature"] }, { "type": "object", "properties": { "type": { "type": "string", - "enum": [ - "execute-meta-transaction" - ] + "enum": ["execute-meta-transaction"] }, "request": { "type": "object", "properties": { - "from": { - "type": "string" - }, - "to": { - "type": "string" - }, - "data": { - "type": "string" - } + "from": { "type": "string" }, + "to": { "type": "string" }, + "data": { "type": "string" } }, - "required": [ - "from", - "to", - "data" - ] + "required": ["from", "to", "data"] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "type", - "request", - "signature" - ] + "required": ["type", "request", "signature"] } ] } @@ -13152,9 +10159,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "path", "name": "relayerId", "required": true @@ -13176,14 +10181,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -13204,19 +10205,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13242,19 +10235,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13280,19 +10265,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13314,15 +10291,11 @@ "get": { "operationId": "read", "summary": "Read from contract", - "tags": [ - "Contract" - ], + "tags": ["Contract"], "description": "Call a read function on a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "balanceOf", "in": "query", "name": "functionName", @@ -13330,9 +10303,7 @@ "description": "Name of the function to call on Contract" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "", "in": "query", "name": "args", @@ -13340,9 +10311,7 @@ "description": "Arguments for the function. Comma Separated" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -13350,10 +10319,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -13368,12 +10334,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": {} - }, - "required": [ - "result" - ] + "properties": { "result": {} }, + "required": ["result"] } } } @@ -13389,19 +10351,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13427,19 +10381,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13465,19 +10411,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13499,9 +10437,7 @@ "post": { "operationId": "write", "summary": "Write to contract", - "tags": [ - "Contract" - ], + "tags": ["Contract"], "description": "Call a write function on a contract.", "requestBody": { "content": { @@ -13548,43 +10484,25 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } @@ -13596,52 +10514,31 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } } } }, - "stateMutability": { - "type": "string" - } + "stateMutability": { "type": "string" } }, - "required": [ - "type" - ] + "required": ["type"] } } }, - "required": [ - "functionName", - "args" - ] + "required": ["functionName", "args"] } } }, @@ -13649,19 +10546,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -13669,10 +10561,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -13680,10 +10569,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -13691,19 +10577,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -13711,10 +10592,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -13738,14 +10616,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -13762,22 +10636,13 @@ "get": { "operationId": "getAllEvents", "summary": "Get all events", - "tags": [ - "Contract-Events" - ], + "tags": ["Contract-Events"], "description": "Get a list of all blockchain events for this contract.", "parameters": [ { "schema": { "default": "0", - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "in": "query", "name": "fromBlock", @@ -13787,14 +10652,8 @@ "schema": { "default": "latest", "anyOf": [ - { - "default": 0, - "type": "number" - }, - { - "default": "0", - "type": "string" - } + { "default": 0, "type": "number" }, + { "default": "0", "type": "string" } ] }, "in": "query", @@ -13805,18 +10664,8 @@ "schema": { "default": "desc", "anyOf": [ - { - "type": "string", - "enum": [ - "asc" - ] - }, - { - "type": "string", - "enum": [ - "desc" - ] - } + { "type": "string", "enum": ["asc"] }, + { "type": "string", "enum": ["desc"] } ] }, "in": "query", @@ -13824,9 +10673,7 @@ "required": false }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -13834,10 +10681,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -13855,15 +10699,10 @@ "properties": { "result": { "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - } + "items": { "type": "object", "additionalProperties": {} } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { @@ -13871,10 +10710,7 @@ "data": { "from": "0x0000000000000000000000000000000000000000", "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", - "tokenId": { - "type": "BigNumber", - "hex": "0x01" - } + "tokenId": { "type": "BigNumber", "hex": "0x01" } }, "transaction": { "blockNumber": 35439713, @@ -13912,19 +10748,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13950,19 +10778,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -13988,19 +10808,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14022,9 +10834,7 @@ "post": { "operationId": "getEvents", "summary": "Get events", - "tags": [ - "Contract-Events" - ], + "tags": ["Contract-Events"], "description": "Get a list of specific blockchain events emitted from this contract.", "requestBody": { "content": { @@ -14033,59 +10843,28 @@ "description": "Specify the from and to block numbers to get events for, defaults to all blocks", "type": "object", "properties": { - "eventName": { - "type": "string", - "example": "Transfer" - }, + "eventName": { "type": "string", "example": "Transfer" }, "fromBlock": { "default": "0", - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "toBlock": { "default": "latest", "anyOf": [ - { - "default": 0, - "type": "number" - }, - { - "default": "0", - "type": "string" - } + { "default": 0, "type": "number" }, + { "default": "0", "type": "string" } ] }, "order": { "default": "desc", "anyOf": [ - { - "type": "string", - "enum": [ - "asc" - ] - }, - { - "type": "string", - "enum": [ - "desc" - ] - } + { "type": "string", "enum": ["asc"] }, + { "type": "string", "enum": ["desc"] } ] }, - "filters": { - "type": "object", - "properties": {} - } + "filters": { "type": "object", "properties": {} } }, - "required": [ - "eventName" - ] + "required": ["eventName"] } } }, @@ -14094,9 +10873,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -14104,10 +10881,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -14125,15 +10899,10 @@ "properties": { "result": { "type": "array", - "items": { - "type": "object", - "additionalProperties": {} - } + "items": { "type": "object", "additionalProperties": {} } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "eventName": "ApprovalForAll", @@ -14176,19 +10945,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14214,19 +10975,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14252,19 +11005,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14286,15 +11031,11 @@ "get": { "operationId": "getAbi", "summary": "Get ABI", - "tags": [ - "Contract-Metadata" - ], + "tags": ["Contract-Metadata"], "description": "Get the ABI of a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -14302,10 +11043,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -14326,43 +11064,25 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } @@ -14374,87 +11094,49 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } } } }, - "stateMutability": { - "type": "string" - } + "stateMutability": { "type": "string" } }, - "required": [ - "type" - ] + "required": ["type"] } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { "type": "function", "name": "transferFrom", "inputs": [ - { - "type": "address", - "name": "from" - }, - { - "type": "address", - "name": "to" - }, - { - "type": "uint256", - "name": "tokenId" - } + { "type": "address", "name": "from" }, + { "type": "address", "name": "to" }, + { "type": "uint256", "name": "tokenId" } ] }, { "type": "event", "name": "Transfer", "inputs": [ - { - "type": "address", - "name": "from" - }, - { - "type": "address", - "name": "to" - }, - { - "type": "uint256", - "name": "tokenId" - } + { "type": "address", "name": "from" }, + { "type": "address", "name": "to" }, + { "type": "uint256", "name": "tokenId" } ] } ] @@ -14474,19 +11156,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14512,19 +11186,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14550,19 +11216,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14584,15 +11242,11 @@ "get": { "operationId": "getEvents", "summary": "Get events", - "tags": [ - "Contract-Metadata" - ], + "tags": ["Contract-Metadata"], "description": "Get details of all events implemented by a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -14600,10 +11254,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -14624,40 +11275,24 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, + "name": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } @@ -14669,88 +11304,48 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } } } }, - "comment": { - "type": "string" - } + "comment": { "type": "string" } }, - "required": [ - "name", - "inputs", - "outputs" - ] + "required": ["name", "inputs", "outputs"] } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { "name": "Approval", "inputs": [ - { - "type": "address", - "name": "owner" - }, - { - "type": "address", - "name": "approved" - }, - { - "type": "uint256", - "name": "tokenId" - } + { "type": "address", "name": "owner" }, + { "type": "address", "name": "approved" }, + { "type": "uint256", "name": "tokenId" } ], "outputs": [] }, { "name": "ApprovalForAll", "inputs": [ - { - "type": "address", - "name": "owner" - }, - { - "type": "address", - "name": "operator" - }, - { - "type": "bool", - "name": "approved" - } + { "type": "address", "name": "owner" }, + { "type": "address", "name": "operator" }, + { "type": "bool", "name": "approved" } ], "outputs": [] } @@ -14771,19 +11366,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14809,19 +11396,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14847,19 +11426,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14881,15 +11452,11 @@ "get": { "operationId": "getExtensions", "summary": "Get extensions", - "tags": [ - "Contract-Metadata" - ], + "tags": ["Contract-Metadata"], "description": "Get all detected extensions for a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -14897,10 +11464,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -14919,14 +11483,10 @@ "result": { "description": "Array of detected extension names", "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ "ERC721", @@ -14960,19 +11520,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -14998,19 +11550,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15036,19 +11580,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15070,15 +11606,11 @@ "get": { "operationId": "getFunctions", "summary": "Get functions", - "tags": [ - "Contract-Metadata" - ], + "tags": ["Contract-Metadata"], "description": "Get details of all functions implemented by the contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -15086,10 +11618,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -15110,40 +11639,24 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, + "name": { "type": "string" }, "inputs": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } @@ -15155,47 +11668,27 @@ "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - }, - "stateMutability": { - "type": "string" - }, + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" }, + "stateMutability": { "type": "string" }, "components": { "type": "array", "items": { "type": "object", "properties": { - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "internalType": { - "type": "string" - } + "type": { "type": "string" }, + "name": { "type": "string" }, + "internalType": { "type": "string" } } } } } } }, - "comment": { - "type": "string" - }, - "signature": { - "type": "string" - }, - "stateMutability": { - "type": "string" - } + "comment": { "type": "string" }, + "signature": { "type": "string" }, + "stateMutability": { "type": "string" } }, "required": [ "name", @@ -15207,37 +11700,20 @@ } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { "name": "balanceOf", - "inputs": [ - { - "type": "address", - "name": "owner" - } - ], - "outputs": [ - { - "type": "uint256", - "name": "" - } - ], + "inputs": [{ "type": "address", "name": "owner" }], + "outputs": [{ "type": "uint256", "name": "" }], "comment": "See {IERC721-balanceOf}.", "signature": "contract.call(\"balanceOf\", owner: string): Promise\u003CBigNumber\u003E", "stateMutability": "view" }, { "name": "burn", - "inputs": [ - { - "type": "uint256", - "name": "tokenId" - } - ], + "inputs": [{ "type": "uint256", "name": "tokenId" }], "outputs": [], "comment": "Burns `tokenId`. See {ERC721-_burn}.", "signature": "contract.call(\"burn\", tokenId: BigNumberish): Promise\u003CTransactionResult\u003E", @@ -15260,19 +11736,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15298,19 +11766,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15336,19 +11796,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15370,24 +11822,18 @@ "get": { "operationId": "getRole", "summary": "Get wallets for role", - "tags": [ - "Contract-Roles" - ], + "tags": ["Contract-Roles"], "description": "Get all wallets with a specific role for a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "role", "required": true, "description": "The role to list wallet members" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -15395,10 +11841,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -15414,21 +11857,12 @@ "schema": { "type": "object", "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } + "result": { "type": "array", "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { - "result": [ - "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473" - ] + "result": ["0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473"] } } } @@ -15444,19 +11878,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15482,19 +11908,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15520,19 +11938,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15554,15 +11964,11 @@ "get": { "operationId": "getAll", "summary": "Get wallets for all roles", - "tags": [ - "Contract-Roles" - ], + "tags": ["Contract-Roles"], "description": "Get all wallets in each role for a contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -15570,10 +11976,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -15594,57 +11997,39 @@ "properties": { "admin": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "transfer": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "minter": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "pauser": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "lister": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "asset": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "unwrap": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "factory": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "signer": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -15660,9 +12045,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -15678,19 +12061,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15716,19 +12091,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15754,19 +12121,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -15788,9 +12147,7 @@ "post": { "operationId": "grant", "summary": "Grant role", - "tags": [ - "Contract-Roles" - ], + "tags": ["Contract-Roles"], "description": "Grant a role to a specific wallet.", "requestBody": { "content": { @@ -15834,10 +12191,7 @@ } } }, - "required": [ - "role", - "address" - ] + "required": ["role", "address"] } } }, @@ -15845,19 +12199,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -15865,10 +12214,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -15876,10 +12222,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -15887,19 +12230,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -15907,10 +12245,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -15934,14 +12269,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -15962,19 +12293,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16000,19 +12323,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16038,19 +12353,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16072,9 +12379,7 @@ "post": { "operationId": "revoke", "summary": "Revoke role", - "tags": [ - "Contract-Roles" - ], + "tags": ["Contract-Roles"], "description": "Revoke a role from a specific wallet.", "requestBody": { "content": { @@ -16118,10 +12423,7 @@ } } }, - "required": [ - "role", - "address" - ] + "required": ["role", "address"] } } }, @@ -16129,19 +12431,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -16149,10 +12446,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -16160,10 +12454,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16171,19 +12462,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16191,10 +12477,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16218,14 +12501,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -16246,19 +12525,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16284,19 +12555,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16322,19 +12585,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16356,15 +12611,11 @@ "get": { "operationId": "getDefaultRoyaltyInfo", "summary": "Get royalty details", - "tags": [ - "Contract-Royalties" - ], + "tags": ["Contract-Royalties"], "description": "Gets the royalty recipient and BPS (basis points) of the smart contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -16372,10 +12623,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -16403,15 +12651,10 @@ "type": "string" } }, - "required": [ - "seller_fee_basis_points", - "fee_recipient" - ] + "required": ["seller_fee_basis_points", "fee_recipient"] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": { @@ -16433,19 +12676,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16471,19 +12706,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16509,19 +12736,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16543,23 +12762,17 @@ "get": { "operationId": "getTokenRoyaltyInfo", "summary": "Get token royalty details", - "tags": [ - "Contract-Royalties" - ], + "tags": ["Contract-Royalties"], "description": "Gets the royalty recipient and BPS (basis points) of a particular token in the contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "path", "name": "tokenId", "required": true }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -16567,10 +12780,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -16598,15 +12808,10 @@ "type": "string" } }, - "required": [ - "seller_fee_basis_points", - "fee_recipient" - ] + "required": ["seller_fee_basis_points", "fee_recipient"] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": { @@ -16628,19 +12833,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16666,19 +12863,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16704,19 +12893,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16738,9 +12919,7 @@ "post": { "operationId": "setDefaultRoyaltyInfo", "summary": "Set royalty details", - "tags": [ - "Contract-Royalties" - ], + "tags": ["Contract-Royalties"], "description": "Set the royalty recipient and fee for the smart contract.", "requestBody": { "content": { @@ -16782,10 +12961,7 @@ } } }, - "required": [ - "seller_fee_basis_points", - "fee_recipient" - ] + "required": ["seller_fee_basis_points", "fee_recipient"] }, "example": { "fee_recipient": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -16797,19 +12973,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -16817,10 +12988,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -16828,10 +12996,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -16839,19 +13004,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -16859,10 +13019,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -16886,14 +13043,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -16914,19 +13067,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16952,19 +13097,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -16990,19 +13127,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17024,9 +13153,7 @@ "post": { "operationId": "setTokenRoyaltyInfo", "summary": "Set token royalty details", - "tags": [ - "Contract-Royalties" - ], + "tags": ["Contract-Royalties"], "description": "Set the royalty recipient and fee for a particular token in the contract.", "requestBody": { "content": { @@ -17089,19 +13216,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -17109,10 +13231,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -17120,10 +13239,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -17131,19 +13247,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -17151,10 +13262,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -17178,14 +13286,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -17206,19 +13310,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17244,19 +13340,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17282,19 +13370,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17316,9 +13396,7 @@ "post": { "operationId": "deployEdition", "summary": "Deploy Edition", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy an Edition contract.", "requestBody": { "content": { @@ -17329,24 +13407,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -17357,10 +13423,7 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { - "default": "", - "type": "string" - }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -17371,15 +13434,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -17396,45 +13455,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -17462,9 +13499,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -17479,9 +13514,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -17489,10 +13522,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -17500,19 +13530,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -17520,10 +13545,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -17542,9 +13564,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -17554,9 +13574,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -17572,19 +13590,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17610,19 +13620,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17648,19 +13650,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17682,9 +13676,7 @@ "post": { "operationId": "deployEditionDrop", "summary": "Deploy Edition Drop", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy an Edition Drop contract.", "requestBody": { "content": { @@ -17695,24 +13687,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -17725,14 +13705,9 @@ }, "merkle": { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "symbol": { - "default": "", - "type": "string" + "additionalProperties": { "type": "string" } }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -17743,15 +13718,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -17768,45 +13739,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -17834,9 +13783,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -17851,9 +13798,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -17861,10 +13806,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -17872,19 +13814,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -17892,10 +13829,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -17914,9 +13848,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -17926,9 +13858,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -17944,19 +13874,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -17982,19 +13904,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18020,19 +13934,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18054,9 +13960,7 @@ "post": { "operationId": "deployMarketplaceV3", "summary": "Deploy Marketplace", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Marketplace contract.", "requestBody": { "content": { @@ -18067,24 +13971,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -18098,9 +13990,7 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -18114,45 +14004,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] + "enum": ["zksolc"] }, - "compilerVersion": { - "type": "string" - }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -18180,24 +14048,16 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, - "example": { - "contractMetadata": { - "name": "My Marketplace" - } - } + "example": { "contractMetadata": { "name": "My Marketplace" } } } }, "required": true }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -18205,10 +14065,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -18216,19 +14073,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -18236,10 +14088,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -18258,9 +14107,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -18270,9 +14117,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -18288,19 +14133,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18326,19 +14163,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18364,19 +14193,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18398,9 +14219,7 @@ "post": { "operationId": "deployMultiwrap", "summary": "Deploy Multiwrap", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Multiwrap contract.", "requestBody": { "content": { @@ -18411,24 +14230,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -18439,16 +14246,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { - "default": "", - "type": "string" - }, + "symbol": { "default": "", "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -18463,45 +14265,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] + "enum": ["zksolc"] }, - "compilerVersion": { - "type": "string" - }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -18529,15 +14309,10 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { - "contractMetadata": { - "name": "My Multiwrap", - "symbol": "Mw" - } + "contractMetadata": { "name": "My Multiwrap", "symbol": "Mw" } } } }, @@ -18545,9 +14320,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -18555,10 +14328,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -18566,19 +14336,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -18586,10 +14351,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -18608,9 +14370,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -18620,9 +14380,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -18638,19 +14396,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18676,19 +14426,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18714,19 +14456,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -18748,9 +14482,7 @@ "post": { "operationId": "deployNFTCollection", "summary": "Deploy NFT Collection", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy an NFT Collection contract.", "requestBody": { "content": { @@ -18761,24 +14493,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -18789,10 +14509,7 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { - "default": "", - "type": "string" - }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -18803,15 +14520,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -18828,45 +14541,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] + "enum": ["zksolc"] }, - "compilerVersion": { - "type": "string" - }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -18894,9 +14585,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -18910,9 +14599,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -18920,10 +14607,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -18931,19 +14615,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -18951,10 +14630,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -18973,9 +14649,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -18985,9 +14659,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -19003,19 +14675,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19041,19 +14705,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19079,19 +14735,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19113,9 +14761,7 @@ "post": { "operationId": "deployNFTDrop", "summary": "Deploy NFT Drop", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy an NFT Drop contract.", "requestBody": { "content": { @@ -19126,24 +14772,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19156,14 +14790,9 @@ }, "merkle": { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "symbol": { - "default": "", - "type": "string" + "additionalProperties": { "type": "string" } }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19174,15 +14803,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -19199,45 +14824,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -19265,9 +14868,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -19282,9 +14883,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -19292,10 +14891,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -19303,19 +14899,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -19323,10 +14914,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -19345,9 +14933,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -19357,9 +14943,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -19375,19 +14959,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19413,19 +14989,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19451,19 +15019,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19485,9 +15045,7 @@ "post": { "operationId": "deployPack", "summary": "Deploy Pack", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Pack contract.", "requestBody": { "content": { @@ -19498,24 +15056,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19526,10 +15072,7 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "symbol": { - "default": "", - "type": "string" - }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19543,9 +15086,7 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -19562,45 +15103,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] + "enum": ["zksolc"] }, - "compilerVersion": { - "type": "string" - }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -19628,15 +15147,10 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { - "contractMetadata": { - "name": "My Pack", - "symbol": "PACK" - } + "contractMetadata": { "name": "My Pack", "symbol": "PACK" } } } }, @@ -19644,9 +15158,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -19654,10 +15166,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -19665,19 +15174,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -19685,10 +15189,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -19707,9 +15208,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -19719,9 +15218,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -19737,19 +15234,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19775,19 +15264,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19813,19 +15294,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -19847,9 +15320,7 @@ "post": { "operationId": "deploySignatureDrop", "summary": "Deploy Signature Drop", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Signature Drop contract.", "requestBody": { "content": { @@ -19860,24 +15331,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "seller_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19890,14 +15349,9 @@ }, "merkle": { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "symbol": { - "default": "", - "type": "string" + "additionalProperties": { "type": "string" } }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -19908,15 +15362,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -19933,45 +15383,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -19999,9 +15427,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -20016,9 +15442,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -20026,10 +15450,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -20037,19 +15458,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -20057,10 +15473,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -20079,9 +15492,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -20091,9 +15502,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -20109,19 +15518,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20147,19 +15548,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20185,19 +15578,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20219,9 +15604,7 @@ "post": { "operationId": "deploySplit", "summary": "Deploy Split", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Split contract.", "requestBody": { "content": { @@ -20232,24 +15615,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "recipients": { "type": "array", "items": { @@ -20267,69 +15638,38 @@ "type": "number" } }, - "required": [ - "address", - "sharesBps" - ] + "required": ["address", "sharesBps"] } }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "name", - "recipients", - "trusted_forwarders" - ] + "required": ["name", "recipients", "trusted_forwarders"] }, "version": { "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -20357,9 +15697,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -20382,9 +15720,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -20392,10 +15728,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -20403,19 +15736,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -20423,10 +15751,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -20445,9 +15770,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -20457,9 +15780,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -20475,19 +15796,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20513,19 +15826,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20551,19 +15856,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20585,9 +15882,7 @@ "post": { "operationId": "deployToken", "summary": "Deploy Token", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Token contract.", "requestBody": { "content": { @@ -20598,28 +15893,13 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, - "symbol": { - "default": "", - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -20630,15 +15910,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -20653,45 +15929,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -20719,9 +15973,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -20736,9 +15988,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -20746,10 +15996,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -20757,19 +16004,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -20777,10 +16019,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -20799,9 +16038,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -20811,9 +16048,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -20829,19 +16064,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20867,19 +16094,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20905,19 +16124,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -20939,9 +16150,7 @@ "post": { "operationId": "deployTokenDrop", "summary": "Deploy Token Drop", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Token Drop contract.", "requestBody": { "content": { @@ -20952,34 +16161,17 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "merkle": { "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "symbol": { - "default": "", - "type": "string" + "additionalProperties": { "type": "string" } }, + "symbol": { "default": "", "type": "string" }, "platform_fee_basis_points": { "maximum": 10000, "minimum": 0, @@ -20990,15 +16182,11 @@ "default": "0x0000000000000000000000000000000000000000", "type": "string" }, - "primary_sale_recipient": { - "type": "string" - }, + "primary_sale_recipient": { "type": "string" }, "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -21013,45 +16201,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -21079,9 +16245,7 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, "example": { "contractMetadata": { @@ -21096,9 +16260,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -21106,10 +16268,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21117,19 +16276,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21137,10 +16291,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21159,9 +16310,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -21171,9 +16320,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -21189,19 +16336,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21227,19 +16366,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21265,19 +16396,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21299,9 +16422,7 @@ "post": { "operationId": "deployVote", "summary": "Deploy Vote", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a Vote contract.", "requestBody": { "content": { @@ -21312,24 +16433,12 @@ "contractMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "image": { - "type": "string" - }, - "external_link": { - "type": "string" - }, - "app_uri": { - "type": "string" - }, - "defaultAdmin": { - "type": "string" - }, + "name": { "type": "string" }, + "description": { "type": "string" }, + "image": { "type": "string" }, + "external_link": { "type": "string" }, + "app_uri": { "type": "string" }, + "defaultAdmin": { "type": "string" }, "voting_delay_in_blocks": { "minimum": 0, "default": 0, @@ -21359,9 +16468,7 @@ "trusted_forwarders": { "default": [], "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -21378,45 +16485,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] - }, - "compilerVersion": { - "type": "string" + "enum": ["zksolc"] }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "txOverrides": { "type": "object", @@ -21444,24 +16529,16 @@ } } }, - "required": [ - "contractMetadata" - ] + "required": ["contractMetadata"] }, - "example": { - "contractMetadata": { - "name": "My Vote" - } - } + "example": { "contractMetadata": { "name": "My Vote" } } } }, "required": true }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -21469,10 +16546,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21480,19 +16554,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21500,10 +16569,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21522,9 +16588,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -21534,9 +16598,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -21552,19 +16614,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21590,19 +16644,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21628,19 +16674,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21662,9 +16700,7 @@ "post": { "operationId": "deployPublished", "summary": "Deploy published contract", - "tags": [ - "Deploy" - ], + "tags": ["Deploy"], "description": "Deploy a published contract to the blockchain.", "requestBody": { "content": { @@ -21676,45 +16712,23 @@ "description": "Version of the contract to deploy. Defaults to latest.", "type": "string" }, - "forceDirectDeploy": { - "type": "boolean" - }, - "saltForProxyDeploy": { - "type": "string" - }, + "forceDirectDeploy": { "type": "boolean" }, + "saltForProxyDeploy": { "type": "string" }, "compilerOptions": { "type": "object", "properties": { "compilerType": { "type": "string", "anyOf": [ - { - "type": "string", - "enum": [ - "solc" - ] - }, - { - "type": "string", - "enum": [ - "string" - ] - } + { "type": "string", "enum": ["solc"] }, + { "type": "string", "enum": ["string"] } ], - "enum": [ - "zksolc" - ] + "enum": ["zksolc"] }, - "compilerVersion": { - "type": "string" - }, - "evmVersion": { - "type": "string" - } + "compilerVersion": { "type": "string" }, + "evmVersion": { "type": "string" } }, - "required": [ - "compilerType" - ] + "required": ["compilerType"] }, "constructorParams": { "description": "Constructor arguments for the deployment.", @@ -21747,9 +16761,7 @@ } } }, - "required": [ - "constructorParams" - ] + "required": ["constructorParams"] }, "example": { "constructorParams": [ @@ -21762,9 +16774,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -21772,9 +16782,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "deployer.thirdweb.eth", "in": "path", "name": "publisher", @@ -21782,9 +16790,7 @@ "description": "Address or ENS of the publisher of the contract" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "AirdropERC20", "in": "path", "name": "contractName", @@ -21792,10 +16798,7 @@ "description": "Name of the published contract to deploy" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -21803,19 +16806,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -21823,10 +16821,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -21842,17 +16837,127 @@ "schema": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "Not all contracts return a deployed address.", "type": "string" }, - "message": { - "type": "string" + "message": { "type": "string" } + } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } } } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/deploy/contract-types": { + "get": { + "operationId": "contractTypes", + "summary": "Get contract types", + "tags": ["Deploy"], + "description": "Get all prebuilt contract types.", + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { "type": "array", "items": { "type": "string" } } + }, + "required": ["result"] } } } @@ -21868,19 +16973,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21906,19 +17003,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -21944,166 +17033,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/deploy/contract-types": { - "get": { - "operationId": "contractTypes", - "summary": "Get contract types", - "tags": [ - "Deploy" - ], - "description": "Get all prebuilt contract types.", - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "result" - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -22125,17 +17059,11 @@ "get": { "operationId": "getAll", "summary": "Get all transactions", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get all transaction requests.", "parameters": [ { - "schema": { - "default": 1, - "minimum": 1, - "type": "integer" - }, + "schema": { "default": 1, "minimum": 1, "type": "integer" }, "example": 1, "in": "query", "name": "page", @@ -22143,10 +17071,7 @@ "description": "Specify the page number." }, { - "schema": { - "default": 100, - "type": "integer" - }, + "schema": { "default": 100, "type": "integer" }, "example": 100, "in": "query", "name": "limit", @@ -22157,30 +17082,10 @@ "schema": { "default": "queued", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["cancelled"] }, + { "type": "string", "enum": ["errored"] } ] }, "in": "query", @@ -22211,44 +17116,17 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "sent" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["sent"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["errored"] }, + { "type": "string", "enum": ["cancelled"] } ], "example": "queued" }, @@ -22258,9 +17136,7 @@ "description": "The chain ID for the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "fromAddress": { @@ -22269,9 +17145,7 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "toAddress": { @@ -22280,9 +17154,7 @@ "description": "The contract address to be called", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "data": { @@ -22291,9 +17163,7 @@ "description": "Encoded calldata", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "extension": { @@ -22302,9 +17172,7 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "value": { @@ -22313,9 +17181,7 @@ "description": "The amount of native currency to send", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "nonce": { @@ -22328,9 +17194,7 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasLimit": { @@ -22339,9 +17203,7 @@ "description": "The max gas unit limit", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasPrice": { @@ -22350,9 +17212,7 @@ "description": "The gas price used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxFeePerGas": { @@ -22361,9 +17221,7 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxPriorityFeePerGas": { @@ -22372,9 +17230,7 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionType": { @@ -22383,9 +17239,7 @@ "description": "The type of transaction", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionHash": { @@ -22394,9 +17248,7 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "queuedAt": { @@ -22405,9 +17257,7 @@ "description": "When the transaction is enqueued", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAt": { @@ -22416,9 +17266,7 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "minedAt": { @@ -22427,9 +17275,7 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cancelledAt": { @@ -22438,9 +17284,7 @@ "description": "When the transactino is cancelled", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractAddress": { @@ -22449,9 +17293,7 @@ "description": "The address for a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractType": { @@ -22460,9 +17302,7 @@ "description": "The type of a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "errorMessage": { @@ -22471,9 +17311,7 @@ "description": "The error that occurred", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAtBlockNumber": { @@ -22482,9 +17320,7 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "blockNumber": { @@ -22493,9 +17329,7 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryCount": { @@ -22508,9 +17342,7 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxFeePerGas": { @@ -22519,9 +17351,7 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxPriorityFeePerGas": { @@ -22530,9 +17360,7 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "signerAddress": { @@ -22545,9 +17373,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "accountAddress": { @@ -22560,9 +17386,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "target": { @@ -22575,9 +17399,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "sender": { @@ -22590,128 +17412,74 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "initCode": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "verificationGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "preVerificationGas": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "paymasterAndData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "userOpHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionName": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionArgs": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "onChainTxStatus": { "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } + { "type": "number" }, + { "type": "null" } ] }, "onchainStatus": { "anyOf": [ - { - "type": "string", - "enum": [ - "success" - ] - }, - { - "type": "string", - "enum": [ - "reverted" - ] - }, - { - "type": "null" - } + { "type": "string", "enum": ["success"] }, + { "type": "string", "enum": ["reverted"] }, + { "type": "null" } ] }, "effectiveGasPrice": { @@ -22720,9 +17488,7 @@ "description": "Effective Gas Price", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cumulativeGasUsed": { @@ -22731,9 +17497,7 @@ "description": "Cumulative Gas Used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -22786,19 +17550,12 @@ ] } }, - "totalCount": { - "type": "number" - } + "totalCount": { "type": "number" } }, - "required": [ - "transactions", - "totalCount" - ] + "required": ["transactions", "totalCount"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "transactions": [ @@ -22864,19 +17621,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -22902,19 +17651,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -22940,19 +17681,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -22974,15 +17707,11 @@ "get": { "operationId": "status", "summary": "Get transaction status", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get the status for a transaction request.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35", "in": "path", "name": "queueId", @@ -23007,44 +17736,17 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "sent" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["sent"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["errored"] }, + { "type": "string", "enum": ["cancelled"] } ], "example": "queued" }, @@ -23054,9 +17756,7 @@ "description": "The chain ID for the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "fromAddress": { @@ -23065,9 +17765,7 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "toAddress": { @@ -23076,9 +17774,7 @@ "description": "The contract address to be called", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "data": { @@ -23087,9 +17783,7 @@ "description": "Encoded calldata", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "extension": { @@ -23098,9 +17792,7 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "value": { @@ -23109,9 +17801,7 @@ "description": "The amount of native currency to send", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "nonce": { @@ -23124,9 +17814,7 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasLimit": { @@ -23135,9 +17823,7 @@ "description": "The max gas unit limit", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasPrice": { @@ -23146,9 +17832,7 @@ "description": "The gas price used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxFeePerGas": { @@ -23157,9 +17841,7 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxPriorityFeePerGas": { @@ -23168,9 +17850,7 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionType": { @@ -23179,9 +17859,7 @@ "description": "The type of transaction", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionHash": { @@ -23190,9 +17868,7 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "queuedAt": { @@ -23201,9 +17877,7 @@ "description": "When the transaction is enqueued", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAt": { @@ -23212,9 +17886,7 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "minedAt": { @@ -23223,9 +17895,7 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cancelledAt": { @@ -23234,9 +17904,7 @@ "description": "When the transactino is cancelled", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractAddress": { @@ -23245,9 +17913,7 @@ "description": "The address for a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractType": { @@ -23256,9 +17922,7 @@ "description": "The type of a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "errorMessage": { @@ -23267,9 +17931,7 @@ "description": "The error that occurred", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAtBlockNumber": { @@ -23278,9 +17940,7 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "blockNumber": { @@ -23289,9 +17949,7 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryCount": { @@ -23304,9 +17962,7 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxFeePerGas": { @@ -23315,9 +17971,7 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxPriorityFeePerGas": { @@ -23326,9 +17980,7 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "signerAddress": { @@ -23341,9 +17993,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "accountAddress": { @@ -23356,9 +18006,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "target": { @@ -23371,9 +18019,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "sender": { @@ -23386,128 +18032,44 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "initCode": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "callData": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "callGasLimit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "verificationGasLimit": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "preVerificationGas": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "paymasterAndData": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "userOpHash": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "functionName": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "functionArgs": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "onChainTxStatus": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "number" }, { "type": "null" }] }, "onchainStatus": { "anyOf": [ - { - "type": "string", - "enum": [ - "success" - ] - }, - { - "type": "string", - "enum": [ - "reverted" - ] - }, - { - "type": "null" - } + { "type": "string", "enum": ["success"] }, + { "type": "string", "enum": ["reverted"] }, + { "type": "null" } ] }, "effectiveGasPrice": { @@ -23516,9 +18078,7 @@ "description": "Effective Gas Price", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cumulativeGasUsed": { @@ -23527,9 +18087,7 @@ "description": "Cumulative Gas Used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -23582,9 +18140,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -23627,19 +18183,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -23665,19 +18213,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -23703,19 +18243,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -23737,17 +18269,11 @@ "get": { "operationId": "getAllDeployedContracts", "summary": "Get all deployment transactions", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get all transaction requests to deploy contracts.", "parameters": [ { - "schema": { - "default": 1, - "minimum": 1, - "type": "integer" - }, + "schema": { "default": 1, "minimum": 1, "type": "integer" }, "example": 1, "in": "query", "name": "page", @@ -23755,11 +18281,7 @@ "description": "Specify the page number for pagination." }, { - "schema": { - "default": 10, - "minimum": 1, - "type": "integer" - }, + "schema": { "default": 10, "minimum": 1, "type": "integer" }, "example": 10, "in": "query", "name": "limit", @@ -23789,44 +18311,17 @@ "description": "An identifier for an enqueued blockchain write call", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "status": { "description": "The current state of the transaction.", "anyOf": [ - { - "type": "string", - "enum": [ - "queued" - ] - }, - { - "type": "string", - "enum": [ - "sent" - ] - }, - { - "type": "string", - "enum": [ - "mined" - ] - }, - { - "type": "string", - "enum": [ - "errored" - ] - }, - { - "type": "string", - "enum": [ - "cancelled" - ] - } + { "type": "string", "enum": ["queued"] }, + { "type": "string", "enum": ["sent"] }, + { "type": "string", "enum": ["mined"] }, + { "type": "string", "enum": ["errored"] }, + { "type": "string", "enum": ["cancelled"] } ], "example": "queued" }, @@ -23836,9 +18331,7 @@ "description": "The chain ID for the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "fromAddress": { @@ -23847,9 +18340,7 @@ "description": "The backend wallet submitting the transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "toAddress": { @@ -23858,9 +18349,7 @@ "description": "The contract address to be called", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "data": { @@ -23869,9 +18358,7 @@ "description": "Encoded calldata", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "extension": { @@ -23880,9 +18367,7 @@ "description": "The extension detected by thirdweb", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "value": { @@ -23891,9 +18376,7 @@ "description": "The amount of native currency to send", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "nonce": { @@ -23906,9 +18389,7 @@ "description": "The nonce used by the backend wallet for this transaction", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasLimit": { @@ -23917,9 +18398,7 @@ "description": "The max gas unit limit", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "gasPrice": { @@ -23928,9 +18407,7 @@ "description": "The gas price used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxFeePerGas": { @@ -23939,9 +18416,7 @@ "description": "The max fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "maxPriorityFeePerGas": { @@ -23950,9 +18425,7 @@ "description": "The max priority fee per gas (EIP-1559)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionType": { @@ -23961,9 +18434,7 @@ "description": "The type of transaction", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "transactionHash": { @@ -23972,9 +18443,7 @@ "description": "The transaction hash (may not be mined)", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "queuedAt": { @@ -23983,9 +18452,7 @@ "description": "When the transaction is enqueued", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAt": { @@ -23994,9 +18461,7 @@ "description": "When the transaction is submitted to mempool", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "minedAt": { @@ -24005,9 +18470,7 @@ "description": "When the transaction is mined onchain", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cancelledAt": { @@ -24016,9 +18479,7 @@ "description": "When the transactino is cancelled", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractAddress": { @@ -24027,9 +18488,7 @@ "description": "The address for a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "deployedContractType": { @@ -24038,9 +18497,7 @@ "description": "The type of a deployed contract", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "errorMessage": { @@ -24049,9 +18506,7 @@ "description": "The error that occurred", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "sentAtBlockNumber": { @@ -24060,9 +18515,7 @@ "description": "The block number when the transaction is submitted to mempool", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "blockNumber": { @@ -24071,9 +18524,7 @@ "description": "The block number when the transaction is mined", "type": "number" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryCount": { @@ -24086,9 +18537,7 @@ "description": "Whether to replace gas values on the next retry", "type": "boolean" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxFeePerGas": { @@ -24097,9 +18546,7 @@ "description": "The max fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "retryMaxPriorityFeePerGas": { @@ -24108,9 +18555,7 @@ "description": "The max priority fee per gas to use on retry", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "signerAddress": { @@ -24123,9 +18568,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "accountAddress": { @@ -24138,9 +18581,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "target": { @@ -24153,9 +18594,7 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "sender": { @@ -24168,128 +18607,74 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, "initCode": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "callGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "verificationGasLimit": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "preVerificationGas": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "paymasterAndData": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "userOpHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionName": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "functionArgs": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "onChainTxStatus": { "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } + { "type": "number" }, + { "type": "null" } ] }, "onchainStatus": { "anyOf": [ - { - "type": "string", - "enum": [ - "success" - ] - }, - { - "type": "string", - "enum": [ - "reverted" - ] - }, - { - "type": "null" - } + { "type": "string", "enum": ["success"] }, + { "type": "string", "enum": ["reverted"] }, + { "type": "null" } ] }, "effectiveGasPrice": { @@ -24298,9 +18683,7 @@ "description": "Effective Gas Price", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] }, "cumulativeGasUsed": { @@ -24309,9 +18692,7 @@ "description": "Cumulative Gas Used", "type": "string" }, - { - "type": "null" - } + { "type": "null" } ] } }, @@ -24364,19 +18745,12 @@ ] } }, - "totalCount": { - "type": "number" - } + "totalCount": { "type": "number" } }, - "required": [ - "transactions", - "totalCount" - ] + "required": ["transactions", "totalCount"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "transactions": [ @@ -24420,19 +18794,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24458,19 +18824,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24496,19 +18854,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24530,9 +18880,7 @@ "post": { "operationId": "syncRetry", "summary": "Retry transaction (synchronous)", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors.", "requestBody": { "content": { @@ -24545,16 +18893,10 @@ "type": "string", "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" }, - "maxFeePerGas": { - "type": "string" - }, - "maxPriorityFeePerGas": { - "type": "string" - } + "maxFeePerGas": { "type": "string" }, + "maxPriorityFeePerGas": { "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } } }, @@ -24570,19 +18912,11 @@ "properties": { "result": { "type": "object", - "properties": { - "transactionHash": { - "type": "string" - } - }, - "required": [ - "transactionHash" - ] + "properties": { "transactionHash": { "type": "string" } }, + "required": ["transactionHash"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "transactionHash": "0xc3b437073c164c33f95065fb325e9bc419f306cb39ae8b4ca233f33efaa74ead" @@ -24603,19 +18937,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24641,19 +18967,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24679,19 +18997,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24713,9 +19023,7 @@ "post": { "operationId": "retryFailed", "summary": "Retry failed transaction", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Retry a failed transaction", "requestBody": { "content": { @@ -24729,9 +19037,7 @@ "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } } }, @@ -24748,22 +19054,13 @@ "result": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "status": { - "type": "string" - } + "message": { "type": "string" }, + "status": { "type": "string" } }, - "required": [ - "message", - "status" - ] + "required": ["message", "status"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "message": "Transaction queued for retry with queueId: a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -24785,19 +19082,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24823,19 +19112,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24861,19 +19142,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -24895,9 +19168,7 @@ "post": { "operationId": "cancel", "summary": "Cancel transaction", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled.", "requestBody": { "content": { @@ -24911,9 +19182,7 @@ "example": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } } }, @@ -24951,16 +19220,10 @@ "example": "0x0514076b5b7e3062c8dc17e10f7c0befe88e6efb7e97f16e3c14afb36c296467" } }, - "required": [ - "queueId", - "status", - "message" - ] + "required": ["queueId", "status", "message"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "a20ed4ce-301d-4251-a7af-86bd88f6c015", @@ -24982,19 +19245,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25020,19 +19275,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25058,19 +19305,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25092,23 +19331,15 @@ "post": { "operationId": "sendRawTransaction", "summary": "Send a signed transaction", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Send a signed transaction", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "signedTransaction": { - "type": "string" - } - }, - "required": [ - "signedTransaction" - ] + "properties": { "signedTransaction": { "type": "string" } }, + "required": ["signedTransaction"] } } }, @@ -25116,9 +19347,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -25136,19 +19365,11 @@ "properties": { "result": { "type": "object", - "properties": { - "transactionHash": { - "type": "string" - } - }, - "required": [ - "transactionHash" - ] + "properties": { "transactionHash": { "type": "string" } }, + "required": ["transactionHash"] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -25164,19 +19385,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25202,19 +19415,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25240,19 +19445,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25274,21 +19471,15 @@ "post": { "operationId": "sendSignedUserOp", "summary": "Send a signed user operation", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Send a signed user operation", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "properties": { - "signedUserOp": {} - }, - "required": [ - "signedUserOp" - ] + "properties": { "signedUserOp": {} }, + "required": ["signedUserOp"] } } }, @@ -25296,9 +19487,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -25318,38 +19507,22 @@ "properties": { "result": { "type": "object", - "properties": { - "userOpHash": { - "type": "string" - } - }, - "required": [ - "userOpHash" - ] + "properties": { "userOpHash": { "type": "string" } }, + "required": ["userOpHash"] } }, - "required": [ - "result" - ] + "required": ["result"] }, { "type": "object", "properties": { "error": { "type": "object", - "properties": { - "message": { - "type": "string" - } - }, - "required": [ - "message" - ] + "properties": { "message": { "type": "string" } }, + "required": ["message"] } }, - "required": [ - "error" - ] + "required": ["error"] } ] } @@ -25367,19 +19540,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25405,19 +19570,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25443,19 +19600,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25477,16 +19626,11 @@ "get": { "operationId": "txHashReceipt", "summary": "Get transaction receipt from transaction hash", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get the transaction receipt from a transaction hash.", "parameters": [ { - "schema": { - "pattern": "^0x([A-Fa-f0-9]{64})$", - "type": "string" - }, + "schema": { "pattern": "^0x([A-Fa-f0-9]{64})$", "type": "string" }, "example": "0xd9bcba8f5bc4ce5bf4d631b2a0144329c1df3b56ddb9fc64637ed3a4219dd087", "in": "path", "name": "txHash", @@ -25494,9 +19638,7 @@ "description": "Transaction hash" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -25517,12 +19659,8 @@ { "type": "object", "properties": { - "to": { - "type": "string" - }, - "from": { - "type": "string" - }, + "to": { "type": "string" }, + "from": { "type": "string" }, "contractAddress": { "anyOf": [ { @@ -25533,65 +19671,30 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - { - "type": "null" - } + { "type": "null" } ] }, - "transactionIndex": { - "type": "number" - }, - "root": { - "type": "string" - }, - "gasUsed": { - "type": "string" - }, - "logsBloom": { - "type": "string" - }, - "blockHash": { - "type": "string" - }, - "transactionHash": { - "type": "string" - }, - "logs": { - "type": "array", - "items": {} - }, - "blockNumber": { - "type": "number" - }, - "confirmations": { - "type": "number" - }, - "cumulativeGasUsed": { - "type": "string" - }, - "effectiveGasPrice": { - "type": "string" - }, - "byzantium": { - "type": "boolean" - }, - "type": { - "type": "number" - }, - "status": { - "type": "number" - } + "transactionIndex": { "type": "number" }, + "root": { "type": "string" }, + "gasUsed": { "type": "string" }, + "logsBloom": { "type": "string" }, + "blockHash": { "type": "string" }, + "transactionHash": { "type": "string" }, + "logs": { "type": "array", "items": {} }, + "blockNumber": { "type": "number" }, + "confirmations": { "type": "number" }, + "cumulativeGasUsed": { "type": "string" }, + "effectiveGasPrice": { "type": "string" }, + "byzantium": { "type": "boolean" }, + "type": { "type": "number" }, + "status": { "type": "number" } } }, - { - "type": "null" - } + { "type": "null" } ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "to": "0xd7419703c2D5737646525A8660906eCb612875BD", @@ -25658,19 +19761,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25696,19 +19791,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25734,19 +19821,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25768,16 +19847,11 @@ "get": { "operationId": "useropHashReceipt", "summary": "Get transaction receipt from user-op hash", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get the transaction receipt from a user-op hash.", "parameters": [ { - "schema": { - "pattern": "^0x([A-Fa-f0-9]{64})$", - "type": "string" - }, + "schema": { "pattern": "^0x([A-Fa-f0-9]{64})$", "type": "string" }, "example": "0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f", "in": "path", "name": "userOpHash", @@ -25785,9 +19859,7 @@ "description": "User operation hash" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -25802,12 +19874,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": {} - }, - "required": [ - "result" - ], + "properties": { "result": {} }, + "required": ["result"], "example": { "result": { "userOpHash": "0xa5a579c6fd86c2d8a4d27f5bb22796614d3a31bbccaba8f3019ec001e001b95f", @@ -25852,19 +19920,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25890,19 +19950,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25928,19 +19980,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -25962,15 +20006,11 @@ "get": { "operationId": "getTransactionLogs", "summary": "Get transaction logs", - "tags": [ - "Transaction" - ], + "tags": ["Transaction"], "description": "Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "query", "name": "chain", @@ -25978,19 +20018,14 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "queueId", "required": false, "description": "The queue ID for a mined transaction." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{64}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, "example": "0x1f31b57601a6f90312fd5e57a2924bc8333477de579ee37b197a0681ab438431", "in": "query", "name": "transactionHash", @@ -25998,9 +20033,7 @@ "description": "The transaction hash for a mined transaction." }, { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "parseLogs", "required": false, @@ -26032,16 +20065,10 @@ }, "topics": { "type": "array", - "items": { - "type": "string" - } - }, - "data": { - "type": "string" - }, - "blockNumber": { - "type": "string" + "items": { "type": "string" } }, + "data": { "type": "string" }, + "blockNumber": { "type": "string" }, "transactionHash": { "description": "A transaction hash", "examples": [ @@ -26050,21 +20077,11 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, - "transactionIndex": { - "type": "number" - }, - "blockHash": { - "type": "string" - }, - "logIndex": { - "type": "number" - }, - "removed": { - "type": "boolean" - }, - "eventName": { - "type": "string" - }, + "transactionIndex": { "type": "number" }, + "blockHash": { "type": "string" }, + "logIndex": { "type": "number" }, + "removed": { "type": "boolean" }, + "eventName": { "type": "string" }, "args": { "description": "Event arguments.", "examples": [ @@ -26106,16 +20123,10 @@ }, "topics": { "type": "array", - "items": { - "type": "string" - } - }, - "data": { - "type": "string" - }, - "blockNumber": { - "type": "string" + "items": { "type": "string" } }, + "data": { "type": "string" }, + "blockNumber": { "type": "string" }, "transactionHash": { "description": "A transaction hash", "examples": [ @@ -26124,18 +20135,10 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{64}$" }, - "transactionIndex": { - "type": "number" - }, - "blockHash": { - "type": "string" - }, - "logIndex": { - "type": "number" - }, - "removed": { - "type": "boolean" - } + "transactionIndex": { "type": "number" }, + "blockHash": { "type": "string" }, + "logIndex": { "type": "number" }, + "removed": { "type": "boolean" } }, "required": [ "address", @@ -26153,9 +20156,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { @@ -26196,19 +20197,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26234,19 +20227,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26272,19 +20257,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26306,15 +20283,11 @@ "get": { "operationId": "getAllAccounts", "summary": "Get all smart accounts", - "tags": [ - "Account Factory" - ], + "tags": ["Account Factory"], "description": "Get all the smart accounts for this account factory.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -26322,10 +20295,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -26344,14 +20314,10 @@ "result": { "description": "The account addresses of all the accounts in this factory", "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -26367,19 +20333,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26405,19 +20363,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26443,19 +20393,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26477,16 +20419,11 @@ "get": { "operationId": "getAssociatedAccounts", "summary": "Get associated smart accounts", - "tags": [ - "Account Factory" - ], + "tags": ["Account Factory"], "description": "Get all the smart accounts for this account factory associated with the specific admin wallet.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "signerAddress", @@ -26494,9 +20431,7 @@ "description": "The address of the signer to get associated accounts from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -26504,10 +20439,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -26526,14 +20458,10 @@ "result": { "description": "The account addresses of all the accounts with a specific signer in this factory", "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -26549,19 +20477,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26587,19 +20507,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26625,19 +20537,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26659,16 +20563,11 @@ "get": { "operationId": "isAccountDeployed", "summary": "Check if deployed", - "tags": [ - "Account Factory" - ], + "tags": ["Account Factory"], "description": "Check if a smart account has been deployed to the blockchain.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "adminAddress", @@ -26676,18 +20575,14 @@ "description": "The address of the admin to check if the account address is deployed" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "extraData", "required": false, "description": "Extra data to use in predicting the account address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -26695,10 +20590,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -26719,9 +20611,7 @@ "type": "boolean" } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -26737,19 +20627,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26775,19 +20657,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26813,19 +20687,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26847,16 +20713,11 @@ "get": { "operationId": "predictAccountAddress", "summary": "Predict smart account address", - "tags": [ - "Account Factory" - ], + "tags": ["Account Factory"], "description": "Get the counterfactual address of a smart account.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "adminAddress", @@ -26864,18 +20725,14 @@ "description": "The address of the admin to predict the account address for" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "extraData", "required": false, "description": "Extra data to add to use in predicting the account address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -26883,10 +20740,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -26907,9 +20761,7 @@ "type": "string" } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -26925,19 +20777,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -26963,19 +20807,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27001,19 +20837,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27035,9 +20863,7 @@ "post": { "operationId": "createAccount", "summary": "Create smart account", - "tags": [ - "Account Factory" - ], + "tags": ["Account Factory"], "description": "Create a smart account for this account factory.", "requestBody": { "content": { @@ -27081,9 +20907,7 @@ } } }, - "required": [ - "adminAddress" - ] + "required": ["adminAddress"] }, "example": { "adminAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -27094,19 +20918,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -27114,10 +20933,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27125,10 +20941,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -27136,19 +20949,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -27156,10 +20964,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -27178,9 +20983,7 @@ "result": { "type": "object", "properties": { - "queueId": { - "type": "string" - }, + "queueId": { "type": "string" }, "deployedAddress": { "description": "A contract or wallet address", "type": "string", @@ -27190,9 +20993,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -27208,19 +21009,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27246,19 +21039,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27284,19 +21069,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27318,15 +21095,11 @@ "get": { "operationId": "getAllAdmins", "summary": "Get all admins", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Get all admins for a smart account.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -27334,10 +21107,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27356,14 +21126,10 @@ "result": { "description": "The address of the admins on this account", "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -27379,19 +21145,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27417,19 +21175,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27455,19 +21205,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27489,15 +21231,11 @@ "get": { "operationId": "getAllSessions", "summary": "Get all session keys", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Get all session keys for a smart account.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -27505,10 +21243,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27535,20 +21270,14 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "startDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, + "startDate": { "type": "string" }, + "expirationDate": { "type": "string" }, "nativeTokenLimitPerTransaction": { "type": "string" }, "approvedCallTargets": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, "required": [ @@ -27561,9 +21290,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -27579,19 +21306,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27617,19 +21336,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27655,19 +21366,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27689,9 +21392,7 @@ "post": { "operationId": "grantAdmin", "summary": "Grant admin", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Grant a smart account's admin permission.", "requestBody": { "content": { @@ -27731,9 +21432,7 @@ } } }, - "required": [ - "signerAddress" - ] + "required": ["signerAddress"] }, "example": { "signerAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -27744,19 +21443,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -27764,10 +21458,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -27775,10 +21466,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -27786,19 +21474,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -27806,10 +21489,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -27833,14 +21513,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -27861,19 +21537,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27899,19 +21567,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27937,19 +21597,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -27971,9 +21623,7 @@ "post": { "operationId": "revokeAdmin", "summary": "Revoke admin", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Revoke a smart account's admin permission.", "requestBody": { "content": { @@ -28013,9 +21663,7 @@ } } }, - "required": [ - "walletAddress" - ] + "required": ["walletAddress"] }, "example": { "walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -28026,19 +21674,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -28046,10 +21689,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28057,10 +21697,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -28068,19 +21705,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -28088,10 +21720,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -28115,14 +21744,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -28143,19 +21768,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28181,19 +21798,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28219,19 +21828,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28253,9 +21854,7 @@ "post": { "operationId": "grantSession", "summary": "Create session key", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Create a session key for a smart account.", "requestBody": { "content": { @@ -28269,20 +21868,12 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "startDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "nativeTokenLimitPerTransaction": { - "type": "string" - }, + "startDate": { "type": "string" }, + "expirationDate": { "type": "string" }, + "nativeTokenLimitPerTransaction": { "type": "string" }, "approvedCallTargets": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, "txOverrides": { "type": "object", @@ -28333,19 +21924,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -28353,10 +21939,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28364,10 +21947,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -28375,19 +21955,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -28395,10 +21970,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -28422,14 +21994,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -28450,19 +22018,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28488,19 +22048,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28526,19 +22078,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28560,9 +22104,7 @@ "post": { "operationId": "revokeSession", "summary": "Revoke session key", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Revoke a session key for a smart account.", "requestBody": { "content": { @@ -28602,9 +22144,7 @@ } } }, - "required": [ - "walletAddress" - ] + "required": ["walletAddress"] }, "example": { "walletAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373" @@ -28615,19 +22155,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -28635,10 +22170,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28646,10 +22178,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -28657,19 +22186,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -28677,10 +22201,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -28704,14 +22225,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -28732,19 +22249,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28770,19 +22279,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28808,19 +22309,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -28842,9 +22335,7 @@ "post": { "operationId": "updateSession", "summary": "Update session key", - "tags": [ - "Account" - ], + "tags": ["Account"], "description": "Update a session key for a smart account.", "requestBody": { "content": { @@ -28867,15 +22358,9 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" } }, - "startDate": { - "type": "string" - }, - "expirationDate": { - "type": "string" - }, - "nativeTokenLimitPerTransaction": { - "type": "string" - }, + "startDate": { "type": "string" }, + "expirationDate": { "type": "string" }, + "nativeTokenLimitPerTransaction": { "type": "string" }, "txOverrides": { "type": "object", "properties": { @@ -28902,10 +22387,7 @@ } } }, - "required": [ - "signerAddress", - "approvedCallTargets" - ] + "required": ["signerAddress", "approvedCallTargets"] }, "example": { "signerAddress": "0x3ecdbf3b911d0e9052b64850693888b008e18373", @@ -28919,19 +22401,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -28939,10 +22416,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -28950,10 +22424,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -28961,19 +22432,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -28981,10 +22447,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -29008,14 +22471,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -29036,19 +22495,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29074,19 +22525,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29112,19 +22555,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29146,15 +22581,11 @@ "get": { "operationId": "allowanceOf", "summary": "Get token allowance", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get the allowance of a specific wallet for an ERC-20 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -29162,9 +22593,7 @@ "description": "Address of the wallet who owns the funds" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "spenderWallet", @@ -29172,9 +22601,7 @@ "description": "Address of the wallet to check token allowance" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -29182,10 +22609,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -29204,15 +22628,9 @@ "result": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "string" - }, + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "string" }, "value": { "description": "Value in wei", "type": "string" @@ -29231,9 +22649,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "name": "ERC20", @@ -29258,19 +22674,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29296,19 +22704,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29334,19 +22734,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29368,16 +22760,11 @@ "get": { "operationId": "balanceOf", "summary": "Get token balance", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get the balance of a specific wallet address for this ERC-20 contract.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "wallet_address", @@ -29385,9 +22772,7 @@ "description": "Address of the wallet to check token balance" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -29395,10 +22780,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -29417,15 +22799,9 @@ "result": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "string" - }, + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "string" }, "value": { "description": "Value in wei", "type": "string" @@ -29444,9 +22820,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": [ { "result": { @@ -29473,19 +22847,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29511,19 +22877,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29549,19 +22907,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29583,15 +22933,11 @@ "get": { "operationId": "get", "summary": "Get token details", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get details for this ERC-20 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -29599,10 +22945,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -29621,26 +22964,14 @@ "result": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "string" } }, - "required": [ - "name", - "symbol", - "decimals" - ] + "required": ["name", "symbol", "decimals"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "name": "ERC20", @@ -29663,19 +22994,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29701,19 +23024,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29739,19 +23054,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29773,15 +23080,11 @@ "get": { "operationId": "totalSupply", "summary": "Get total supply", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get the total supply in circulation for this ERC-20 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -29789,10 +23092,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -29811,15 +23111,9 @@ "result": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "string" - }, + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "string" }, "value": { "description": "Value in wei", "type": "string" @@ -29838,9 +23132,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": [ { "result": { @@ -29867,19 +23159,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29905,19 +23189,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29943,19 +23219,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -29977,9 +23245,7 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -30019,9 +23285,7 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] }, "mintEndTime": { @@ -30030,16 +23294,11 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] } }, - "required": [ - "to", - "quantity" - ], + "required": ["to", "quantity"], "examples": [ { "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -30054,59 +23313,30 @@ { "type": "object", "properties": { - "to": { - "type": "string" - }, - "primarySaleRecipient": { - "type": "string" - }, - "price": { - "type": "string" - }, - "priceInWei": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "to": { "type": "string" }, + "primarySaleRecipient": { "type": "string" }, + "price": { "type": "string" }, + "priceInWei": { "type": "string" }, + "currency": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, - "required": [ - "to", - "validityStartTimestamp" - ] + "required": ["to", "validityStartTimestamp"] }, { "anyOf": [ { "type": "object", - "properties": { - "quantity": { - "type": "string" - } - }, - "required": [ - "quantity" - ] + "properties": { "quantity": { "type": "string" } }, + "required": ["quantity"] }, { "type": "object", "properties": { - "quantityWei": { - "type": "string" - } + "quantityWei": { "type": "string" } }, - "required": [ - "quantityWei" - ] + "required": ["quantityWei"] } ] } @@ -30119,9 +23349,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -30129,10 +23357,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -30140,10 +23365,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -30151,19 +23373,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -30171,10 +23388,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -30182,9 +23396,7 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -30272,14 +23484,9 @@ } ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, { "type": "object", @@ -30287,30 +23494,14 @@ "payload": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "primarySaleRecipient": { - "type": "string" - }, - "quantity": { - "type": "string" - }, - "price": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "to": { "type": "string" }, + "primarySaleRecipient": { "type": "string" }, + "quantity": { "type": "string" }, + "price": { "type": "string" }, + "currency": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "to", @@ -30323,24 +23514,15 @@ "uid" ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] } ] } }, - "required": [ - "result" - ], - "example": { - "result": "1" - } + "required": ["result"], + "example": { "result": "1" } } } } @@ -30356,19 +23538,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30394,19 +23568,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30432,19 +23598,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30466,24 +23624,18 @@ "get": { "operationId": "canClaim", "summary": "Check if tokens are available for claiming", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -30491,9 +23643,7 @@ "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -30501,10 +23651,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30519,14 +23666,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] } } } @@ -30542,19 +23683,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30580,19 +23713,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30618,19 +23743,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30652,24 +23769,18 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Retrieve the currently active claim phase, if any.", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Retrieve the currently active claim phase, if any.", "parameters": [ { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -30677,10 +23788,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -30700,28 +23808,14 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -30730,62 +23824,27 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -30798,23 +23857,12 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "null" }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -30822,12 +23870,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -30848,18 +23892,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -30874,9 +23912,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -30892,19 +23928,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30930,19 +23958,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -30968,19 +23988,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31002,24 +24014,18 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured.", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get all the claim phases configured on the drop contract.", "parameters": [ { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -31027,10 +24033,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31053,12 +24056,8 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "startTime": { @@ -31067,12 +24066,8 @@ }, "price": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "currencyAddress": { @@ -31083,61 +24078,32 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "waitInSeconds": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -31150,22 +24116,14 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, + { "type": "null" }, { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, { "type": "array", @@ -31174,12 +24132,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -31200,18 +24154,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -31227,9 +24175,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -31245,19 +24191,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31283,19 +24221,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31321,19 +24251,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31355,24 +24277,18 @@ "get": { "operationId": "claimConditionsGetClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -31380,9 +24296,7 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -31390,10 +24304,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31413,16 +24324,12 @@ "type": "array", "items": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "anyOf": [ { "type": "string", - "enum": [ - "There is not enough supply to claim." - ] + "enum": ["There is not enough supply to claim."] }, { "type": "string", @@ -31438,21 +24345,15 @@ }, { "type": "string", - "enum": [ - "Claim phase has not started yet." - ] + "enum": ["Claim phase has not started yet."] }, { "type": "string", - "enum": [ - "You have already claimed the token." - ] + "enum": ["You have already claimed the token."] }, { "type": "string", - "enum": [ - "Incorrect price or currency." - ] + "enum": ["Incorrect price or currency."] }, { "type": "string", @@ -31474,21 +24375,15 @@ }, { "type": "string", - "enum": [ - "There is no claim condition set." - ] + "enum": ["There is no claim condition set."] }, { "type": "string", - "enum": [ - "No wallet connected." - ] + "enum": ["No wallet connected."] }, { "type": "string", - "enum": [ - "No claim conditions found." - ] + "enum": ["No claim conditions found."] } ] } @@ -31496,9 +24391,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -31514,19 +24407,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31552,19 +24437,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31590,19 +24467,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31624,16 +24493,11 @@ "post": { "operationId": "claimConditionsGetClaimerProofs", "summary": "Get claimer proofs", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -31641,9 +24505,7 @@ "description": "The wallet address to get the merkle proofs for." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -31651,10 +24513,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -31672,15 +24531,11 @@ "properties": { "result": { "anyOf": [ - { - "type": "null" - }, + { "type": "null" }, { "type": "object", "properties": { - "price": { - "type": "string" - }, + "price": { "type": "string" }, "currencyAddress": { "description": "A contract or wallet address", "examples": [ @@ -31697,28 +24552,18 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "maxClaimable": { - "type": "string" - }, + "maxClaimable": { "type": "string" }, "proof": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "address", - "maxClaimable", - "proof" - ] + "required": ["address", "maxClaimable", "proof"] } ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -31734,19 +24579,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31772,19 +24609,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31810,19 +24639,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -31844,9 +24665,7 @@ "post": { "operationId": "setAllowance", "summary": "Set allowance", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet.", "requestBody": { "content": { @@ -31890,10 +24709,7 @@ } } }, - "required": [ - "spenderAddress", - "amount" - ] + "required": ["spenderAddress", "amount"] }, "example": { "spenderAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -31905,19 +24721,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -31925,10 +24736,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -31936,10 +24744,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -31947,19 +24752,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -31967,10 +24767,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -31994,14 +24791,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -32022,19 +24815,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32060,19 +24845,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32098,19 +24875,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32132,9 +24901,7 @@ "post": { "operationId": "transfer", "summary": "Transfer tokens", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Transfer ERC-20 tokens from the caller wallet to a specific wallet.", "requestBody": { "content": { @@ -32178,10 +24945,7 @@ } } }, - "required": [ - "toAddress", - "amount" - ] + "required": ["toAddress", "amount"] }, "example": { "toAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -32193,19 +24957,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -32213,10 +24972,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -32224,10 +24980,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -32235,19 +24988,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -32255,10 +25003,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -32282,14 +25027,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -32310,19 +25051,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32348,19 +25081,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32386,19 +25111,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32420,9 +25137,7 @@ "post": { "operationId": "transferFrom", "summary": "Transfer tokens from wallet", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -32472,11 +25187,7 @@ } } }, - "required": [ - "fromAddress", - "toAddress", - "amount" - ] + "required": ["fromAddress", "toAddress", "amount"] }, "example": { "fromAddress": "0x....", @@ -32489,19 +25200,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -32509,10 +25215,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -32520,10 +25223,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -32531,19 +25231,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -32551,10 +25246,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -32578,14 +25270,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -32606,19 +25294,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32644,19 +25324,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32682,19 +25354,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32716,9 +25380,7 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Burn ERC-20 tokens in the caller wallet.", "requestBody": { "content": { @@ -32756,32 +25418,23 @@ } } }, - "required": [ - "amount" - ] + "required": ["amount"] }, - "example": { - "amount": "0.1" - } + "example": { "amount": "0.1" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -32789,10 +25442,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -32800,10 +25450,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -32811,19 +25458,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -32831,10 +25473,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -32858,14 +25497,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -32886,19 +25521,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32924,19 +25551,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32962,19 +25581,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -32996,9 +25607,7 @@ "post": { "operationId": "burnFrom", "summary": "Burn token from wallet", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Burn ERC-20 tokens in a specific wallet. Requires allowance.", "requestBody": { "content": { @@ -33042,10 +25651,7 @@ } } }, - "required": [ - "holderAddress", - "amount" - ] + "required": ["holderAddress", "amount"] }, "example": { "holderAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -33057,19 +25663,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -33077,10 +25678,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -33088,10 +25686,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33099,19 +25694,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33119,10 +25709,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33146,14 +25733,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33174,19 +25757,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33212,19 +25787,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33250,19 +25817,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33284,9 +25843,7 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Claim ERC-20 tokens to a specific wallet.", "requestBody": { "content": { @@ -33328,10 +25885,7 @@ } } }, - "required": [ - "recipient", - "amount" - ] + "required": ["recipient", "amount"] }, "example": { "recipient": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -33343,19 +25897,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -33363,10 +25912,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -33374,10 +25920,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33385,19 +25928,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33405,10 +25943,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33432,14 +25967,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33460,19 +25991,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33498,19 +26021,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33536,19 +26051,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33570,9 +26077,7 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Mint ERC-20 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -33596,10 +26101,7 @@ "type": "string" } }, - "required": [ - "toAddress", - "amount" - ] + "required": ["toAddress", "amount"] } }, "txOverrides": { @@ -33628,9 +26130,7 @@ } } }, - "required": [ - "data" - ] + "required": ["data"] }, "example": { "data": [ @@ -33650,19 +26150,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -33670,10 +26165,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -33681,10 +26173,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33692,19 +26181,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -33712,10 +26196,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -33739,14 +26220,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -33767,19 +26244,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33805,19 +26274,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33843,19 +26304,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -33877,9 +26330,7 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Mint ERC-20 tokens to a specific wallet.", "requestBody": { "content": { @@ -33923,10 +26374,7 @@ } } }, - "required": [ - "toAddress", - "amount" - ] + "required": ["toAddress", "amount"] }, "example": { "toAddress": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -33938,19 +26386,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -33958,10 +26401,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x365b83D67D5539C6583b9c0266A548926Bf216F4", "in": "path", "name": "contractAddress", @@ -33969,10 +26409,7 @@ "description": "ERC20 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -33980,19 +26417,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -34000,10 +26432,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -34027,14 +26456,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -34055,19 +26480,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34093,19 +26510,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34131,19 +26540,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34165,9 +26566,7 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Mint ERC-20 tokens from a generated signature.", "requestBody": { "content": { @@ -34239,9 +26638,7 @@ "signature": "0xe16697bf7ede4ff4918f0dbc84953b964a84fed70cb3a0b0afb3ee9a55c9ff4d14e029bce8d8c74e71c1de32889c4eff529a9f7d45402455b8d15c7e6993c1c91b" } }, - "signature": { - "type": "string" - }, + "signature": { "type": "string" }, "txOverrides": { "type": "object", "properties": { @@ -34268,34 +26665,23 @@ } } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, - "example": { - "payload": {}, - "signature": "" - } + "example": { "payload": {}, "signature": "" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -34303,10 +26689,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34314,10 +26697,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -34325,19 +26705,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -34345,10 +26720,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -34372,14 +26744,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -34400,19 +26768,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34438,19 +26798,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34476,19 +26828,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34510,9 +26854,7 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for the drop.", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -34526,35 +26868,16 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -34563,54 +26886,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -34618,12 +26911,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -34644,31 +26933,21 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } } }, - "resetClaimEligibilityForAll": { - "type": "boolean" - }, + "resetClaimEligibilityForAll": { "type": "boolean" }, "txOverrides": { "type": "object", "properties": { @@ -34695,9 +26974,7 @@ } } }, - "required": [ - "claimConditionInputs" - ] + "required": ["claimConditionInputs"] } } }, @@ -34705,19 +26982,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -34725,10 +26997,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -34736,10 +27005,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -34747,19 +27013,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -34767,10 +27028,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -34794,14 +27052,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -34822,19 +27076,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34860,19 +27106,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34898,19 +27136,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -34932,9 +27162,7 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": [ - "ERC20" - ], + "tags": ["ERC20"], "description": "Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -34946,35 +27174,16 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -34983,54 +27192,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -35038,12 +27217,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -35064,23 +27239,15 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } @@ -35115,10 +27282,7 @@ } } }, - "required": [ - "claimConditionInput", - "index" - ] + "required": ["claimConditionInput", "index"] } } }, @@ -35126,19 +27290,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -35146,10 +27305,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35157,10 +27313,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -35168,19 +27321,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -35188,10 +27336,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -35215,14 +27360,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -35243,19 +27384,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35281,19 +27414,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35319,19 +27444,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35353,15 +27470,11 @@ "get": { "operationId": "get", "summary": "Get details", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get the details for a token in an ERC-721 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0", "in": "query", "name": "tokenId", @@ -35369,9 +27482,7 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -35379,10 +27490,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35405,116 +27513,59 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": [ { "result": { @@ -35546,19 +27597,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35584,19 +27627,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35622,19 +27657,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35656,15 +27683,11 @@ "get": { "operationId": "getAll", "summary": "Get all details", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get details for all tokens in an ERC-721 contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "example": "0", "in": "query", "name": "start", @@ -35672,9 +27695,7 @@ "description": "The start token id for paginated results. Defaults to 0." }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "example": "20", "in": "query", "name": "count", @@ -35682,9 +27703,7 @@ "description": "The page count for paginated results. Defaults to 100." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -35692,10 +27711,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -35720,117 +27736,60 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { @@ -35862,19 +27821,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35900,19 +27851,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35938,19 +27881,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -35972,16 +27907,11 @@ "get": { "operationId": "getOwned", "summary": "Get owned tokens", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get all tokens in an ERC-721 contract owned by a specific wallet.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -35989,9 +27919,7 @@ "description": "Address of the wallet to get NFTs for" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -35999,10 +27927,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36027,117 +27952,60 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } } }, - "required": [ - "result" - ], + "required": ["result"], "example": [ { "result": [ @@ -36171,19 +28039,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36209,19 +28069,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36247,19 +28099,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36281,16 +28125,11 @@ "get": { "operationId": "balanceOf", "summary": "Get token balance", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get the balance of a specific wallet address for this ERC-721 contract.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -36298,9 +28137,7 @@ "description": "Address of the wallet to check NFT balance" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -36308,10 +28145,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36326,14 +28160,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "example": { - "result": "1" - } + "properties": { "result": { "type": "string" } }, + "example": { "result": "1" } } } } @@ -36349,19 +28177,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36387,19 +28207,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36425,19 +28237,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36459,15 +28263,11 @@ "get": { "operationId": "isApproved", "summary": "Check if approved transfers", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Check if the specific wallet has approved transfers from a specific operator wallet.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -36475,9 +28275,7 @@ "description": "Address of the wallet who owns the NFT" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "operator", @@ -36485,9 +28283,7 @@ "description": "Address of the operator to check approval on" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -36495,10 +28291,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36513,14 +28306,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "example": { - "result": false - } + "properties": { "result": { "type": "boolean" } }, + "example": { "result": false } } } } @@ -36536,19 +28323,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36574,19 +28353,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36612,19 +28383,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36646,15 +28409,11 @@ "get": { "operationId": "totalCount", "summary": "Get total supply", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get the total supply in circulation for this ERC-721 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -36662,10 +28421,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36680,16 +28436,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "example": [ - { - "result": "1" - } - ] + "properties": { "result": { "type": "string" } }, + "example": [{ "result": "1" }] } } } @@ -36705,19 +28453,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36743,19 +28483,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36781,19 +28513,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36815,15 +28539,11 @@ "get": { "operationId": "totalClaimedSupply", "summary": "Get claimed supply", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get the claimed supply for this ERC-721 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -36831,10 +28551,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -36849,11 +28566,7 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - } + "properties": { "result": { "type": "string" } } } } } @@ -36869,19 +28582,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36907,19 +28612,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36945,19 +28642,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -36979,15 +28668,11 @@ "get": { "operationId": "totalUnclaimedSupply", "summary": "Get unclaimed supply", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get the unclaimed supply for this ERC-721 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -36995,10 +28680,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37012,12 +28694,153 @@ "content": { "application/json": { "schema": { + "type": "object", + "properties": { "result": { "type": "string" } } + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", "type": "object", "properties": { - "result": { - "type": "string" + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } } } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim": { + "get": { + "operationId": "canClaim", + "summary": "Check if tokens are available for claiming", + "tags": ["ERC721"], + "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", + "parameters": [ + { + "schema": { "type": "string" }, + "in": "query", + "name": "quantity", + "required": true, + "description": "The amount of tokens to claim." + }, + { + "schema": { "type": "string" }, + "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", + "in": "query", + "name": "addressToCheck", + "required": false, + "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." + }, + { + "schema": { "type": "string" }, + "example": "80002", + "in": "path", + "name": "chain", + "required": true, + "description": "Chain ID or name" + }, + { + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "path", + "name": "contractAddress", + "required": true, + "description": "Contract address" + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] } } } @@ -37033,19 +28856,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37071,205 +28886,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim": { - "get": { - "operationId": "canClaim", - "summary": "Check if tokens are available for claiming", - "tags": [ - "ERC721" - ], - "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", - "parameters": [ - { - "schema": { - "type": "string" - }, - "in": "query", - "name": "quantity", - "required": true, - "description": "The amount of tokens to claim." - }, - { - "schema": { - "type": "string" - }, - "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", - "in": "query", - "name": "addressToCheck", - "required": false, - "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." - }, - { - "schema": { - "type": "string" - }, - "example": "80002", - "in": "path", - "name": "chain", - "required": true, - "description": "Chain ID or name" - }, - { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "path", - "name": "contractAddress", - "required": true, - "description": "Contract address" - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37295,19 +28916,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37329,24 +28942,18 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Retrieve the currently active claim phase, if any.", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Retrieve the currently active claim phase, if any.", "parameters": [ { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -37354,10 +28961,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37377,28 +28981,14 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -37407,62 +28997,27 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -37475,23 +29030,12 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "null" }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -37499,12 +29043,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -37525,18 +29065,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -37551,9 +29085,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -37569,19 +29101,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37607,19 +29131,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37645,19 +29161,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37679,24 +29187,18 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured for the drop.", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get all the claim phases configured for the drop.", "parameters": [ { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -37704,10 +29206,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -37730,12 +29229,8 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "startTime": { @@ -37744,12 +29239,8 @@ }, "price": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "currencyAddress": { @@ -37760,61 +29251,32 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "waitInSeconds": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -37827,22 +29289,14 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, + { "type": "null" }, { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, { "type": "array", @@ -37851,12 +29305,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -37877,18 +29327,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -37904,9 +29348,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -37922,19 +29364,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37960,19 +29394,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -37998,19 +29424,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38032,24 +29450,18 @@ "get": { "operationId": "getClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -38057,9 +29469,7 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -38067,10 +29477,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38090,16 +29497,12 @@ "type": "array", "items": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "anyOf": [ { "type": "string", - "enum": [ - "There is not enough supply to claim." - ] + "enum": ["There is not enough supply to claim."] }, { "type": "string", @@ -38115,21 +29518,15 @@ }, { "type": "string", - "enum": [ - "Claim phase has not started yet." - ] + "enum": ["Claim phase has not started yet."] }, { "type": "string", - "enum": [ - "You have already claimed the token." - ] + "enum": ["You have already claimed the token."] }, { "type": "string", - "enum": [ - "Incorrect price or currency." - ] + "enum": ["Incorrect price or currency."] }, { "type": "string", @@ -38151,21 +29548,15 @@ }, { "type": "string", - "enum": [ - "There is no claim condition set." - ] + "enum": ["There is no claim condition set."] }, { "type": "string", - "enum": [ - "No wallet connected." - ] + "enum": ["No wallet connected."] }, { "type": "string", - "enum": [ - "No claim conditions found." - ] + "enum": ["No claim conditions found."] } ] } @@ -38173,229 +29564,7 @@ } } }, - "required": [ - "result" - ] - } - } - } - }, - "400": { - "description": "Bad Request", - "content": { - "application/json": { - "schema": { - "description": "Bad Request", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "", - "code": "BAD_REQUEST", - "statusCode": 400 - } - } - } - } - }, - "404": { - "description": "Not Found", - "content": { - "application/json": { - "schema": { - "description": "Not Found", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", - "code": "NOT_FOUND", - "statusCode": 404 - } - } - } - } - }, - "500": { - "description": "Internal Server Error", - "content": { - "application/json": { - "schema": { - "description": "Internal Server Error", - "type": "object", - "properties": { - "error": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } - } - } - } - }, - "example": { - "error": { - "message": "Transaction simulation failed with reason: types/values length mismatch", - "code": "INTERNAL_SERVER_ERROR", - "statusCode": 500 - } - } - } - } - } - } - } - }, - "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs": { - "get": { - "operationId": "getClaimerProofs", - "summary": "Get claimer proofs", - "tags": [ - "ERC721" - ], - "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", - "parameters": [ - { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "query", - "name": "walletAddress", - "required": true, - "description": "The wallet address to get the merkle proofs for." - }, - { - "schema": { - "type": "string" - }, - "example": "80002", - "in": "path", - "name": "chain", - "required": true, - "description": "Chain ID or name" - }, - { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", - "in": "path", - "name": "contractAddress", - "required": true, - "description": "Contract address" - } - ], - "responses": { - "200": { - "description": "Default Response", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "anyOf": [ - { - "type": "null" - }, - { - "type": "object", - "properties": { - "price": { - "type": "string" - }, - "currencyAddress": { - "description": "A contract or wallet address", - "examples": [ - "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" - ], - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "address": { - "description": "A contract or wallet address", - "examples": [ - "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" - ], - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, - "maxClaimable": { - "type": "string" - }, - "proof": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "address", - "maxClaimable", - "proof" - ] - } - ] - } - }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -38411,19 +29580,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38449,19 +29610,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38487,19 +29640,183 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "Transaction simulation failed with reason: types/values length mismatch", + "code": "INTERNAL_SERVER_ERROR", + "statusCode": 500 + } + } + } + } + } + } + } + }, + "/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs": { + "get": { + "operationId": "getClaimerProofs", + "summary": "Get claimer proofs", + "tags": ["ERC721"], + "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", + "parameters": [ + { + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "query", + "name": "walletAddress", + "required": true, + "description": "The wallet address to get the merkle proofs for." + }, + { + "schema": { "type": "string" }, + "example": "80002", + "in": "path", + "name": "chain", + "required": true, + "description": "Chain ID or name" + }, + { + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, + "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", + "in": "path", + "name": "contractAddress", + "required": true, + "description": "Contract address" + } + ], + "responses": { + "200": { + "description": "Default Response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "anyOf": [ + { "type": "null" }, + { + "type": "object", + "properties": { + "price": { "type": "string" }, + "currencyAddress": { + "description": "A contract or wallet address", + "examples": [ + "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" + ], + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "address": { + "description": "A contract or wallet address", + "examples": [ + "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" + ], + "type": "string", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "maxClaimable": { "type": "string" }, + "proof": { + "type": "array", + "items": { "type": "string" } + } + }, + "required": ["address", "maxClaimable", "proof"] } + ] + } + }, + "required": ["result"] + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/json": { + "schema": { + "description": "Bad Request", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "", + "code": "BAD_REQUEST", + "statusCode": 400 + } + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/json": { + "schema": { + "description": "Not Found", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } + } + } + } + }, + "example": { + "error": { + "message": "Transaction not found with queueId 9eb88b00-f04f-409b-9df7-7dcc9003bc35", + "code": "NOT_FOUND", + "statusCode": 404 + } + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/json": { + "schema": { + "description": "Internal Server Error", + "type": "object", + "properties": { + "error": { + "type": "object", + "properties": { + "message": { "type": "string" }, + "reason": {}, + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38521,9 +29838,7 @@ "post": { "operationId": "setApprovalForAll", "summary": "Set approval for all", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.", "requestBody": { "content": { @@ -38565,10 +29880,7 @@ } } }, - "required": [ - "operator", - "approved" - ] + "required": ["operator", "approved"] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -38580,19 +29892,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -38600,10 +29907,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38611,10 +29915,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -38622,19 +29923,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -38642,10 +29938,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -38669,14 +29962,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38697,19 +29986,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38735,19 +30016,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38773,19 +30046,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -38807,9 +30072,7 @@ "post": { "operationId": "setApprovalForToken", "summary": "Set approval for token", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token.", "requestBody": { "content": { @@ -38851,10 +30114,7 @@ } } }, - "required": [ - "operator", - "tokenId" - ] + "required": ["operator", "tokenId"] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -38866,19 +30126,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -38886,10 +30141,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -38897,10 +30149,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -38908,19 +30157,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -38928,10 +30172,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -38955,14 +30196,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -38983,19 +30220,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39021,19 +30250,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39059,19 +30280,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39093,9 +30306,7 @@ "post": { "operationId": "transfer", "summary": "Transfer token", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Transfer an ERC-721 token from the caller wallet.", "requestBody": { "content": { @@ -39137,10 +30348,7 @@ } } }, - "required": [ - "to", - "tokenId" - ] + "required": ["to", "tokenId"] }, "example": { "to": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39152,19 +30360,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -39172,10 +30375,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39183,10 +30383,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39194,19 +30391,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39214,10 +30406,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39241,14 +30430,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39269,19 +30454,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39307,19 +30484,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39345,19 +30514,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39379,9 +30540,7 @@ "post": { "operationId": "transferFrom", "summary": "Transfer token from wallet", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -39427,11 +30586,7 @@ } } }, - "required": [ - "from", - "to", - "tokenId" - ] + "required": ["from", "to", "tokenId"] }, "example": { "from": "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", @@ -39444,19 +30599,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -39464,10 +30614,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39475,10 +30622,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39486,19 +30630,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39506,10 +30645,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39533,14 +30669,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39561,19 +30693,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39599,19 +30723,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39637,19 +30753,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39671,9 +30779,7 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Mint ERC-721 tokens to a specific wallet.", "requestBody": { "content": { @@ -39693,59 +30799,25 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "image": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The image of the NFT" }, "external_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The animation url of the NFT" }, "properties": { @@ -39755,21 +30827,12 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "txOverrides": { @@ -39798,10 +30861,7 @@ } } }, - "required": [ - "receiver", - "metadata" - ] + "required": ["receiver", "metadata"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -39817,19 +30877,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -39837,10 +30892,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -39848,10 +30900,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -39859,19 +30908,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -39879,10 +30923,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -39906,14 +30947,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -39934,19 +30971,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -39972,19 +31001,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40010,19 +31031,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40044,9 +31057,7 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Mint ERC-721 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -40068,58 +31079,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -40131,20 +31120,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] } }, @@ -40174,10 +31157,7 @@ } } }, - "required": [ - "receiver", - "metadatas" - ] + "required": ["receiver", "metadatas"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -40200,19 +31180,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -40220,10 +31195,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40231,10 +31203,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40242,19 +31211,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40262,10 +31226,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40289,14 +31250,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40317,19 +31274,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40355,19 +31304,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40393,19 +31334,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40427,9 +31360,7 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Burn ERC-721 tokens in the caller wallet.", "requestBody": { "content": { @@ -40467,32 +31398,23 @@ } } }, - "required": [ - "tokenId" - ] + "required": ["tokenId"] }, - "example": { - "tokenId": "0" - } + "example": { "tokenId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -40500,10 +31422,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40511,10 +31430,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40522,19 +31438,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40542,10 +31453,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40569,14 +31477,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40597,19 +31501,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40635,19 +31531,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40673,19 +31561,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -40707,9 +31587,7 @@ "post": { "operationId": "lazyMint", "summary": "Lazy mint", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Lazy mint ERC-721 tokens to be claimed in the future.", "requestBody": { "content": { @@ -40727,58 +31605,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -40790,20 +31646,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] } }, @@ -40833,9 +31683,7 @@ } } }, - "required": [ - "metadatas" - ] + "required": ["metadatas"] }, "example": { "metadatas": [ @@ -40857,19 +31705,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -40877,10 +31720,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -40888,10 +31728,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -40899,19 +31736,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -40919,10 +31751,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -40946,14 +31775,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -40974,19 +31799,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41012,19 +31829,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41050,19 +31859,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41084,9 +31885,7 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Claim ERC-721 tokens to a specific wallet.", "requestBody": { "content": { @@ -41128,10 +31927,7 @@ } } }, - "required": [ - "receiver", - "quantity" - ] + "required": ["receiver", "quantity"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -41143,19 +31939,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -41163,10 +31954,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41174,10 +31962,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -41185,19 +31970,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -41205,10 +31985,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -41232,14 +32009,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -41260,19 +32033,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41298,19 +32063,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41336,19 +32093,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -41370,9 +32119,7 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -41414,58 +32161,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -41477,20 +32202,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "currencyAddress": { @@ -41507,9 +32226,7 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] }, "mintEndTime": { @@ -41518,16 +32235,11 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] } }, - "required": [ - "to", - "metadata" - ], + "required": ["to", "metadata"], "examples": [ { "to": "0x...", @@ -41546,9 +32258,7 @@ "properties": { "metadata": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "object", "properties": { @@ -41585,17 +32295,10 @@ "items": { "type": "object", "properties": { - "trait_type": { - "type": "string" - }, - "value": { - "type": "string" - } + "trait_type": { "type": "string" }, + "value": { "type": "string" } }, - "required": [ - "trait_type", - "value" - ] + "required": ["trait_type", "value"] } } } @@ -41659,10 +32362,7 @@ "type": "string" } }, - "required": [ - "metadata", - "to" - ] + "required": ["metadata", "to"] } ] } @@ -41671,9 +32371,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -41681,10 +32379,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -41692,10 +32387,7 @@ "description": "ERC721 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -41703,19 +32395,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -41723,10 +32410,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -41734,9 +32418,7 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -41759,9 +32441,7 @@ "payload": { "type": "object", "properties": { - "uri": { - "type": "string" - }, + "uri": { "type": "string" }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -41794,58 +32474,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -41857,20 +32515,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "currencyAddress": { @@ -41930,14 +32582,9 @@ } ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, { "type": "object", @@ -41945,15 +32592,9 @@ "payload": { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "to": { - "type": "string" - }, - "price": { - "type": "string" - }, + "uri": { "type": "string" }, + "to": { "type": "string" }, + "price": { "type": "string" }, "currency": { "description": "A contract or wallet address", "examples": [ @@ -41962,24 +32603,12 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "primarySaleRecipient": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "primarySaleRecipient": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "uri", @@ -41994,21 +32623,14 @@ "uid" ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] } ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "payload": { @@ -42046,19 +32668,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42084,19 +32698,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42122,19 +32728,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42156,9 +32754,7 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Mint ERC-721 tokens from a generated signature.", "requestBody": { "content": { @@ -42171,9 +32767,7 @@ { "type": "object", "properties": { - "uri": { - "type": "string" - }, + "uri": { "type": "string" }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -42206,58 +32800,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -42269,20 +32841,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "currencyAddress": { @@ -42345,15 +32911,9 @@ { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "to": { - "type": "string" - }, - "price": { - "type": "string" - }, + "uri": { "type": "string" }, + "to": { "type": "string" }, + "price": { "type": "string" }, "currency": { "description": "A contract or wallet address", "examples": [ @@ -42362,24 +32922,12 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "primarySaleRecipient": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "primarySaleRecipient": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "uri", @@ -42396,9 +32944,7 @@ } ] }, - "signature": { - "type": "string" - }, + "signature": { "type": "string" }, "txOverrides": { "type": "object", "properties": { @@ -42425,10 +32971,7 @@ } } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, "example": { "payload": { @@ -42456,19 +32999,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -42476,10 +33014,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42487,10 +33022,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -42498,19 +33030,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -42518,10 +33045,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -42545,14 +33069,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -42573,19 +33093,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42611,19 +33123,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42649,19 +33153,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -42683,9 +33179,7 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for the drop.", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -42699,35 +33193,16 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -42736,54 +33211,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -42791,12 +33236,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -42817,31 +33258,21 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } } }, - "resetClaimEligibilityForAll": { - "type": "boolean" - }, + "resetClaimEligibilityForAll": { "type": "boolean" }, "txOverrides": { "type": "object", "properties": { @@ -42868,9 +33299,7 @@ } } }, - "required": [ - "claimConditionInputs" - ] + "required": ["claimConditionInputs"] } } }, @@ -42878,19 +33307,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -42898,10 +33322,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -42909,10 +33330,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -42920,19 +33338,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -42940,10 +33353,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -42967,14 +33377,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -42995,19 +33401,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43033,19 +33431,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43071,19 +33461,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43105,9 +33487,7 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -43119,35 +33499,16 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -43156,54 +33517,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -43211,12 +33542,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -43237,23 +33564,15 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } @@ -43288,10 +33607,7 @@ } } }, - "required": [ - "claimConditionInput", - "index" - ] + "required": ["claimConditionInput", "index"] } } }, @@ -43299,19 +33615,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -43319,10 +33630,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43330,10 +33638,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -43341,19 +33646,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -43361,10 +33661,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -43388,14 +33685,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -43416,19 +33709,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43454,19 +33739,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43492,19 +33769,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -43526,9 +33795,7 @@ "post": { "operationId": "signaturePrepare", "summary": "Prepare signature", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Prepares a payload for a wallet to generate a signature.", "requestBody": { "content": { @@ -43538,9 +33805,7 @@ "properties": { "metadata": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "object", "properties": { @@ -43577,17 +33842,10 @@ "items": { "type": "object", "properties": { - "trait_type": { - "type": "string" - }, - "value": { - "type": "string" - } + "trait_type": { "type": "string" }, + "value": { "type": "string" } }, - "required": [ - "trait_type", - "value" - ] + "required": ["trait_type", "value"] } } } @@ -43643,10 +33901,7 @@ "type": "string" } }, - "required": [ - "metadata", - "to" - ] + "required": ["metadata", "to"] } } }, @@ -43654,9 +33909,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -43664,10 +33917,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -43689,39 +33939,21 @@ "mintPayload": { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "to": { - "type": "string" - }, - "price": { - "type": "string" - }, + "uri": { "type": "string" }, + "to": { "type": "string" }, + "price": { "type": "string" }, "currency": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "primarySaleRecipient": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "primarySaleRecipient": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "uri", @@ -43744,18 +33976,10 @@ "description": "Specifies the contextual information used to prevent signature reuse across different contexts.", "type": "object", "properties": { - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "chainId": { - "type": "number" - }, - "verifyingContract": { - "type": "string" - } + "name": { "type": "string" }, + "version": { "type": "string" }, + "chainId": { "type": "number" }, + "verifyingContract": { "type": "string" } }, "required": [ "name", @@ -43773,17 +33997,10 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } + "name": { "type": "string" }, + "type": { "type": "string" } }, - "required": [ - "name", - "type" - ] + "required": ["name", "type"] } }, "MintRequest": { @@ -43791,61 +34008,33 @@ "items": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - } + "name": { "type": "string" }, + "type": { "type": "string" } }, - "required": [ - "name", - "type" - ] + "required": ["name", "type"] } } }, - "required": [ - "EIP712Domain", - "MintRequest" - ] + "required": ["EIP712Domain", "MintRequest"] }, "message": { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "to": { - "type": "string" - }, - "price": { - "type": "string" - }, + "uri": { "type": "string" }, + "to": { "type": "string" }, + "price": { "type": "string" }, "currency": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "primarySaleRecipient": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "primarySaleRecipient": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "uri", @@ -43864,9 +34053,7 @@ "primaryType": { "description": "The main type of the data in the message corresponding to a defined type in the `types` field.", "type": "string", - "enum": [ - "MintRequest" - ] + "enum": ["MintRequest"] } }, "required": [ @@ -43877,15 +34064,10 @@ ] } }, - "required": [ - "mintPayload", - "typedDataPayload" - ] + "required": ["mintPayload", "typedDataPayload"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "result": { @@ -43906,34 +34088,16 @@ }, "types": { "MintRequest": [ - { - "name": "to", - "type": "address" - }, - { - "name": "royaltyRecipient", - "type": "address" - }, - { - "name": "royaltyBps", - "type": "uint256" - }, + { "name": "to", "type": "address" }, + { "name": "royaltyRecipient", "type": "address" }, + { "name": "royaltyBps", "type": "uint256" }, { "name": "primarySaleRecipient", "type": "address" }, - { - "name": "uri", - "type": "string" - }, - { - "name": "price", - "type": "uint256" - }, - { - "name": "currency", - "type": "address" - }, + { "name": "uri", "type": "string" }, + { "name": "price", "type": "uint256" }, + { "name": "currency", "type": "address" }, { "name": "validityStartTimestamp", "type": "uint128" @@ -43942,10 +34106,7 @@ "name": "validityEndTimestamp", "type": "uint128" }, - { - "name": "uid", - "type": "bytes32" - } + { "name": "uid", "type": "bytes32" } ] }, "message": { @@ -43976,19 +34137,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44014,19 +34167,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44052,19 +34197,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44086,9 +34223,7 @@ "post": { "operationId": "updateTokenMetadata", "summary": "Update token metadata", - "tags": [ - "ERC721" - ], + "tags": ["ERC721"], "description": "Update the metadata for an ERC721 token.", "requestBody": { "content": { @@ -44106,59 +34241,25 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "image": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The image of the NFT" }, "external_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The animation url of the NFT" }, "properties": { @@ -44168,14 +34269,7 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The background color of the NFT" } } @@ -44206,10 +34300,7 @@ } } }, - "required": [ - "tokenId", - "metadata" - ] + "required": ["tokenId", "metadata"] } } }, @@ -44217,19 +34308,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -44237,10 +34323,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44248,10 +34331,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -44259,19 +34339,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -44279,10 +34354,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -44306,14 +34378,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -44334,19 +34402,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44372,19 +34432,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44410,19 +34462,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44444,15 +34488,11 @@ "get": { "operationId": "get", "summary": "Get details", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get the details for a token in an ERC-1155 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0", "in": "query", "name": "tokenId", @@ -44460,9 +34500,7 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -44470,10 +34508,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44496,116 +34531,59 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": { @@ -44636,19 +34614,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44674,19 +34644,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44712,19 +34674,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44746,15 +34700,11 @@ "get": { "operationId": "getAll", "summary": "Get all details", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get details for all tokens in an ERC-1155 contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "example": "0", "in": "query", "name": "start", @@ -44762,9 +34712,7 @@ "description": "The start token ID for paginated results. Defaults to 0." }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "example": "20", "in": "query", "name": "count", @@ -44772,9 +34720,7 @@ "description": "The page count for paginated results. Defaults to 100." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -44782,10 +34728,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -44810,117 +34753,60 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -44953,19 +34839,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -44991,19 +34869,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45029,19 +34899,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45063,16 +34925,11 @@ "get": { "operationId": "getOwned", "summary": "Get owned tokens", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get all tokens in an ERC-1155 contract owned by a specific wallet.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -45080,9 +34937,7 @@ "description": "Address of the wallet to get NFTs for" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -45090,10 +34945,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45118,117 +34970,60 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] - }, - "owner": { - "type": "string" + "required": ["id", "uri"] }, + "owner": { "type": "string" }, "type": { "anyOf": [ - { - "type": "string", - "enum": [ - "ERC1155" - ] - }, - { - "type": "string", - "enum": [ - "ERC721" - ] - }, - { - "type": "string", - "enum": [ - "metaplex" - ] - } + { "type": "string", "enum": ["ERC1155"] }, + { "type": "string", "enum": ["ERC721"] }, + { "type": "string", "enum": ["metaplex"] } ] }, - "supply": { - "type": "string" - }, - "quantityOwned": { - "type": "string" - } + "supply": { "type": "string" }, + "quantityOwned": { "type": "string" } }, - "required": [ - "metadata", - "owner", - "type", - "supply" - ] + "required": ["metadata", "owner", "type", "supply"] } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -45239,12 +35034,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "owner": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "type": "ERC1155", @@ -45267,19 +35057,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45305,19 +35087,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45343,19 +35117,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45377,16 +35143,11 @@ "get": { "operationId": "balanceOf", "summary": "Get balance", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get the balance of a specific wallet address for this ERC-1155 contract.", "parameters": [ { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -45394,9 +35155,7 @@ "description": "Address of the wallet to check NFT balance" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0", "in": "query", "name": "tokenId", @@ -45404,9 +35163,7 @@ "description": "The tokenId of the NFT to check balance of" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -45414,10 +35171,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45432,15 +35186,9 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - } + "properties": { "result": { "type": "string" } } }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -45455,19 +35203,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45493,19 +35233,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45531,19 +35263,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45565,15 +35289,11 @@ "get": { "operationId": "isApproved", "summary": "Check if approved transfers", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Check if the specific wallet has approved transfers from a specific operator wallet.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x3EcDBF3B911d0e9052b64850693888b008e18373", "in": "query", "name": "ownerWallet", @@ -45581,9 +35301,7 @@ "description": "Address of the wallet who owns the NFT" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "operator", @@ -45591,9 +35309,7 @@ "description": "Address of the operator to check approval on" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -45601,10 +35317,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45619,15 +35332,9 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - } + "properties": { "result": { "type": "boolean" } } }, - "example": { - "result": true - } + "example": { "result": true } } } }, @@ -45642,19 +35349,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45680,19 +35379,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45718,19 +35409,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45752,15 +35435,11 @@ "get": { "operationId": "totalCount", "summary": "Get total supply", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get the total supply in circulation for this ERC-1155 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -45768,10 +35447,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45786,14 +35462,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "example": { - "result": "1" - } + "properties": { "result": { "type": "string" } }, + "example": { "result": "1" } } } } @@ -45809,19 +35479,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45847,19 +35509,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45885,19 +35539,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -45919,15 +35565,11 @@ "get": { "operationId": "totalSupply", "summary": "Get total supply", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get the total supply in circulation for this ERC-1155 contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0", "in": "query", "name": "tokenId", @@ -45935,9 +35577,7 @@ "description": "The tokenId of the NFT to retrieve" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -45945,10 +35585,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -45963,16 +35600,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "example": [ - { - "result": "100000000" - } - ] + "properties": { "result": { "type": "string" } }, + "example": [{ "result": "100000000" }] } } } @@ -45988,19 +35617,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46026,19 +35647,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46064,19 +35677,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46098,9 +35703,7 @@ "post": { "operationId": "signatureGenerate", "summary": "Generate signature", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner.", "requestBody": { "content": { @@ -46126,58 +35729,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -46189,20 +35770,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "royaltyRecipient": { @@ -46235,9 +35810,7 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] }, "mintEndTime": { @@ -46246,17 +35819,11 @@ "description": "The time until which the signature can be used to mint tokens. Defaults to 10 years from now.", "type": "string" }, - { - "type": "number" - } + { "type": "number" } ] } }, - "required": [ - "to", - "quantity", - "metadata" - ], + "required": ["to", "quantity", "metadata"], "examples": [ { "to": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", @@ -46277,59 +35844,26 @@ "properties": { "contractType": { "anyOf": [ + { "type": "string", "enum": ["TokenERC1155"] }, { "type": "string", - "enum": [ - "TokenERC1155" - ] - }, - { - "type": "string", - "enum": [ - "SignatureMintERC1155" - ] + "enum": ["SignatureMintERC1155"] } ] }, - "to": { - "type": "string" - }, - "quantity": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "number" - }, - "primarySaleRecipient": { - "type": "string" - }, - "pricePerToken": { - "type": "string" - }, - "pricePerTokenWei": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "to": { "type": "string" }, + "quantity": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "number" }, + "primarySaleRecipient": { "type": "string" }, + "pricePerToken": { "type": "string" }, + "pricePerTokenWei": { "type": "string" }, + "currency": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, - "required": [ - "to", - "quantity", - "validityStartTimestamp" - ] + "required": ["to", "quantity", "validityStartTimestamp"] }, { "anyOf": [ @@ -46374,41 +35908,24 @@ "items": { "type": "object", "properties": { - "trait_type": { - "type": "string" - }, - "value": { - "type": "string" - } + "trait_type": { "type": "string" }, + "value": { "type": "string" } }, - "required": [ - "trait_type", - "value" - ] + "required": ["trait_type", "value"] } } } }, - { - "type": "string" - } + { "type": "string" } ] } }, - "required": [ - "metadata" - ] + "required": ["metadata"] }, { "type": "object", - "properties": { - "tokenId": { - "type": "string" - } - }, - "required": [ - "tokenId" - ] + "properties": { "tokenId": { "type": "string" } }, + "required": ["tokenId"] } ] } @@ -46421,9 +35938,7 @@ }, "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -46431,10 +35946,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46442,10 +35954,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -46453,19 +35962,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -46473,10 +35977,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -46484,9 +35985,7 @@ "description": "Smart account factory address. If omitted, engine will try to resolve it from the chain." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-thirdweb-sdk-version", "required": false, @@ -46509,12 +36008,8 @@ "payload": { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, + "uri": { "type": "string" }, + "tokenId": { "type": "string" }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -46547,58 +36042,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -46610,20 +36083,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "currencyAddress": { @@ -46687,14 +36154,9 @@ } ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, { "type": "object", @@ -46702,42 +36164,18 @@ "payload": { "type": "object", "properties": { - "to": { - "type": "string" - }, - "royaltyRecipient": { - "type": "string" - }, - "royaltyBps": { - "type": "string" - }, - "primarySaleRecipient": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, - "uri": { - "type": "string" - }, - "quantity": { - "type": "string" - }, - "pricePerToken": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "validityStartTimestamp": { - "type": "integer" - }, - "validityEndTimestamp": { - "type": "integer" - }, - "uid": { - "type": "string" - } + "to": { "type": "string" }, + "royaltyRecipient": { "type": "string" }, + "royaltyBps": { "type": "string" }, + "primarySaleRecipient": { "type": "string" }, + "tokenId": { "type": "string" }, + "uri": { "type": "string" }, + "quantity": { "type": "string" }, + "pricePerToken": { "type": "string" }, + "currency": { "type": "string" }, + "validityStartTimestamp": { "type": "integer" }, + "validityEndTimestamp": { "type": "integer" }, + "uid": { "type": "string" } }, "required": [ "to", @@ -46754,24 +36192,15 @@ "uid" ] }, - "signature": { - "type": "string" - } + "signature": { "type": "string" } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] } ] } }, - "required": [ - "result" - ], - "example": { - "result": "1" - } + "required": ["result"], + "example": { "result": "1" } } } } @@ -46787,19 +36216,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46825,19 +36246,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46863,19 +36276,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -46897,33 +36302,25 @@ "get": { "operationId": "canClaim", "summary": "Check if tokens are available for claiming", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -46931,9 +36328,7 @@ "description": "The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -46941,10 +36336,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -46959,14 +36351,8 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] } } } @@ -46982,19 +36368,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47020,19 +36398,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47058,19 +36428,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47092,40 +36454,25 @@ "get": { "operationId": "getActiveClaimConditions", "summary": "Get currently active claim phase for a specific token ID.", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Retrieve the currently active claim phase for a specific token ID, if any.", "parameters": [ { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, + "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to claim." }, { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -47133,10 +36480,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47156,28 +36500,14 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "format": "date-time", "type": "string" }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -47186,62 +36516,27 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -47254,23 +36549,12 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "null" }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -47278,12 +36562,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -47304,18 +36584,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -47330,9 +36604,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -47348,19 +36620,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47386,19 +36650,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47424,19 +36680,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47458,40 +36706,25 @@ "get": { "operationId": "getAllClaimConditions", "summary": "Get all the claim phases configured for a specific token ID.", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get all the claim phases configured for a specific token ID.", "parameters": [ { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, + "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to get the claim conditions for." }, { - "schema": { - "type": "boolean" - }, + "schema": { "type": "boolean" }, "in": "query", "name": "withAllowList", "required": false, "description": "Provide a boolean value to include the allowlist in the response." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -47499,10 +36732,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47525,12 +36755,8 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "startTime": { @@ -47539,12 +36765,8 @@ }, "price": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "currencyAddress": { @@ -47555,61 +36777,32 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "waitInSeconds": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, - "availableSupply": { - "type": "string" - }, - "currentMintSupply": { - "type": "string" - }, + "availableSupply": { "type": "string" }, + "currentMintSupply": { "type": "string" }, "currencyMetadata": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -47622,22 +36815,14 @@ }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "null" - }, + { "type": "null" }, { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, { "type": "array", @@ -47646,12 +36831,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -47672,18 +36853,12 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } } ] @@ -47699,9 +36874,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -47717,19 +36890,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47755,19 +36920,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47793,19 +36950,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47827,32 +36976,18 @@ "get": { "operationId": "getClaimerProofs", "summary": "Get claimer proofs", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address.", "parameters": [ { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, + "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to get the claimer proofs for." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -47860,9 +36995,7 @@ "description": "The wallet address to get the merkle proofs for." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -47870,10 +37003,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -47891,15 +37021,11 @@ "properties": { "result": { "anyOf": [ - { - "type": "null" - }, + { "type": "null" }, { "type": "object", "properties": { - "price": { - "type": "string" - }, + "price": { "type": "string" }, "currencyAddress": { "description": "A contract or wallet address", "examples": [ @@ -47916,28 +37042,18 @@ "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, - "maxClaimable": { - "type": "string" - }, + "maxClaimable": { "type": "string" }, "proof": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } } }, - "required": [ - "address", - "maxClaimable", - "proof" - ] + "required": ["address", "maxClaimable", "proof"] } ] } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -47953,19 +37069,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -47991,19 +37099,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48029,19 +37129,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48063,40 +37155,25 @@ "post": { "operationId": "getClaimIneligibilityReasons", "summary": "Get claim ineligibility reasons", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.", "parameters": [ { - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] - }, + "schema": { "anyOf": [{ "type": "string" }, { "type": "number" }] }, "in": "query", "name": "tokenId", "required": true, "description": "The token ID of the NFT you want to check if the wallet address can claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "quantity", "required": true, "description": "The amount of tokens to claim." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "0x1946267d81Fb8aDeeEa28e6B98bcD446c8248473", "in": "query", "name": "addressToCheck", @@ -48104,9 +37181,7 @@ "description": "The wallet address to check if it can claim tokens." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -48114,10 +37189,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48137,16 +37209,12 @@ "type": "array", "items": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "anyOf": [ { "type": "string", - "enum": [ - "There is not enough supply to claim." - ] + "enum": ["There is not enough supply to claim."] }, { "type": "string", @@ -48162,21 +37230,15 @@ }, { "type": "string", - "enum": [ - "Claim phase has not started yet." - ] + "enum": ["Claim phase has not started yet."] }, { "type": "string", - "enum": [ - "You have already claimed the token." - ] + "enum": ["You have already claimed the token."] }, { "type": "string", - "enum": [ - "Incorrect price or currency." - ] + "enum": ["Incorrect price or currency."] }, { "type": "string", @@ -48198,21 +37260,15 @@ }, { "type": "string", - "enum": [ - "There is no claim condition set." - ] + "enum": ["There is no claim condition set."] }, { "type": "string", - "enum": [ - "No wallet connected." - ] + "enum": ["No wallet connected."] }, { "type": "string", - "enum": [ - "No claim conditions found." - ] + "enum": ["No claim conditions found."] } ] } @@ -48220,9 +37276,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] } } } @@ -48238,19 +37292,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48276,19 +37322,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48314,19 +37352,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48348,9 +37378,7 @@ "post": { "operationId": "airdrop", "summary": "Airdrop tokens", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Airdrop ERC-1155 tokens to specific wallets.", "requestBody": { "content": { @@ -48374,15 +37402,9 @@ "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "quantity": { - "default": "1", - "type": "string" - } + "quantity": { "default": "1", "type": "string" } }, - "required": [ - "address", - "quantity" - ] + "required": ["address", "quantity"] } }, "txOverrides": { @@ -48411,10 +37433,7 @@ } } }, - "required": [ - "tokenId", - "addresses" - ] + "required": ["tokenId", "addresses"] }, "example": { "tokenId": "0", @@ -48435,19 +37454,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -48455,10 +37469,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48466,10 +37477,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -48477,19 +37485,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -48497,10 +37500,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -48524,14 +37524,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48552,19 +37548,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48590,19 +37578,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48628,19 +37608,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48662,9 +37634,7 @@ "post": { "operationId": "burn", "summary": "Burn token", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Burn ERC-1155 tokens in the caller wallet.", "requestBody": { "content": { @@ -48706,34 +37676,23 @@ } } }, - "required": [ - "tokenId", - "amount" - ] + "required": ["tokenId", "amount"] }, - "example": { - "tokenId": "0", - "amount": "1" - } + "example": { "tokenId": "0", "amount": "1" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -48741,10 +37700,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -48752,10 +37708,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -48763,19 +37716,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -48783,10 +37731,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -48810,14 +37755,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -48838,19 +37779,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48876,19 +37809,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48914,19 +37839,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -48948,9 +37865,7 @@ "post": { "operationId": "burnBatch", "summary": "Burn tokens (batch)", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Burn a batch of ERC-1155 tokens in the caller wallet.", "requestBody": { "content": { @@ -48998,40 +37913,23 @@ } } }, - "required": [ - "tokenIds", - "amounts" - ] + "required": ["tokenIds", "amounts"] }, - "example": { - "tokenIds": [ - "0", - "1" - ], - "amounts": [ - "1", - "1" - ] - } + "example": { "tokenIds": ["0", "1"], "amounts": ["1", "1"] } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -49039,10 +37937,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49050,10 +37945,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49061,19 +37953,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49081,10 +37968,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49108,14 +37992,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49136,19 +38016,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49174,19 +38046,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49212,19 +38076,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49246,9 +38102,7 @@ "post": { "operationId": "claimTo", "summary": "Claim tokens to wallet", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Claim ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -49294,11 +38148,7 @@ } } }, - "required": [ - "receiver", - "tokenId", - "quantity" - ] + "required": ["receiver", "tokenId", "quantity"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -49311,19 +38161,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -49331,10 +38176,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49342,10 +38184,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49353,19 +38192,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49373,10 +38207,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49400,14 +38231,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49428,19 +38255,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49466,19 +38285,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49504,19 +38315,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49538,9 +38341,7 @@ "post": { "operationId": "lazyMint", "summary": "Lazy mint", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Lazy mint ERC-1155 tokens to be claimed in the future.", "requestBody": { "content": { @@ -49558,58 +38359,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -49621,20 +38400,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] } }, @@ -49664,9 +38437,7 @@ } } }, - "required": [ - "metadatas" - ] + "required": ["metadatas"] }, "example": { "metadatas": [ @@ -49688,19 +38459,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -49708,10 +38474,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -49719,10 +38482,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -49730,19 +38490,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -49750,10 +38505,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -49777,14 +38529,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -49805,19 +38553,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49843,19 +38583,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49881,19 +38613,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -49915,9 +38639,7 @@ "post": { "operationId": "mintAdditionalSupplyTo", "summary": "Mint additional supply", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Mint additional supply of ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -49963,11 +38685,7 @@ } } }, - "required": [ - "receiver", - "tokenId", - "additionalSupply" - ] + "required": ["receiver", "tokenId", "additionalSupply"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -49980,19 +38698,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -50000,10 +38713,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -50011,10 +38721,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -50022,19 +38729,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -50042,10 +38744,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -50069,14 +38768,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -50097,19 +38792,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50135,19 +38822,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50173,19 +38852,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50207,9 +38878,7 @@ "post": { "operationId": "mintBatchTo", "summary": "Mint tokens (batch)", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Mint ERC-1155 tokens to multiple wallets in one transaction.", "requestBody": { "content": { @@ -50234,58 +38903,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -50297,30 +38944,19 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, - "supply": { - "type": "string" - } + "supply": { "type": "string" } }, - "required": [ - "metadata", - "supply" - ] + "required": ["metadata", "supply"] } }, "txOverrides": { @@ -50349,10 +38985,7 @@ } } }, - "required": [ - "receiver", - "metadataWithSupply" - ] + "required": ["receiver", "metadataWithSupply"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -50381,19 +39014,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -50401,10 +39029,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -50412,10 +39037,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -50423,19 +39045,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -50443,10 +39060,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -50470,14 +39084,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -50498,19 +39108,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50536,19 +39138,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50574,19 +39168,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50608,9 +39194,7 @@ "post": { "operationId": "mintTo", "summary": "Mint tokens", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Mint ERC-1155 tokens to a specific wallet.", "requestBody": { "content": { @@ -50633,58 +39217,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -50696,30 +39258,19 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, - "supply": { - "type": "string" - } + "supply": { "type": "string" } }, - "required": [ - "metadata", - "supply" - ] + "required": ["metadata", "supply"] }, "txOverrides": { "type": "object", @@ -50747,10 +39298,7 @@ } } }, - "required": [ - "receiver", - "metadataWithSupply" - ] + "required": ["receiver", "metadataWithSupply"] }, "example": { "receiver": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -50769,19 +39317,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -50789,10 +39332,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -50800,10 +39340,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -50811,19 +39348,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -50831,10 +39363,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -50858,14 +39387,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -50886,19 +39411,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50924,19 +39441,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50962,19 +39471,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -50996,9 +39497,7 @@ "post": { "operationId": "setApprovalForAll", "summary": "Set approval for all", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.", "requestBody": { "content": { @@ -51040,10 +39539,7 @@ } } }, - "required": [ - "operator", - "approved" - ] + "required": ["operator", "approved"] }, "example": { "operator": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -51055,19 +39551,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -51075,10 +39566,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -51086,10 +39574,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -51097,19 +39582,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -51117,10 +39597,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -51144,14 +39621,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -51172,19 +39645,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51210,19 +39675,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51248,19 +39705,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51282,9 +39731,7 @@ "post": { "operationId": "transfer", "summary": "Transfer token", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Transfer an ERC-1155 token from the caller wallet.", "requestBody": { "content": { @@ -51330,11 +39777,7 @@ } } }, - "required": [ - "to", - "tokenId", - "amount" - ] + "required": ["to", "tokenId", "amount"] }, "example": { "to": "0x3EcDBF3B911d0e9052b64850693888b008e18373", @@ -51347,19 +39790,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -51367,10 +39805,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -51378,10 +39813,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -51389,19 +39821,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -51409,10 +39836,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -51436,14 +39860,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -51464,19 +39884,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51502,19 +39914,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51540,19 +39944,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51574,9 +39970,7 @@ "post": { "operationId": "transferFrom", "summary": "Transfer token from wallet", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance.", "requestBody": { "content": { @@ -51626,12 +40020,7 @@ } } }, - "required": [ - "from", - "to", - "tokenId", - "amount" - ] + "required": ["from", "to", "tokenId", "amount"] }, "example": { "from": "0xE79ee09bD47F4F5381dbbACaCff2040f2FbC5803", @@ -51645,19 +40034,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -51665,10 +40049,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -51676,10 +40057,7 @@ "description": "ERC1155 contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -51687,19 +40065,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -51707,10 +40080,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -51734,14 +40104,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -51762,19 +40128,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51800,19 +40158,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51838,19 +40188,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -51872,9 +40214,7 @@ "post": { "operationId": "signatureMint", "summary": "Signature mint", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Mint ERC-1155 tokens from a generated signature.", "requestBody": { "content": { @@ -51885,12 +40225,8 @@ "payload": { "type": "object", "properties": { - "uri": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, + "uri": { "type": "string" }, + "tokenId": { "type": "string" }, "to": { "description": "The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves.", "type": "string" @@ -51923,58 +40259,36 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The image of the NFT" }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The external url of the NFT" }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The animation url of the NFT" }, @@ -51986,20 +40300,14 @@ }, "background_color": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ], "description": "The background color of the NFT" } } }, - { - "type": "string" - } + { "type": "string" } ] }, "currencyAddress": { @@ -52059,9 +40367,7 @@ "signature": "0x674414eb46d1be3fb8f703b51049aa857b27c70c72293f054ed211be0efb843841bcd86b1245c321b20e50e2a9bebb555e70246d84778d5e76668db2f102c6401b" } }, - "signature": { - "type": "string" - }, + "signature": { "type": "string" }, "txOverrides": { "type": "object", "properties": { @@ -52088,34 +40394,23 @@ } } }, - "required": [ - "payload", - "signature" - ] + "required": ["payload", "signature"] }, - "example": { - "payload": {}, - "signature": "" - } + "example": { "payload": {}, "signature": "" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -52123,10 +40418,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -52134,10 +40426,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -52145,19 +40434,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -52165,10 +40449,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -52192,14 +40473,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -52220,19 +40497,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52258,19 +40527,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52296,19 +40557,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52330,9 +40583,7 @@ "post": { "operationId": "setClaimConditions", "summary": "Overwrite the claim conditions for a specific token ID..", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately.", "requestBody": { "content": { @@ -52342,14 +40593,7 @@ "properties": { "tokenId": { "description": "ID of the token to set the claim conditions for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "claimConditionInputs": { "type": "array", @@ -52357,35 +40601,16 @@ "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -52394,54 +40619,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -52449,12 +40644,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -52475,31 +40666,21 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } } }, - "resetClaimEligibilityForAll": { - "type": "boolean" - }, + "resetClaimEligibilityForAll": { "type": "boolean" }, "txOverrides": { "type": "object", "properties": { @@ -52526,10 +40707,7 @@ } } }, - "required": [ - "tokenId", - "claimConditionInputs" - ] + "required": ["tokenId", "claimConditionInputs"] } } }, @@ -52537,19 +40715,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -52557,10 +40730,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -52568,10 +40738,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -52579,19 +40746,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -52599,10 +40761,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -52626,14 +40785,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -52654,19 +40809,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52692,19 +40839,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52730,19 +40869,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -52764,9 +40895,7 @@ "post": { "operationId": "claimConditionsUpdate", "summary": "Overwrite the claim conditions for a specific token ID..", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Allows you to set claim conditions for multiple token IDs in a single transaction.", "requestBody": { "content": { @@ -52781,14 +40910,7 @@ "properties": { "tokenId": { "description": "ID of the token to set the claim conditions for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "claimConditions": { "type": "array", @@ -52797,33 +40919,20 @@ "properties": { "maxClaimableSupply": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "currencyAddress": { @@ -52834,52 +40943,34 @@ }, "maxClaimablePerWallet": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "waitInSeconds": { "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } + { "type": "number" }, + { "type": "string" } ] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, + { "type": "string" }, { "type": "array", - "items": { - "type": "number" - } + "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, { "type": "array", @@ -52888,12 +40979,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -52914,38 +41001,25 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } } } }, - "required": [ - "tokenId", - "claimConditions" - ] + "required": ["tokenId", "claimConditions"] } }, - "resetClaimEligibilityForAll": { - "type": "boolean" - }, + "resetClaimEligibilityForAll": { "type": "boolean" }, "txOverrides": { "type": "object", "properties": { @@ -52972,9 +41046,7 @@ } } }, - "required": [ - "claimConditionsForToken" - ] + "required": ["claimConditionsForToken"] } } }, @@ -52982,19 +41054,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -53002,10 +41069,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -53013,10 +41077,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -53024,19 +41085,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -53044,10 +41100,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -53071,14 +41124,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -53099,19 +41148,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53137,19 +41178,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53175,19 +41208,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53209,9 +41234,7 @@ "post": { "operationId": "updateClaimConditions", "summary": "Update a single claim phase.", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration.", "requestBody": { "content": { @@ -53221,48 +41244,22 @@ "properties": { "tokenId": { "description": "Token ID to update claim phase for", - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "claimConditionInput": { "type": "object", "properties": { "maxClaimableSupply": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } - ] + "anyOf": [{ "type": "string" }, { "type": "number" }] }, "startTime": { "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "number" - } + { "format": "date-time", "type": "string" }, + { "type": "number" } ] }, "price": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "currencyAddress": { "description": "A contract or wallet address", @@ -53271,54 +41268,24 @@ "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, "maxClaimablePerWallet": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "waitInSeconds": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "string" - } - ] + "anyOf": [{ "type": "number" }, { "type": "string" }] }, "merkleRootHash": { "anyOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "number" - } - } + { "type": "string" }, + { "type": "array", "items": { "type": "number" } } ] }, "metadata": { "type": "object", - "properties": { - "name": { - "type": "string" - } - } + "properties": { "name": { "type": "string" } } }, "snapshot": { "anyOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, + { "type": "array", "items": { "type": "string" } }, { "type": "array", "items": { @@ -53326,12 +41293,8 @@ "properties": { "price": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] }, "currencyAddress": { @@ -53352,23 +41315,15 @@ }, "maxClaimable": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - } + { "type": "string" }, + { "type": "number" } ] } }, - "required": [ - "address" - ] + "required": ["address"] } }, - { - "type": "null" - } + { "type": "null" } ] } } @@ -53403,11 +41358,7 @@ } } }, - "required": [ - "tokenId", - "claimConditionInput", - "index" - ] + "required": ["tokenId", "claimConditionInput", "index"] } } }, @@ -53415,19 +41366,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -53435,10 +41381,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -53446,10 +41389,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -53457,19 +41397,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -53477,10 +41412,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -53504,14 +41436,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -53532,19 +41460,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53570,19 +41490,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53608,19 +41520,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53642,9 +41546,7 @@ "post": { "operationId": "updateTokenMetadata", "summary": "Update token metadata", - "tags": [ - "ERC1155" - ], + "tags": ["ERC1155"], "description": "Update the metadata for an ERC1155 token.", "requestBody": { "content": { @@ -53662,59 +41564,25 @@ "name": { "description": "The name of the NFT", "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "description": "The description of the NFT", - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ] + "anyOf": [{ "type": "string" }, { "type": "null" }] }, "image": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The image of the NFT" }, "external_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The external url of the NFT" }, "animation_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The animation url of the NFT" }, "properties": { @@ -53724,14 +41592,7 @@ "description": "The attributes of the NFT" }, "background_color": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], + "anyOf": [{ "type": "string" }, { "type": "null" }], "description": "The background color of the NFT" } } @@ -53762,10 +41623,7 @@ } } }, - "required": [ - "tokenId", - "metadata" - ] + "required": ["tokenId", "metadata"] } } }, @@ -53773,19 +41631,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -53793,10 +41646,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -53804,10 +41654,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -53815,19 +41662,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -53835,10 +41677,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -53862,14 +41701,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -53890,19 +41725,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53928,19 +41755,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -53966,19 +41785,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54000,60 +41811,46 @@ "get": { "operationId": "getAll", "summary": "Get all listings", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Get all direct listings for this marketplace contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -54061,10 +41858,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -54118,21 +41912,11 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -54147,111 +41931,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] }, "startTimeInSeconds": { @@ -54272,9 +41997,7 @@ } } }, - "required": [ - "result" - ], + "required": ["result"], "example": [ { "result": [ @@ -54300,10 +42023,7 @@ "description": "Origin", "external_url": "", "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } + { "trait_type": "Mode", "value": "GOD" } ] }, "status": 1, @@ -54328,19 +42048,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54366,19 +42078,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54404,19 +42108,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54438,60 +42134,46 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid listings", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -54499,10 +42181,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -54556,21 +42235,11 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -54585,111 +42254,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] }, "startTimeInSeconds": { @@ -54710,9 +42320,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -54737,12 +42345,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "status": 1, "startTimeInSeconds": 1686006043, @@ -54764,19 +42367,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54802,19 +42397,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54840,19 +42427,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -54874,24 +42453,18 @@ "get": { "operationId": "getListing", "summary": "Get direct listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Gets a direct listing on this marketplace contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -54899,10 +42472,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -54954,21 +42524,11 @@ "currencyValuePerToken": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -54983,111 +42543,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] }, "startTimeInSeconds": { @@ -55107,9 +42608,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -55142,19 +42641,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55180,19 +42671,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55218,19 +42701,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55252,25 +42727,18 @@ "get": { "operationId": "isBuyerApprovedForListing", "summary": "Check approved buyer", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Check if a buyer is approved to purchase a specific direct listing.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "walletAddress", @@ -55278,9 +42746,7 @@ "description": "The wallet address of the buyer to check." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -55288,10 +42754,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -55306,18 +42769,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] }, - "example": { - "result": true - } + "example": { "result": true } } } }, @@ -55332,19 +42787,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55370,19 +42817,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55408,19 +42847,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55442,25 +42873,18 @@ "get": { "operationId": "isCurrencyApprovedForListing", "summary": "Check approved currency", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Check if a currency is approved for a specific direct listing.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "query", "name": "currencyContractAddress", @@ -55468,9 +42892,7 @@ "description": "The smart contract address of the ERC20 token to check." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -55478,10 +42900,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -55496,18 +42915,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] }, - "example": { - "result": true - } + "example": { "result": true } } } }, @@ -55522,19 +42933,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55560,19 +42963,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55598,19 +42993,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55632,15 +43019,11 @@ "get": { "operationId": "getTotalCount", "summary": "Transfer token from wallet", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Get the total number of direct listings on this marketplace contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -55648,10 +43031,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -55666,18 +43046,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -55692,19 +43064,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55730,19 +43094,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55768,19 +43124,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -55802,60 +43150,46 @@ "get": { "operationId": "getAll", "summary": "Get all English auctions", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get all English auction listings on this marketplace contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -55863,10 +43197,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -55920,21 +43251,11 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -55958,111 +43279,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -56080,9 +43342,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -56111,12 +43371,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "status": 1 } @@ -56136,19 +43391,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56174,19 +43421,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56212,19 +43451,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56246,60 +43477,46 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid English auctions", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get all valid English auction listings on this marketplace contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "seller", "required": false, "description": "Being sold by this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -56307,10 +43524,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -56364,21 +43578,11 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -56402,111 +43606,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -56524,9 +43669,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -56555,12 +43698,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "status": 1 } @@ -56580,19 +43718,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56618,19 +43748,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56656,19 +43778,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -56690,24 +43804,18 @@ "get": { "operationId": "getAuction", "summary": "Get English auction", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get a specific English auction listing on this marketplace contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -56715,10 +43823,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -56770,21 +43875,11 @@ "buyoutCurrencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." }, @@ -56808,111 +43903,52 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -56929,9 +43965,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -56964,19 +43998,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57002,19 +44028,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57040,19 +44058,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57074,24 +44084,18 @@ "get": { "operationId": "getBidBufferBps", "summary": "Get bid buffer BPS", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get the basis points of the bid buffer. \nThis is the percentage higher that a new bid must be than the current highest bid in order to be placed. \nIf there is no current bid, the bid must be at least the minimum bid amount.\nReturns the value in percentage format, e.g. 100 = 1%.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -57099,10 +44103,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -57123,13 +44124,9 @@ "type": "number" } }, - "required": [ - "result" - ] + "required": ["result"] }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -57144,19 +44141,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57182,19 +44171,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57220,19 +44201,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57254,24 +44227,18 @@ "get": { "operationId": "getMinimumNextBid", "summary": "Get minimum next bid", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Helper function to calculate the value that the next bid must be in order to be accepted. \nIf there is no current bid, the bid must be at least the minimum bid amount.\nIf there is a current bid, the bid must be at least the current bid amount + the bid buffer.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The id of the listing to retrieve." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -57279,10 +44246,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -57301,21 +44265,11 @@ "result": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -57327,13 +44281,9 @@ "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." } }, - "required": [ - "result" - ] + "required": ["result"] }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -57348,19 +44298,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57386,19 +44328,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57424,19 +44358,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57458,24 +44384,18 @@ "get": { "operationId": "getWinningBid", "summary": "Get winning bid", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get the current highest bid of an active auction.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -57483,10 +44403,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -57524,21 +44441,11 @@ "bidAmountCurrencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "description": "The `CurrencyValue` of the listing. Useful for displaying the price information." } @@ -57546,9 +44453,7 @@ } } }, - "example": { - "result": "0x..." - } + "example": { "result": "0x..." } } } }, @@ -57563,19 +44468,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57601,19 +44498,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57639,19 +44528,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57673,15 +44554,11 @@ "get": { "operationId": "getTotalCount", "summary": "Get total listings", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get the count of English auction listings on this marketplace contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -57689,10 +44566,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -57707,18 +44581,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -57733,19 +44599,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57771,19 +44629,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57809,19 +44659,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57843,33 +44685,25 @@ "get": { "operationId": "isWinningBid", "summary": "Check winning bid", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Check if a bid is or will be the winning bid for an auction.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "bidAmount", "required": true, "description": "The amount of the bid to check if it is the winning bid." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -57877,10 +44711,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -57895,18 +44726,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "boolean" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "boolean" } }, + "required": ["result"] }, - "example": { - "result": true - } + "example": { "result": true } } } }, @@ -57921,19 +44744,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57959,19 +44774,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -57997,19 +44804,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58031,24 +44830,18 @@ "get": { "operationId": "getWinner", "summary": "Get winner", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Get the winner of an English auction. Can only be called after the auction has ended.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "listingId", "required": true, "description": "The ID of the listing to retrieve the winner for." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -58056,10 +44849,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -58074,18 +44864,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] }, - "example": { - "result": "0x..." - } + "example": { "result": "0x..." } } } }, @@ -58100,19 +44882,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58138,19 +44912,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58176,19 +44942,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58210,60 +44968,46 @@ "get": { "operationId": "getAll", "summary": "Get all offers", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Get all offers on this marketplace contract.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "offeror", "required": false, "description": "has offers from this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -58271,10 +45015,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -58326,21 +45067,11 @@ "currencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -58359,72 +45090,43 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -58432,42 +45134,12 @@ }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -58481,9 +45153,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -58508,12 +45178,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "endTimeInSeconds": 1686610889, "status": 4 @@ -58534,19 +45199,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58572,19 +45229,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58610,19 +45259,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -58644,60 +45285,46 @@ "get": { "operationId": "getAllValid", "summary": "Get all valid offers", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted.", "parameters": [ { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "count", "required": false, "description": "Number of listings to fetch" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "offeror", "required": false, "description": "has offers from this Address" }, { - "schema": { - "type": "number" - }, + "schema": { "type": "number" }, "in": "query", "name": "start", "required": false, "description": "Satrt from this index (pagination)" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenContract", "required": false, "description": "Token contract address to show NFTs from" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "tokenId", "required": false, "description": "Only show NFTs with this ID" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -58705,10 +45332,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -58760,21 +45384,11 @@ "currencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -58793,72 +45407,43 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -58866,42 +45451,12 @@ }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -58915,9 +45470,7 @@ } } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -58942,12 +45495,7 @@ "name": "TJ-Origin", "description": "Origin", "external_url": "", - "attributes": [ - { - "trait_type": "Mode", - "value": "GOD" - } - ] + "attributes": [{ "trait_type": "Mode", "value": "GOD" }] }, "endTimeInSeconds": 1686610889, "status": 4 @@ -58968,19 +45516,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59006,19 +45546,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59044,19 +45576,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59078,24 +45602,18 @@ "get": { "operationId": "getOffer", "summary": "Get offer", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Get details about an offer.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "query", "name": "offerId", "required": true, "description": "The ID of the offer to get information about." }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -59103,10 +45621,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -59156,21 +45671,11 @@ "currencyValue": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "symbol": { - "type": "string" - }, - "decimals": { - "type": "number" - }, - "value": { - "type": "string" - }, - "displayValue": { - "type": "string" - } + "name": { "type": "string" }, + "symbol": { "type": "string" }, + "decimals": { "type": "number" }, + "value": { "type": "string" }, + "displayValue": { "type": "string" } }, "required": [ "name", @@ -59189,72 +45694,43 @@ "additionalProperties": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "uri": { - "type": "string" - }, + "id": { "type": "string" }, + "uri": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "number" }, + { "type": "null" } ] }, "description": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "image": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "external_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "animation_url": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, "properties": {}, "attributes": {} }, - "required": [ - "id", - "uri" - ] + "required": ["id", "uri"] }, "endTimeInSeconds": { "description": "The end time of the auction.", @@ -59262,42 +45738,12 @@ }, "status": { "anyOf": [ - { - "type": "number", - "enum": [ - 0 - ] - }, - { - "type": "number", - "enum": [ - 1 - ] - }, - { - "type": "number", - "enum": [ - 2 - ] - }, - { - "type": "number", - "enum": [ - 3 - ] - }, - { - "type": "number", - "enum": [ - 4 - ] - }, - { - "type": "number", - "enum": [ - 5 - ] - } + { "type": "number", "enum": [0] }, + { "type": "number", "enum": [1] }, + { "type": "number", "enum": [2] }, + { "type": "number", "enum": [3] }, + { "type": "number", "enum": [4] }, + { "type": "number", "enum": [5] } ] } }, @@ -59310,9 +45756,7 @@ ] } }, - "required": [ - "result" - ] + "required": ["result"] }, "example": { "result": [ @@ -59345,19 +45789,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59383,19 +45819,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59421,19 +45849,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59455,15 +45875,11 @@ "get": { "operationId": "getTotalCount", "summary": "Get total count", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Get the total number of offers on this marketplace contract.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -59471,10 +45887,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -59489,18 +45902,10 @@ "application/json": { "schema": { "type": "object", - "properties": { - "result": { - "type": "string" - } - }, - "required": [ - "result" - ] + "properties": { "result": { "type": "string" } }, + "required": ["result"] }, - "example": { - "result": "1" - } + "example": { "result": "1" } } } }, @@ -59515,19 +45920,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59553,19 +45950,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59591,19 +45980,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59625,9 +46006,7 @@ "post": { "operationId": "createListing", "summary": "Create direct listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Create a direct listing on this marketplace contract.", "requestBody": { "content": { @@ -59695,11 +46074,7 @@ } } }, - "required": [ - "assetContractAddress", - "tokenId", - "pricePerToken" - ] + "required": ["assetContractAddress", "tokenId", "pricePerToken"] }, "example": { "assetContractAddress": "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", @@ -59716,19 +46091,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -59736,10 +46106,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -59747,10 +46114,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -59758,19 +46122,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -59778,10 +46137,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -59805,14 +46161,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -59833,19 +46185,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59871,19 +46215,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59909,19 +46245,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -59943,9 +46271,7 @@ "post": { "operationId": "updateListing", "summary": "Update direct listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Update a direct listing on this marketplace contract.", "requestBody": { "content": { @@ -60024,28 +46350,21 @@ "pricePerToken" ] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -60053,10 +46372,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -60064,10 +46380,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -60075,19 +46388,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -60095,10 +46403,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -60122,14 +46427,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -60150,19 +46451,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60188,19 +46481,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60226,19 +46511,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60260,9 +46537,7 @@ "post": { "operationId": "buyFromListing", "summary": "Buy from direct listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Buy from a specific direct listing from this marketplace contract.", "requestBody": { "content": { @@ -60308,11 +46583,7 @@ } } }, - "required": [ - "listingId", - "quantity", - "buyer" - ] + "required": ["listingId", "quantity", "buyer"] }, "example": { "listingId": "0", @@ -60325,19 +46596,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -60345,10 +46611,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -60356,10 +46619,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -60367,19 +46627,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -60387,10 +46642,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -60414,14 +46666,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -60442,19 +46690,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60480,19 +46720,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60518,19 +46750,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60552,9 +46776,7 @@ "post": { "operationId": "approveBuyerForReservedListing", "summary": "Approve buyer for reserved listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Approve a wallet address to buy from a reserved listing.", "requestBody": { "content": { @@ -60596,10 +46818,7 @@ } } }, - "required": [ - "listingId", - "buyer" - ] + "required": ["listingId", "buyer"] }, "example": { "listingId": "0", @@ -60611,19 +46830,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -60631,10 +46845,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -60642,10 +46853,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -60653,19 +46861,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -60673,10 +46876,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -60700,14 +46900,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -60728,19 +46924,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60766,19 +46954,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60804,19 +46984,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -60838,9 +47010,7 @@ "post": { "operationId": "revokeBuyerApprovalForReservedListing", "summary": "Revoke approval for reserved listings", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Revoke approval for a buyer to purchase a reserved listing.", "requestBody": { "content": { @@ -60884,10 +47054,7 @@ } } }, - "required": [ - "listingId", - "buyerAddress" - ] + "required": ["listingId", "buyerAddress"] }, "example": { "listingId": "0", @@ -60899,19 +47066,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -60919,10 +47081,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -60930,10 +47089,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -60941,19 +47097,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -60961,10 +47112,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -60988,14 +47136,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -61016,19 +47160,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61054,19 +47190,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61092,19 +47220,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61126,9 +47246,7 @@ "post": { "operationId": "revokeCurrencyApprovalForListing", "summary": "Revoke currency approval for reserved listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Revoke approval of a currency for a reserved listing.", "requestBody": { "content": { @@ -61172,10 +47290,7 @@ } } }, - "required": [ - "listingId", - "currencyContractAddress" - ] + "required": ["listingId", "currencyContractAddress"] }, "example": { "listingId": "0", @@ -61187,19 +47302,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -61207,10 +47317,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -61218,10 +47325,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -61229,19 +47333,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -61249,10 +47348,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -61276,14 +47372,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -61304,19 +47396,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61342,19 +47426,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61380,19 +47456,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61414,9 +47482,7 @@ "post": { "operationId": "cancelListing", "summary": "Cancel direct listing", - "tags": [ - "Marketplace-DirectListings" - ], + "tags": ["Marketplace-DirectListings"], "description": "Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it.", "requestBody": { "content": { @@ -61454,32 +47520,23 @@ } } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -61487,10 +47544,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -61498,10 +47552,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -61509,19 +47560,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -61529,10 +47575,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -61556,14 +47599,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -61584,19 +47623,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61622,19 +47653,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61660,19 +47683,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61694,9 +47709,7 @@ "post": { "operationId": "buyoutAuction", "summary": "Buyout English auction", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Buyout the listing for this auction.", "requestBody": { "content": { @@ -61709,32 +47722,23 @@ "type": "string" } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -61742,10 +47746,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -61769,14 +47770,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -61797,19 +47794,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61835,19 +47824,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61873,19 +47854,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -61907,9 +47880,7 @@ "post": { "operationId": "cancelAuction", "summary": "Cancel English auction", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made.", "requestBody": { "content": { @@ -61922,32 +47893,23 @@ "type": "string" } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -61955,10 +47917,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -61982,14 +47941,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -62010,19 +47965,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62048,19 +47995,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62086,19 +48025,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62120,9 +48051,7 @@ "post": { "operationId": "createAuction", "summary": "Create English auction", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Create an English auction listing on this marketplace contract.", "requestBody": { "content": { @@ -62198,19 +48127,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -62218,10 +48142,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -62245,14 +48166,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -62273,19 +48190,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62311,19 +48220,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62349,19 +48250,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62383,9 +48276,7 @@ "post": { "operationId": "closeAuctionForBidder", "summary": "Close English auction for bidder", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "After an auction has concluded (and a buyout did not occur),\nexecute the sale for the buyer, meaning the buyer receives the NFT(s). \nYou must also call closeAuctionForSeller to execute the sale for the seller,\nmeaning the seller receives the payment from the highest bid.", "requestBody": { "content": { @@ -62398,32 +48289,23 @@ "type": "string" } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -62431,10 +48313,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -62458,14 +48337,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -62486,19 +48361,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62524,19 +48391,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62562,19 +48421,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62596,9 +48447,7 @@ "post": { "operationId": "closeAuctionForSeller", "summary": "Close English auction for seller", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "After an auction has concluded (and a buyout did not occur),\nexecute the sale for the seller, meaning the seller receives the payment from the highest bid.\nYou must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s).", "requestBody": { "content": { @@ -62611,32 +48460,23 @@ "type": "string" } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -62644,10 +48484,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -62671,14 +48508,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -62699,19 +48532,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62737,19 +48562,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62775,19 +48592,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62809,9 +48618,7 @@ "post": { "operationId": "executeSale", "summary": "Execute sale", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Close the auction for both buyer and seller.\nThis means the NFT(s) will be transferred to the buyer and the seller will receive the funds.\nThis function can only be called after the auction has ended.", "requestBody": { "content": { @@ -62824,32 +48631,23 @@ "type": "string" } }, - "required": [ - "listingId" - ] + "required": ["listingId"] }, - "example": { - "listingId": "0" - } + "example": { "listingId": "0" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -62857,10 +48655,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -62884,14 +48679,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -62912,19 +48703,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62950,19 +48733,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -62988,19 +48763,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63022,9 +48789,7 @@ "post": { "operationId": "makeBid", "summary": "Make bid", - "tags": [ - "Marketplace-EnglishAuctions" - ], + "tags": ["Marketplace-EnglishAuctions"], "description": "Place a bid on an English auction listing.", "requestBody": { "content": { @@ -63041,34 +48806,23 @@ "type": "string" } }, - "required": [ - "listingId", - "bidAmount" - ] + "required": ["listingId", "bidAmount"] }, - "example": { - "listingId": "0", - "bidAmount": "0.00000001" - } + "example": { "listingId": "0", "bidAmount": "0.00000001" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -63076,10 +48830,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -63103,14 +48854,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -63131,19 +48878,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63169,19 +48908,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63207,19 +48938,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63241,9 +48964,7 @@ "post": { "operationId": "makeOffer", "summary": "Make offer", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Make an offer on a token. A valid listing is not required.", "requestBody": { "content": { @@ -63303,11 +49024,7 @@ } } }, - "required": [ - "assetContractAddress", - "tokenId", - "totalPrice" - ] + "required": ["assetContractAddress", "tokenId", "totalPrice"] }, "example": { "assetContractAddress": "0x19411143085F1ec7D21a7cc07000CBA5188C5e8e", @@ -63323,19 +49040,14 @@ }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -63343,10 +49055,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -63354,10 +49063,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -63365,19 +49071,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -63385,10 +49086,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -63412,14 +49110,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -63440,19 +49134,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63478,19 +49164,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63516,19 +49194,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63550,9 +49220,7 @@ "post": { "operationId": "cancelOffer", "summary": "Cancel offer", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Cancel a valid offer made by the caller wallet.", "requestBody": { "content": { @@ -63590,32 +49258,23 @@ } } }, - "required": [ - "offerId" - ] + "required": ["offerId"] }, - "example": { - "offerId": "1" - } + "example": { "offerId": "1" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -63623,10 +49282,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -63634,10 +49290,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -63645,19 +49298,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -63665,10 +49313,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -63692,14 +49337,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -63720,19 +49361,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63758,19 +49391,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63796,19 +49421,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -63830,9 +49447,7 @@ "post": { "operationId": "acceptOffer", "summary": "Accept offer", - "tags": [ - "Marketplace-Offers" - ], + "tags": ["Marketplace-Offers"], "description": "Accept a valid offer.", "requestBody": { "content": { @@ -63870,32 +49485,23 @@ } } }, - "required": [ - "offerId" - ] + "required": ["offerId"] }, - "example": { - "offerId": "1" - } + "example": { "offerId": "1" } } }, "required": true }, "parameters": [ { - "schema": { - "default": false, - "type": "boolean" - }, + "schema": { "default": false, "type": "boolean" }, "in": "query", "name": "simulateTx", "required": false, "description": "Simulate the transaction on-chain without executing" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -63903,10 +49509,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -63914,10 +49517,7 @@ "description": "Contract address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-backend-wallet-address", @@ -63925,19 +49525,14 @@ "description": "Backend wallet address" }, { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "in": "header", "name": "x-idempotency-key", "required": false, "description": "Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared." }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-address", @@ -63945,10 +49540,7 @@ "description": "Smart account address" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "header", "name": "x-account-factory-address", @@ -63972,14 +49564,10 @@ "type": "string" } }, - "required": [ - "queueId" - ] + "required": ["queueId"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "queueId": "9eb88b00-f04f-409b-9df7-7dcc9003bc35" @@ -64000,19 +49588,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64038,19 +49618,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64076,19 +49648,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64110,9 +49674,7 @@ "get": { "operationId": "getContractSubscriptions", "summary": "Get contract subscriptions", - "tags": [ - "Contract-Subscriptions" - ], + "tags": ["Contract-Subscriptions"], "description": "Get all contract subscriptions.", "responses": { "200": { @@ -64127,12 +49689,8 @@ "items": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "chainId": { - "type": "number" - }, + "id": { "type": "string" }, + "chainId": { "type": "number" }, "contractAddress": { "description": "A contract or wallet address", "type": "string", @@ -64142,34 +49700,18 @@ "webhook": { "type": "object", "properties": { - "url": { - "type": "string" - }, + "url": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, - "secret": { - "type": "string" - }, - "eventType": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "id": { - "type": "number" - } + "secret": { "type": "string" }, + "eventType": { "type": "string" }, + "active": { "type": "boolean" }, + "createdAt": { "type": "string" }, + "id": { "type": "number" } }, "required": [ "url", @@ -64180,28 +49722,17 @@ "id" ] }, - "processEventLogs": { - "type": "boolean" - }, + "processEventLogs": { "type": "boolean" }, "filterEvents": { "type": "array", - "items": { - "type": "string" - } - }, - "processTransactionReceipts": { - "type": "boolean" + "items": { "type": "string" } }, + "processTransactionReceipts": { "type": "boolean" }, "filterFunctions": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, - "createdAt": { - "type": "string", - "format": "date" - } + "createdAt": { "type": "string", "format": "date" } }, "required": [ "id", @@ -64216,17 +49747,13 @@ } } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": [ { "chain": "ethereum", "contractAddress": "0x....", - "webhook": { - "url": "https://..." - } + "webhook": { "url": "https://..." } } ] } @@ -64245,19 +49772,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64283,19 +49802,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64321,19 +49832,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64355,9 +49858,7 @@ "post": { "operationId": "addContractSubscription", "summary": "Add contract subscription", - "tags": [ - "Contract-Subscriptions" - ], + "tags": ["Contract-Subscriptions"], "description": "Subscribe to event logs and transaction receipts for a contract.", "requestBody": { "content": { @@ -64387,9 +49888,7 @@ "filterEvents": { "description": "A case-sensitive list of event names to filter event logs. Parses all event logs by default.", "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "example": "Transfer" }, "processTransactionReceipts": { @@ -64399,9 +49898,7 @@ "filterFunctions": { "description": "A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default.", "type": "array", - "items": { - "type": "string" - }, + "items": { "type": "string" }, "example": "mintTo" } }, @@ -64427,12 +49924,8 @@ "result": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "chainId": { - "type": "number" - }, + "id": { "type": "string" }, + "chainId": { "type": "number" }, "contractAddress": { "description": "A contract or wallet address", "type": "string", @@ -64442,34 +49935,18 @@ "webhook": { "type": "object", "properties": { - "url": { - "type": "string" - }, + "url": { "type": "string" }, "name": { "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } + { "type": "string" }, + { "type": "null" } ] }, - "secret": { - "type": "string" - }, - "eventType": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "createdAt": { - "type": "string" - }, - "id": { - "type": "number" - } + "secret": { "type": "string" }, + "eventType": { "type": "string" }, + "active": { "type": "boolean" }, + "createdAt": { "type": "string" }, + "id": { "type": "number" } }, "required": [ "url", @@ -64480,28 +49957,17 @@ "id" ] }, - "processEventLogs": { - "type": "boolean" - }, + "processEventLogs": { "type": "boolean" }, "filterEvents": { "type": "array", - "items": { - "type": "string" - } - }, - "processTransactionReceipts": { - "type": "boolean" + "items": { "type": "string" } }, + "processTransactionReceipts": { "type": "boolean" }, "filterFunctions": { "type": "array", - "items": { - "type": "string" - } + "items": { "type": "string" } }, - "createdAt": { - "type": "string", - "format": "date" - } + "createdAt": { "type": "string", "format": "date" } }, "required": [ "id", @@ -64515,9 +49981,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "chain": 1, @@ -64540,19 +50004,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64578,19 +50034,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64616,19 +50064,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64650,9 +50090,7 @@ "post": { "operationId": "removeContractSubscription", "summary": "Remove contract subscription", - "tags": [ - "Contract-Subscriptions" - ], + "tags": ["Contract-Subscriptions"], "description": "Remove an existing contract subscription", "requestBody": { "content": { @@ -64665,9 +50103,7 @@ "type": "string" } }, - "required": [ - "contractSubscriptionId" - ] + "required": ["contractSubscriptionId"] } } }, @@ -64683,24 +50119,12 @@ "properties": { "result": { "type": "object", - "properties": { - "status": { - "type": "string" - } - }, - "required": [ - "status" - ] + "properties": { "status": { "type": "string" } }, + "required": ["status"] } }, - "required": [ - "result" - ], - "example": { - "result": { - "status": "success" - } - } + "required": ["result"], + "example": { "result": { "status": "success" } } } } } @@ -64716,19 +50140,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64754,19 +50170,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64792,19 +50200,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64826,15 +50226,11 @@ "get": { "operationId": "getContractIndexedBlockRange", "summary": "Get subscribed contract indexed block range", - "tags": [ - "Contract-Subscriptions" - ], + "tags": ["Contract-Subscriptions"], "description": "Gets the subscribed contract's indexed block range", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "example": "80002", "in": "path", "name": "chain", @@ -64842,10 +50238,7 @@ "description": "Chain ID or name" }, { - "schema": { - "type": "string", - "pattern": "^0x[a-fA-F0-9]{40}$" - }, + "schema": { "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$" }, "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4", "in": "path", "name": "contractAddress", @@ -64864,24 +50257,16 @@ "result": { "type": "object", "properties": { - "chain": { - "type": "string" - }, + "chain": { "type": "string" }, "contractAddress": { "description": "A contract or wallet address", "type": "string", "pattern": "^0x[a-fA-F0-9]{40}$", "example": "0x152e208d08cd3ea1aa5d179b2e3eba7d1a733ef4" }, - "fromBlock": { - "type": "number" - }, - "toBlock": { - "type": "number" - }, - "status": { - "type": "string" - } + "fromBlock": { "type": "number" }, + "toBlock": { "type": "number" }, + "status": { "type": "string" } }, "required": [ "chain", @@ -64892,9 +50277,7 @@ ] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { "result": { "chain": "ethereum", @@ -64919,19 +50302,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64957,19 +50332,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -64995,19 +50362,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -65029,22 +50388,14 @@ "get": { "operationId": "getLatestBlock", "summary": "Get last processed block", - "tags": [ - "Contract-Subscriptions" - ], + "tags": ["Contract-Subscriptions"], "description": "Get the last processed block for a chain.", "parameters": [ { - "schema": { - "type": "string" - }, + "schema": { "type": "string" }, "examples": { - "1": { - "value": "1" - }, - "ethereum": { - "value": "ethereum" - } + "1": { "value": "1" }, + "ethereum": { "value": "ethereum" } }, "in": "query", "name": "chain", @@ -65063,27 +50414,15 @@ "result": { "type": "object", "properties": { - "lastBlock": { - "type": "number" - }, - "status": { - "type": "string" - } + "lastBlock": { "type": "number" }, + "status": { "type": "string" } }, - "required": [ - "lastBlock", - "status" - ] + "required": ["lastBlock", "status"] } }, - "required": [ - "result" - ], + "required": ["result"], "example": { - "result": { - "lastBlock": 100, - "status": "success" - } + "result": { "lastBlock": 100, "status": "success" } } } } @@ -65100,19 +50439,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -65138,19 +50469,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -65176,19 +50499,11 @@ "error": { "type": "object", "properties": { - "message": { - "type": "string" - }, + "message": { "type": "string" }, "reason": {}, - "code": { - "type": "string" - }, - "stack": { - "type": "string" - }, - "statusCode": { - "type": "number" - } + "code": { "type": "string" }, + "stack": { "type": "string" }, + "statusCode": { "type": "number" } } } } @@ -65207,9 +50522,5 @@ } } }, - "security": [ - { - "bearerAuth": [] - } - ] + "security": [{ "bearerAuth": [] }] } diff --git a/sdk/src/Engine.ts b/sdk/src/Engine.ts index 72719591c..8a8e397a2 100644 --- a/sdk/src/Engine.ts +++ b/sdk/src/Engine.ts @@ -34,7 +34,7 @@ import { WebhooksService } from './services/WebhooksService'; type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest; -export class Engine { +class EngineLogic { public readonly accessTokens: AccessTokensService; public readonly account: AccountService; @@ -104,3 +104,10 @@ export class Engine { this.webhooks = new WebhooksService(this.request); } } + + +export class Engine extends EngineLogic { + constructor(config: { url: string; accessToken: string; }) { + super({ BASE: config.url, TOKEN: config.accessToken }); + } +} diff --git a/sdk/src/services/AccessTokensService.ts b/sdk/src/services/AccessTokensService.ts index e01ce2764..565f90fe6 100644 --- a/sdk/src/services/AccessTokensService.ts +++ b/sdk/src/services/AccessTokensService.ts @@ -15,19 +15,19 @@ export class AccessTokensService { * @returns any Default Response * @throws ApiError */ - public listAccessTokens(): CancelablePromise<{ -result: Array<{ -id: string; -tokenMask: string; -/** - * A contract or wallet address - */ -walletAddress: string; -createdAt: string; -expiresAt: string; -label: (string | null); -}>; -}> { + public getAll(): CancelablePromise<{ + result: Array<{ + id: string; + tokenMask: string; + /** + * A contract or wallet address + */ + walletAddress: string; + createdAt: string; + expiresAt: string; + label: (string | null); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/auth/access-tokens/get-all', @@ -42,28 +42,28 @@ label: (string | null); /** * Create a new access token * Create a new access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public createAccessToken( -requestBody?: { -label?: string; -}, -): CancelablePromise<{ -result: { -id: string; -tokenMask: string; -/** - * A contract or wallet address - */ -walletAddress: string; -createdAt: string; -expiresAt: string; -label: (string | null); -accessToken: string; -}; -}> { + public create( + requestBody?: { + label?: string; + }, + ): CancelablePromise<{ + result: { + id: string; + tokenMask: string; + /** + * A contract or wallet address + */ + walletAddress: string; + createdAt: string; + expiresAt: string; + label: (string | null); + accessToken: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/create', @@ -80,19 +80,19 @@ accessToken: string; /** * Revoke an access token * Revoke an access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public revokeAccessTokens( -requestBody: { -id: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public revoke( + requestBody: { + id: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/revoke', @@ -109,20 +109,20 @@ success: boolean; /** * Update an access token * Update an access token - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public updateAccessTokens( -requestBody: { -id: string; -label?: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public update( + requestBody: { + id: string; + label?: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/access-tokens/update', diff --git a/sdk/src/services/AccountFactoryService.ts b/sdk/src/services/AccountFactoryService.ts index 2787e8d5d..5d8c45882 100644 --- a/sdk/src/services/AccountFactoryService.ts +++ b/sdk/src/services/AccountFactoryService.ts @@ -12,20 +12,20 @@ export class AccountFactoryService { /** * Get all smart accounts * Get all the smart accounts for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllAccounts( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The account addresses of all the accounts in this factory - */ -result: Array; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * The account addresses of all the accounts in this factory + */ + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/get-all-accounts', @@ -45,21 +45,21 @@ result: Array; * Get associated smart accounts * Get all the smart accounts for this account factory associated with the specific admin wallet. * @param signerAddress The address of the signer to get associated accounts from - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAssociatedAccounts( -signerAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The account addresses of all the accounts with a specific signer in this factory - */ -result: Array; -}> { + signerAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * The account addresses of all the accounts with a specific signer in this factory + */ + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/get-associated-accounts', @@ -82,23 +82,23 @@ result: Array; * Check if deployed * Check if a smart account has been deployed to the blockchain. * @param adminAddress The address of the admin to check if the account address is deployed - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param extraData Extra data to use in predicting the account address * @returns any Default Response * @throws ApiError */ public isAccountDeployed( -adminAddress: string, -chain: string, -contractAddress: string, -extraData?: string, -): CancelablePromise<{ -/** - * Whether or not the account has been deployed - */ -result: boolean; -}> { + adminAddress: string, + chain: string, + contractAddress: string, + extraData?: string, + ): CancelablePromise<{ + /** + * Whether or not the account has been deployed + */ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/is-account-deployed', @@ -122,23 +122,23 @@ result: boolean; * Predict smart account address * Get the counterfactual address of a smart account. * @param adminAddress The address of the admin to predict the account address for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param extraData Extra data (account salt) to add to use in predicting the account address * @returns any Default Response * @throws ApiError */ public predictAccountAddress( -adminAddress: string, -chain: string, -contractAddress: string, -extraData?: string, -): CancelablePromise<{ -/** - * New account counter-factual address. - */ -result: string; -}> { + adminAddress: string, + chain: string, + contractAddress: string, + extraData?: string, + ): CancelablePromise<{ + /** + * New account counter-factual address. + */ + result: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account-factory/predict-account-address', @@ -161,68 +161,68 @@ result: string; /** * Create smart account * Create a smart account for this account factory. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public createAccount( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The admin address to create an account for - */ -adminAddress: string; -/** - * Extra data to add to use in creating the account address - */ -extraData?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The admin address to create an account for + */ + adminAddress: string; + /** + * Extra data to add to use in creating the account address + */ + extraData?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account-factory/create-account', diff --git a/sdk/src/services/AccountService.ts b/sdk/src/services/AccountService.ts index 6369ba214..31a575a90 100644 --- a/sdk/src/services/AccountService.ts +++ b/sdk/src/services/AccountService.ts @@ -12,20 +12,20 @@ export class AccountService { /** * Get all admins * Get all admins for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllAdmins( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The address of the admins on this account - */ -result: Array; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * The address of the admins on this account + */ + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account/admins/get-all', @@ -44,26 +44,26 @@ result: Array; /** * Get all session keys * Get all session keys for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAllSessions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -signerAddress: string; -startDate: string; -expirationDate: string; -nativeTokenLimitPerTransaction: string; -approvedCallTargets: Array; -}>; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + signerAddress: string; + startDate: string; + expirationDate: string; + nativeTokenLimitPerTransaction: string; + approvedCallTargets: Array; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/account/sessions/get-all', @@ -82,63 +82,63 @@ approvedCallTargets: Array; /** * Grant admin * Grant a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public grantAccountAdmin( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to grant admin permissions to - */ -signerAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public grantAdmin( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to grant admin permissions to + */ + signerAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/admins/grant', @@ -169,63 +169,63 @@ queueId: string; /** * Revoke admin * Revoke a smart account's admin permission. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public revokeAccountAdmin( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to revoke admin permissions from - */ -walletAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public revokeAdmin( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to revoke admin permissions from + */ + walletAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/admins/revoke', @@ -256,67 +256,67 @@ queueId: string; /** * Create session key * Create a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public grantAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -signerAddress: string; -startDate: string; -expirationDate: string; -nativeTokenLimitPerTransaction: string; -approvedCallTargets: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public grantSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + signerAddress: string; + startDate: string; + expirationDate: string; + nativeTokenLimitPerTransaction: string; + approvedCallTargets: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/create', @@ -347,63 +347,63 @@ queueId: string; /** * Revoke session key * Revoke a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public revokeAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to revoke session from - */ -walletAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public revokeSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to revoke session from + */ + walletAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/revoke', @@ -434,67 +434,67 @@ queueId: string; /** * Update session key * Update a session key for a smart account. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public updateAccountSession( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -signerAddress: string; -approvedCallTargets: Array; -startDate?: string; -expirationDate?: string; -nativeTokenLimitPerTransaction?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateSession( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + signerAddress: string; + approvedCallTargets: Array; + startDate?: string; + expirationDate?: string; + nativeTokenLimitPerTransaction?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/account/sessions/update', diff --git a/sdk/src/services/BackendWalletService.ts b/sdk/src/services/BackendWalletService.ts index 1ccad8f2d..b9657572e 100644 --- a/sdk/src/services/BackendWalletService.ts +++ b/sdk/src/services/BackendWalletService.ts @@ -12,28 +12,28 @@ export class BackendWalletService { /** * Create backend wallet * Create a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public create( -requestBody?: { -label?: string; -/** - * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. - */ -type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -}, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -}; -}> { + requestBody?: { + label?: string; + /** + * Type of new wallet to create. It is recommended to always provide this value. If not provided, the default wallet type will be used. + */ + type?: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); + }, + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/create', @@ -55,12 +55,12 @@ type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'sm * @throws ApiError */ public removeBackendWallet( -walletAddress: string, -): CancelablePromise<{ -result: { -status: string; -}; -}> { + walletAddress: string, + ): CancelablePromise<{ + result: { + status: string; + }; + }> { return this.httpRequest.request({ method: 'DELETE', url: '/backend-wallet/{walletAddress}', @@ -78,85 +78,85 @@ status: string; /** * Import backend wallet * Import an existing wallet as a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public import( -requestBody?: ({ -/** - * Optional label for the imported wallet - */ -label?: string; -} & ({ -/** - * AWS KMS key ARN - */ -awsKmsArn: string; -/** - * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). - */ -credentials?: { -/** - * AWS Access Key ID - */ -awsAccessKeyId: string; -/** - * AWS Secret Access Key - */ -awsSecretAccessKey: string; -}; -} | { -/** - * GCP KMS key ID - */ -gcpKmsKeyId: string; -/** - * GCP KMS key version ID - */ -gcpKmsKeyVersionId: string; -/** - * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). - */ -credentials?: { -/** - * GCP service account email - */ -email: string; -/** - * GCP service account private key - */ -privateKey: string; -}; -} | { -/** - * The private key of the wallet to import - */ -privateKey: string; -} | { -/** - * The mnemonic phrase of the wallet to import - */ -mnemonic: string; -} | { -/** - * The encrypted JSON of the wallet to import - */ -encryptedJson: string; -/** - * The password used to encrypt the encrypted JSON - */ -password: string; -})), -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -}; -}> { + requestBody?: ({ + /** + * Optional label for the imported wallet + */ + label?: string; + } & ({ + /** + * AWS KMS key ARN + */ + awsKmsArn: string; + /** + * Optional AWS credentials to use for importing the wallet, if not provided, the default AWS credentials will be used (if available). + */ + credentials?: { + /** + * AWS Access Key ID + */ + awsAccessKeyId: string; + /** + * AWS Secret Access Key + */ + awsSecretAccessKey: string; + }; + } | { + /** + * GCP KMS key ID + */ + gcpKmsKeyId: string; + /** + * GCP KMS key version ID + */ + gcpKmsKeyVersionId: string; + /** + * Optional GCP credentials to use for importing the wallet, if not provided, the default GCP credentials will be used (if available). + */ + credentials?: { + /** + * GCP service account email + */ + email: string; + /** + * GCP service account private key + */ + privateKey: string; + }; + } | { + /** + * The private key of the wallet to import + */ + privateKey: string; + } | { + /** + * The mnemonic phrase of the wallet to import + */ + mnemonic: string; + } | { + /** + * The encrypted JSON of the wallet to import + */ + encryptedJson: string; + /** + * The password used to encrypt the encrypted JSON + */ + password: string; + })), + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/import', @@ -173,27 +173,27 @@ status: string; /** * Update backend wallet * Update a backend wallet. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public update( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -label?: string; -}, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -status: string; -}; -}> { + requestBody: { + /** + * A contract or wallet address + */ + walletAddress: string; + label?: string; + }, + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + status: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/update', @@ -210,27 +210,27 @@ status: string; /** * Get balance * Get the native balance for a backend wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError */ public getBalance( -chain: string, -walletAddress: string, -): CancelablePromise<{ -result: { -/** - * A contract or wallet address - */ -walletAddress: string; -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -}> { + chain: string, + walletAddress: string, + ): CancelablePromise<{ + result: { + /** + * A contract or wallet address + */ + walletAddress: string; + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-balance', @@ -255,28 +255,28 @@ displayValue: string; * @throws ApiError */ public getAll( -page: number = 1, -limit: number = 10, -): CancelablePromise<{ -result: Array<{ -/** - * Wallet Address - */ -address: string; -/** - * Wallet Type - */ -type: string; -label: (string | null); -awsKmsKeyId: (string | null); -awsKmsArn: (string | null); -gcpKmsKeyId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyVersionId: (string | null); -gcpKmsResourcePath: (string | null); -}>; -}> { + page: number = 1, + limit: number = 10, + ): CancelablePromise<{ + result: Array<{ + /** + * Wallet Address + */ + address: string; + /** + * Wallet Type + */ + type: string; + label: (string | null); + awsKmsKeyId: (string | null); + awsKmsArn: (string | null); + gcpKmsKeyId: (string | null); + gcpKmsKeyRingId: (string | null); + gcpKmsLocationId: (string | null); + gcpKmsKeyVersionId: (string | null); + gcpKmsResourcePath: (string | null); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/get-all', @@ -295,63 +295,63 @@ gcpKmsResourcePath: (string | null); /** * Transfer tokens * Transfer native currency or ERC20 tokens to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public transfer( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient wallet address. - */ -to: string; -/** - * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). - */ -currencyAddress?: string; -/** - * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient wallet address. + */ + to: string; + /** + * The token address to transfer. Omit to transfer the chain's native currency (e.g. ETH on Ethereum). + */ + currencyAddress?: string; + /** + * The amount in ether to transfer. Example: "0.1" to send 0.1 ETH. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/transfer', @@ -378,55 +378,55 @@ queueId: string; /** * Withdraw funds * Withdraw all funds from this wallet to another wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public withdraw( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address to withdraw all funds to - */ -toAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -/** - * An amount in native token (decimals allowed). Example: "0.1" - */ -amount: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address to withdraw all funds to + */ + toAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + /** + * An amount in native token (decimals allowed). Example: "0.1" + */ + amount: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/withdraw', @@ -453,59 +453,59 @@ amount: string; /** * Send a transaction * Send a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public sendTransaction( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * A contract or wallet address - */ -toAddress?: string; -data: string; -value: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * A contract or wallet address + */ + toAddress?: string; + data: string; + value: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/send-transaction', @@ -535,52 +535,52 @@ queueId: string; /** * Send a batch of raw transactions * Send a batch of raw transactions with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendTransactionBatch( -chain: string, -xBackendWalletAddress: string, -xIdempotencyKey?: string, -requestBody?: Array<{ -/** - * A contract or wallet address - */ -toAddress?: string; -data: string; -value: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}>, -): CancelablePromise<{ -result: { -queueIds: Array; -}; -}> { + chain: string, + xBackendWalletAddress: string, + xIdempotencyKey?: string, + requestBody?: Array<{ + /** + * A contract or wallet address + */ + toAddress?: string; + data: string; + value: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }>, + ): CancelablePromise<{ + result: { + queueIds: Array; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/send-transaction-batch', @@ -605,33 +605,35 @@ queueIds: Array; * Sign a transaction * Sign a transaction * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signTransaction( -xBackendWalletAddress: string, -requestBody: { -transaction: { -to?: string; -nonce?: string; -gasLimit?: string; -gasPrice?: string; -data?: string; -value?: string; -chainId?: number; -type?: number; -accessList?: any; -maxFeePerGas?: string; -maxPriorityFeePerGas?: string; -ccipReadEnabled?: boolean; -}; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { + xBackendWalletAddress: string, + requestBody: { + transaction: { + to?: string; + from?: string; + nonce?: string; + gasLimit?: string; + gasPrice?: string; + data?: string; + value?: string; + chainId?: number; + type?: number; + accessList?: any; + maxFeePerGas?: string; + maxPriorityFeePerGas?: string; + customData?: Record; + ccipReadEnabled?: boolean; + }; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-transaction', @@ -653,22 +655,22 @@ result: string; * Sign a message * Send a message * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signMessage( -xBackendWalletAddress: string, -requestBody: { -message: string; -isBytes?: boolean; -chainId?: number; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { + xBackendWalletAddress: string, + requestBody: { + message: string; + isBytes?: boolean; + chainId?: number; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-message', @@ -690,22 +692,22 @@ result: string; * Sign an EIP-712 message * Send an EIP-712 message ("typed data") * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @returns any Default Response * @throws ApiError */ public signTypedData( -xBackendWalletAddress: string, -requestBody: { -domain: Record; -types: Record; -value: Record; -}, -xIdempotencyKey?: string, -): CancelablePromise<{ -result: string; -}> { + xBackendWalletAddress: string, + requestBody: { + domain: Record; + types: Record; + value: Record; + }, + xIdempotencyKey?: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/sign-typed-data', @@ -727,7 +729,7 @@ result: string; * Get recent transactions * Get recent transactions for this backend wallet. * @param status The status to query: 'queued', 'mined', 'errored', or 'cancelled'. Default: 'queued' - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param walletAddress Backend wallet address * @param page Specify the page number. * @param limit Specify the number of results to return per page. @@ -735,70 +737,70 @@ result: string; * @throws ApiError */ public getTransactionsForBackendWallet( -status: ('queued' | 'mined' | 'cancelled' | 'errored'), -chain: string, -walletAddress: string, -page: number = 1, -limit: number = 100, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -}; -}> { + status: ('queued' | 'mined' | 'cancelled' | 'errored'), + chain: string, + walletAddress: string, + page: number = 1, + limit: number = 100, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: (string | null); + /** + * The current state of the transaction. + */ + status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); + chainId: (string | null); + fromAddress: (string | null); + toAddress: (string | null); + data: (string | null); + extension: (string | null); + value: (string | null); + nonce: (number | string | null); + gasLimit: (string | null); + gasPrice: (string | null); + maxFeePerGas: (string | null); + maxPriorityFeePerGas: (string | null); + transactionType: (number | null); + transactionHash: (string | null); + queuedAt: (string | null); + sentAt: (string | null); + minedAt: (string | null); + cancelledAt: (string | null); + deployedContractAddress: (string | null); + deployedContractType: (string | null); + errorMessage: (string | null); + sentAtBlockNumber: (number | null); + blockNumber: (number | null); + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: (boolean | null); + retryMaxFeePerGas: (string | null); + retryMaxPriorityFeePerGas: (string | null); + signerAddress: (string | null); + accountAddress: (string | null); + accountSalt: (string | null); + accountFactoryAddress: (string | null); + target: (string | null); + sender: (string | null); + initCode: (string | null); + callData: (string | null); + callGasLimit: (string | null); + verificationGasLimit: (string | null); + preVerificationGas: (string | null); + paymasterAndData: (string | null); + userOpHash: (string | null); + functionName: (string | null); + functionArgs: (string | null); + onChainTxStatus: (number | null); + onchainStatus: ('success' | 'reverted' | null); + effectiveGasPrice: (string | null); + cumulativeGasUsed: (string | null); + }>; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-all-transactions', @@ -823,77 +825,77 @@ cumulativeGasUsed: (string | null); * Get recent transactions by nonce * Get recent transactions for this backend wallet, sorted by descending nonce. * @param fromNonce The earliest nonce, inclusive. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param walletAddress Backend wallet address * @param toNonce The latest nonce, inclusive. If omitted, queries up to the latest sent nonce. * @returns any Default Response * @throws ApiError */ public getTransactionsForBackendWalletByNonce( -fromNonce: number, -chain: string, -walletAddress: string, -toNonce?: number, -): CancelablePromise<{ -result: Array<{ -nonce: number; -transaction: ({ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -} | string); -}>; -}> { + fromNonce: number, + chain: string, + walletAddress: string, + toNonce?: number, + ): CancelablePromise<{ + result: Array<{ + nonce: number; + transaction: ({ + queueId: (string | null); + /** + * The current state of the transaction. + */ + status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); + chainId: (string | null); + fromAddress: (string | null); + toAddress: (string | null); + data: (string | null); + extension: (string | null); + value: (string | null); + nonce: (number | string | null); + gasLimit: (string | null); + gasPrice: (string | null); + maxFeePerGas: (string | null); + maxPriorityFeePerGas: (string | null); + transactionType: (number | null); + transactionHash: (string | null); + queuedAt: (string | null); + sentAt: (string | null); + minedAt: (string | null); + cancelledAt: (string | null); + deployedContractAddress: (string | null); + deployedContractType: (string | null); + errorMessage: (string | null); + sentAtBlockNumber: (number | null); + blockNumber: (number | null); + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: (boolean | null); + retryMaxFeePerGas: (string | null); + retryMaxPriorityFeePerGas: (string | null); + signerAddress: (string | null); + accountAddress: (string | null); + accountSalt: (string | null); + accountFactoryAddress: (string | null); + target: (string | null); + sender: (string | null); + initCode: (string | null); + callData: (string | null); + callGasLimit: (string | null); + verificationGasLimit: (string | null); + preVerificationGas: (string | null); + paymasterAndData: (string | null); + userOpHash: (string | null); + functionName: (string | null); + functionArgs: (string | null); + onChainTxStatus: (number | null); + onchainStatus: ('success' | 'reverted' | null); + effectiveGasPrice: (string | null); + cumulativeGasUsed: (string | null); + } | string); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-transactions-by-nonce', @@ -920,10 +922,10 @@ cumulativeGasUsed: (string | null); * @throws ApiError */ public resetNonces(): CancelablePromise<{ -result: { -status: string; -}; -}> { + result: { + status: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/reset-nonces', @@ -938,19 +940,19 @@ status: string; /** * Get nonce * Get the last used nonce for this backend wallet. This value managed by Engine may differ from the onchain value. Use `/backend-wallet/reset-nonces` if this value looks incorrect while idle. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param walletAddress Backend wallet address * @returns any Default Response * @throws ApiError */ public getNonce( -chain: string, -walletAddress: string, -): CancelablePromise<{ -result: { -nonce: number; -}; -}> { + chain: string, + walletAddress: string, + ): CancelablePromise<{ + result: { + nonce: number; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/backend-wallet/{chain}/{walletAddress}/get-nonce', @@ -969,53 +971,53 @@ nonce: number; /** * Simulate a transaction * Simulate a transaction with transaction parameters - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public simulateTransaction( -chain: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The contract address - */ -toAddress: string; -/** - * The amount of native currency in wei - */ -value?: string; -/** - * The function to call on the contract - */ -functionName?: string; -/** - * The arguments to call for this function - */ -args?: Array<(string | number | boolean)>; -/** - * Raw calldata - */ -data?: string; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Simulation Success - */ -success: boolean; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The contract address + */ + toAddress: string; + /** + * The amount of native currency in wei + */ + value?: string; + /** + * The function to call on the contract + */ + functionName?: string; + /** + * The arguments to call for this function + */ + args?: Array<(string | number | boolean)>; + /** + * Raw calldata + */ + data?: string; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Simulation Success + */ + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/backend-wallet/{chain}/simulate-transaction', diff --git a/sdk/src/services/ChainService.ts b/sdk/src/services/ChainService.ts index df7913cd6..efa9808fa 100644 --- a/sdk/src/services/ChainService.ts +++ b/sdk/src/services/ChainService.ts @@ -12,55 +12,55 @@ export class ChainService { /** * Get chain details * Get details about a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain name or ID * @returns any Default Response * @throws ApiError */ - public getChain( -chain: string, -): CancelablePromise<{ -result: { -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}; -}> { + public get( + chain: string, + ): CancelablePromise<{ + result: { + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/chain/get', @@ -81,49 +81,49 @@ slug?: string; * @returns any Default Response * @throws ApiError */ - public listChains(): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { + public getAll(): CancelablePromise<{ + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/chain/get-all', diff --git a/sdk/src/services/ConfigurationService.ts b/sdk/src/services/ConfigurationService.ts index 01e611807..dc25260be 100644 --- a/sdk/src/services/ConfigurationService.ts +++ b/sdk/src/services/ConfigurationService.ts @@ -16,16 +16,16 @@ export class ConfigurationService { * @throws ApiError */ public getWalletsConfiguration(): CancelablePromise<{ -result: { -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -awsAccessKeyId: (string | null); -awsRegion: (string | null); -gcpApplicationProjectId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpApplicationCredentialEmail: (string | null); -}; -}> { + result: { + type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); + awsAccessKeyId: (string | null); + awsRegion: (string | null); + gcpApplicationProjectId: (string | null); + gcpKmsLocationId: (string | null); + gcpKmsKeyRingId: (string | null); + gcpApplicationCredentialEmail: (string | null); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/wallets', @@ -40,33 +40,33 @@ gcpApplicationCredentialEmail: (string | null); /** * Update wallets configuration * Update wallets configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateWalletsConfiguration( -requestBody?: ({ -awsAccessKeyId: string; -awsSecretAccessKey: string; -awsRegion: string; -} | { -gcpApplicationProjectId: string; -gcpKmsLocationId: string; -gcpKmsKeyRingId: string; -gcpApplicationCredentialEmail: string; -gcpApplicationCredentialPrivateKey: string; -}), -): CancelablePromise<{ -result: { -type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); -awsAccessKeyId: (string | null); -awsRegion: (string | null); -gcpApplicationProjectId: (string | null); -gcpKmsLocationId: (string | null); -gcpKmsKeyRingId: (string | null); -gcpApplicationCredentialEmail: (string | null); -}; -}> { + requestBody?: ({ + awsAccessKeyId: string; + awsSecretAccessKey: string; + awsRegion: string; + } | { + gcpApplicationProjectId: string; + gcpKmsLocationId: string; + gcpKmsKeyRingId: string; + gcpApplicationCredentialEmail: string; + gcpApplicationCredentialPrivateKey: string; + }), + ): CancelablePromise<{ + result: { + type: ('local' | 'aws-kms' | 'gcp-kms' | 'smart:aws-kms' | 'smart:gcp-kms' | 'smart:local'); + awsAccessKeyId: (string | null); + awsRegion: (string | null); + gcpApplicationProjectId: (string | null); + gcpKmsLocationId: (string | null); + gcpKmsKeyRingId: (string | null); + gcpApplicationCredentialEmail: (string | null); + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/wallets', @@ -87,48 +87,48 @@ gcpApplicationCredentialEmail: (string | null); * @throws ApiError */ public getChainsConfiguration(): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/chains', @@ -143,97 +143,97 @@ slug?: string; /** * Update chain overrides configuration * Update chain overrides configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateChainsConfiguration( -requestBody: { -chainOverrides: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}, -): CancelablePromise<{ -result: Array<{ -/** - * Chain name - */ -name?: string; -/** - * Chain name - */ -chain?: string; -rpc?: Array; -nativeCurrency?: { -/** - * Native currency name - */ -name: string; -/** - * Native currency symbol - */ -symbol: string; -/** - * Native currency decimals - */ -decimals: number; -}; -/** - * Chain short name - */ -shortName?: string; -/** - * Chain ID - */ -chainId?: number; -/** - * Is testnet - */ -testnet?: boolean; -/** - * Chain slug - */ -slug?: string; -}>; -}> { + requestBody: { + chainOverrides: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }, + ): CancelablePromise<{ + result: Array<{ + /** + * Chain name + */ + name?: string; + /** + * Chain name + */ + chain?: string; + rpc?: Array; + nativeCurrency?: { + /** + * Native currency name + */ + name: string; + /** + * Native currency symbol + */ + symbol: string; + /** + * Native currency decimals + */ + decimals: number; + }; + /** + * Chain short name + */ + shortName?: string; + /** + * Chain ID + */ + chainId?: number; + /** + * Is testnet + */ + testnet?: boolean; + /** + * Chain slug + */ + slug?: string; + }>; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/chains', @@ -254,19 +254,19 @@ slug?: string; * @throws ApiError */ public getTransactionConfiguration(): CancelablePromise<{ -result: { -minTxsToProcess: number; -maxTxsToProcess: number; -minedTxListenerCronSchedule: (string | null); -maxTxsToUpdate: number; -retryTxListenerCronSchedule: (string | null); -minEllapsedBlocksBeforeRetry: number; -maxFeePerGasForRetries: string; -maxPriorityFeePerGasForRetries: string; -maxRetriesPerTx: number; -clearCacheCronSchedule: (string | null); -}; -}> { + result: { + minTxsToProcess: number; + maxTxsToProcess: number; + minedTxListenerCronSchedule: (string | null); + maxTxsToUpdate: number; + retryTxListenerCronSchedule: (string | null); + minEllapsedBlocksBeforeRetry: number; + maxFeePerGasForRetries: string; + maxPriorityFeePerGasForRetries: string; + maxRetriesPerTx: number; + clearCacheCronSchedule: (string | null); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/transactions', @@ -281,33 +281,35 @@ clearCacheCronSchedule: (string | null); /** * Update transaction processing configuration * Update transaction processing configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateTransactionConfiguration( -requestBody?: { -maxTxsToProcess?: number; -maxTxsToUpdate?: number; -minedTxListenerCronSchedule?: (string | null); -retryTxListenerCronSchedule?: (string | null); -minEllapsedBlocksBeforeRetry?: number; -maxFeePerGasForRetries?: string; -maxRetriesPerTx?: number; -}, -): CancelablePromise<{ -result: { -minTxsToProcess: number; -maxTxsToProcess: number; -minedTxListenerCronSchedule: (string | null); -maxTxsToUpdate: number; -retryTxListenerCronSchedule: (string | null); -minEllapsedBlocksBeforeRetry: number; -maxFeePerGasForRetries: string; -maxPriorityFeePerGasForRetries: string; -maxRetriesPerTx: number; -}; -}> { + requestBody?: { + minTxsToProcess?: number; + maxTxsToProcess?: number; + minedTxListenerCronSchedule?: (string | null); + maxTxsToUpdate?: number; + retryTxListenerCronSchedule?: (string | null); + minEllapsedBlocksBeforeRetry?: number; + maxFeePerGasForRetries?: string; + maxPriorityFeePerGasForRetries?: string; + maxRetriesPerTx?: number; + }, + ): CancelablePromise<{ + result: { + minTxsToProcess: number; + maxTxsToProcess: number; + minedTxListenerCronSchedule: (string | null); + maxTxsToUpdate: number; + retryTxListenerCronSchedule: (string | null); + minEllapsedBlocksBeforeRetry: number; + maxFeePerGasForRetries: string; + maxPriorityFeePerGasForRetries: string; + maxRetriesPerTx: number; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/transactions', @@ -328,10 +330,10 @@ maxRetriesPerTx: number; * @throws ApiError */ public getAuthConfiguration(): CancelablePromise<{ -result: { -domain: string; -}; -}> { + result: { + domain: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/auth', @@ -346,19 +348,19 @@ domain: string; /** * Update auth configuration * Update auth configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateAuthConfiguration( -requestBody: { -domain: string; -}, -): CancelablePromise<{ -result: { -domain: string; -}; -}> { + requestBody: { + domain: string; + }, + ): CancelablePromise<{ + result: { + domain: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/auth', @@ -379,13 +381,13 @@ domain: string; * @throws ApiError */ public getBackendWalletBalanceConfiguration(): CancelablePromise<{ -result: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance: string; -}; -}> { + result: { + /** + * Minimum wallet balance in wei + */ + minWalletBalance: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/backend-wallet-balance', @@ -400,25 +402,25 @@ minWalletBalance: string; /** * Update backend wallet balance configuration * Update backend wallet balance configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateBackendWalletBalanceConfiguration( -requestBody?: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance?: string; -}, -): CancelablePromise<{ -result: { -/** - * Minimum wallet balance in wei - */ -minWalletBalance: string; -}; -}> { + requestBody?: { + /** + * Minimum wallet balance in wei + */ + minWalletBalance?: string; + }, + ): CancelablePromise<{ + result: { + /** + * Minimum wallet balance in wei + */ + minWalletBalance: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/backend-wallet-balance', @@ -439,8 +441,8 @@ minWalletBalance: string; * @throws ApiError */ public getCorsConfiguration(): CancelablePromise<{ -result: Array; -}> { + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/cors', @@ -455,17 +457,17 @@ result: Array; /** * Add a CORS URL * Add a URL to allow client-side calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public addUrlToCorsConfiguration( -requestBody: { -urlsToAdd: Array; -}, -): CancelablePromise<{ -result: Array; -}> { + requestBody: { + urlsToAdd: Array; + }, + ): CancelablePromise<{ + result: Array; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/cors', @@ -482,17 +484,17 @@ result: Array; /** * Remove CORS URLs * Remove URLs from CORS configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public removeUrlToCorsConfiguration( -requestBody: { -urlsToRemove: Array; -}, -): CancelablePromise<{ -result: Array; -}> { + requestBody: { + urlsToRemove: Array; + }, + ): CancelablePromise<{ + result: Array; + }> { return this.httpRequest.request({ method: 'DELETE', url: '/configuration/cors', @@ -509,17 +511,17 @@ result: Array; /** * Set CORS URLs * Replaces the CORS URLs to allow client-side calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public setUrlsToCorsConfiguration( -requestBody: { -urls: Array; -}, -): CancelablePromise<{ -result: Array; -}> { + requestBody: { + urls: Array; + }, + ): CancelablePromise<{ + result: Array; + }> { return this.httpRequest.request({ method: 'PUT', url: '/configuration/cors', @@ -540,10 +542,10 @@ result: Array; * @throws ApiError */ public getCacheConfiguration(): CancelablePromise<{ -result: { -clearCacheCronSchedule: string; -}; -}> { + result: { + clearCacheCronSchedule: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/cache', @@ -558,22 +560,22 @@ clearCacheCronSchedule: string; /** * Update cache configuration * Update cache configuration - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateCacheConfiguration( -requestBody: { -/** - * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 - */ -clearCacheCronSchedule: string; -}, -): CancelablePromise<{ -result: { -clearCacheCronSchedule: string; -}; -}> { + requestBody: { + /** + * Cron expression for clearing cache. It should be in the format of 'ss mm hh * * *' where ss is seconds, mm is minutes and hh is hours. Seconds should not be '*' or less than 10 + */ + clearCacheCronSchedule: string; + }, + ): CancelablePromise<{ + result: { + clearCacheCronSchedule: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/cache', @@ -594,11 +596,11 @@ clearCacheCronSchedule: string; * @throws ApiError */ public getContractSubscriptionsConfiguration(): CancelablePromise<{ -result: { -maxBlocksToIndex: number; -contractSubscriptionsRequeryDelaySeconds: string; -}; -}> { + result: { + maxBlocksToIndex: number; + contractSubscriptionsRequeryDelaySeconds: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/contract-subscriptions', @@ -613,24 +615,21 @@ contractSubscriptionsRequeryDelaySeconds: string; /** * Update Contract Subscriptions configuration * Update the configuration for Contract Subscriptions - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public updateContractSubscriptionsConfiguration( -requestBody?: { -maxBlocksToIndex?: number; -/** - * Requery after one or more delays. Use comma-separated positive integers. Example: "2,10" means requery after 2s and 10s. - */ -contractSubscriptionsRequeryDelaySeconds?: string; -}, -): CancelablePromise<{ -result: { -maxBlocksToIndex: number; -contractSubscriptionsRequeryDelaySeconds: string; -}; -}> { + requestBody?: { + maxBlocksToIndex?: number; + contractSubscriptionsRequeryDelaySeconds?: string; + }, + ): CancelablePromise<{ + result: { + maxBlocksToIndex: number; + contractSubscriptionsRequeryDelaySeconds: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/configuration/contract-subscriptions', @@ -651,8 +650,8 @@ contractSubscriptionsRequeryDelaySeconds: string; * @throws ApiError */ public getIpAllowlist(): CancelablePromise<{ -result: Array; -}> { + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/configuration/ip-allowlist', @@ -667,20 +666,20 @@ result: Array; /** * Set IP Allowlist * Replaces the IP Allowlist array to allow calls to Engine - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public setIpAllowlist( -requestBody: { -/** - * Array of IP addresses to allowlist - */ -ips: Array; -}, -): CancelablePromise<{ -result: Array; -}> { + requestBody: { + /** + * Array of IP addresses to allowlist + */ + ips: Array; + }, + ): CancelablePromise<{ + result: Array; + }> { return this.httpRequest.request({ method: 'PUT', url: '/configuration/ip-allowlist', diff --git a/sdk/src/services/ContractEventsService.ts b/sdk/src/services/ContractEventsService.ts index 1cc310498..276932408 100644 --- a/sdk/src/services/ContractEventsService.ts +++ b/sdk/src/services/ContractEventsService.ts @@ -12,23 +12,23 @@ export class ContractEventsService { /** * Get all events * Get a list of all blockchain events for this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param fromBlock - * @param toBlock - * @param order + * @param fromBlock + * @param toBlock + * @param order * @returns any Default Response * @throws ApiError */ public getAllEvents( -chain: string, -contractAddress: string, -fromBlock?: (number | string), -toBlock?: (number | string), -order?: ('asc' | 'desc'), -): CancelablePromise<{ -result: Array>; -}> { + chain: string, + contractAddress: string, + fromBlock?: (number | string), + toBlock?: (number | string), + order?: ('asc' | 'desc'), + ): CancelablePromise<{ + result: Array>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/events/get-all', @@ -52,25 +52,25 @@ result: Array>; /** * Get events * Get a list of specific blockchain events emitted from this contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param requestBody Specify the from and to block numbers to get events for, defaults to all blocks * @returns any Default Response * @throws ApiError */ public getEvents( -chain: string, -contractAddress: string, -requestBody: { -eventName: string; -fromBlock?: (number | string); -toBlock?: (number | string); -order?: ('asc' | 'desc'); -filters?: any; -}, -): CancelablePromise<{ -result: Array>; -}> { + chain: string, + contractAddress: string, + requestBody: { + eventName: string; + fromBlock?: (number | string); + toBlock?: (number | string); + order?: ('asc' | 'desc'); + filters?: any; + }, + ): CancelablePromise<{ + result: Array>; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/events/get', diff --git a/sdk/src/services/ContractMetadataService.ts b/sdk/src/services/ContractMetadataService.ts index b0d7df83c..4fd15e17b 100644 --- a/sdk/src/services/ContractMetadataService.ts +++ b/sdk/src/services/ContractMetadataService.ts @@ -12,43 +12,43 @@ export class ContractMetadataService { /** * Get ABI * Get the ABI of a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getAbi( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -type: string; -name?: string; -inputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -stateMutability?: string; -}>; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + type: string; + name?: string; + inputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + stateMutability?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/abi', @@ -67,42 +67,42 @@ stateMutability?: string; /** * Get events * Get details of all events implemented by a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getContractEvents( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -name: string; -inputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -comment?: string; -}>; -}> { + public getEvents( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + name: string; + inputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + comment?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/events', @@ -121,20 +121,20 @@ comment?: string; /** * Get extensions * Get all detected extensions for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getExtensions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * Array of detected extension names - */ -result: Array; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * Array of detected extension names + */ + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/extensions', @@ -153,44 +153,44 @@ result: Array; /** * Get functions * Get details of all functions implemented by the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getFunctions( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -name: string; -inputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -comment?: string; -signature: string; -stateMutability: string; -}>; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + name: string; + inputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + comment?: string; + signature: string; + stateMutability: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/metadata/functions', diff --git a/sdk/src/services/ContractRolesService.ts b/sdk/src/services/ContractRolesService.ts index 186047017..e840a305a 100644 --- a/sdk/src/services/ContractRolesService.ts +++ b/sdk/src/services/ContractRolesService.ts @@ -13,18 +13,18 @@ export class ContractRolesService { * Get wallets for role * Get all wallets with a specific role for a contract. * @param role The role to list wallet members - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getContractRole( -role: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array; -}> { + public getRole( + role: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/roles/get', @@ -46,27 +46,27 @@ result: Array; /** * Get wallets for all roles * Get all wallets in each role for a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public listContractRoles( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -admin: Array; -transfer: Array; -minter: Array; -pauser: Array; -lister: Array; -asset: Array; -unwrap: Array; -factory: Array; -signer: Array; -}; -}> { + public getAll( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + admin: Array; + transfer: Array; + minter: Array; + pauser: Array; + lister: Array; + asset: Array; + unwrap: Array; + factory: Array; + signer: Array; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/roles/get-all', @@ -85,67 +85,67 @@ signer: Array; /** * Grant role * Grant a role to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public grantContractRole( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The role to grant - */ -role: string; -/** - * The address to grant the role to - */ -address: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public grant( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The role to grant + */ + role: string; + /** + * The address to grant the role to + */ + address: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/roles/grant', @@ -176,67 +176,67 @@ queueId: string; /** * Revoke role * Revoke a role from a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public revokeContractRole( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The role to revoke - */ -role: string; -/** - * The address to revoke the role from - */ -address: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public revoke( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The role to revoke + */ + role: string; + /** + * The address to revoke the role from + */ + address: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/roles/revoke', diff --git a/sdk/src/services/ContractRoyaltiesService.ts b/sdk/src/services/ContractRoyaltiesService.ts index e7f8ec92f..f60c24986 100644 --- a/sdk/src/services/ContractRoyaltiesService.ts +++ b/sdk/src/services/ContractRoyaltiesService.ts @@ -12,26 +12,26 @@ export class ContractRoyaltiesService { /** * Get royalty details * Gets the royalty recipient and BPS (basis points) of the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getDefaultRoyaltyInfo( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -}; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/royalties/get-default-royalty-info', @@ -50,28 +50,28 @@ fee_recipient: string; /** * Get token royalty details * Gets the royalty recipient and BPS (basis points) of a particular token in the contract. - * @param tokenId - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param tokenId + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getTokenRoyaltyInfo( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -}; -}> { + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/royalties/get-token-royalty-info/{tokenId}', @@ -91,67 +91,67 @@ fee_recipient: string; /** * Set royalty details * Set the royalty recipient and fee for the smart contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setDefaultRoyaltyInfo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/royalties/set-default-royalty-info', @@ -182,71 +182,71 @@ queueId: string; /** * Set token royalty details * Set the royalty recipient and fee for a particular token in the contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public setTokenRoyaltyInfo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The royalty fee in BPS (basis points). 100 = 1%. - */ -seller_fee_basis_points: number; -/** - * The wallet address that will receive the royalty fees. - */ -fee_recipient: string; -/** - * The token ID to set the royalty info for. - */ -token_id: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The royalty fee in BPS (basis points). 100 = 1%. + */ + seller_fee_basis_points: number; + /** + * The wallet address that will receive the royalty fees. + */ + fee_recipient: string; + /** + * The token ID to set the royalty info for. + */ + token_id: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/royalties/set-token-royalty-info', diff --git a/sdk/src/services/ContractService.ts b/sdk/src/services/ContractService.ts index da8876320..a7109ef70 100644 --- a/sdk/src/services/ContractService.ts +++ b/sdk/src/services/ContractService.ts @@ -13,20 +13,20 @@ export class ContractService { * Read from contract * Call a read function on a contract. * @param functionName Name of the function to call on Contract - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param args Arguments for the function. Comma Separated * @returns any Default Response * @throws ApiError */ public read( -functionName: string, -chain: string, -contractAddress: string, -args?: string, -): CancelablePromise<{ -result: any; -}> { + functionName: string, + chain: string, + contractAddress: string, + args?: string, + ): CancelablePromise<{ + result: any; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/read', @@ -49,94 +49,94 @@ result: any; /** * Write to contract * Call a write function on a contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public write( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The function to call on the contract. It is highly recommended to provide a full function signature, such as "function mintTo(address to, uint256 amount)", to avoid ambiguity and to skip ABI resolution. - */ -functionName: string; -/** - * An array of arguments to provide the function. Supports: numbers, strings, arrays, objects. Do not provide: BigNumber, bigint, Date objects - */ -args: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -abi?: Array<{ -type: string; -name?: string; -inputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -outputs?: Array<{ -type?: string; -name?: string; -internalType?: string; -stateMutability?: string; -components?: Array<{ -type?: string; -name?: string; -internalType?: string; -}>; -}>; -stateMutability?: string; -}>; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The function to call on the contract + */ + functionName: string; + /** + * The arguments to call on the function + */ + args: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + abi?: Array<{ + type: string; + name?: string; + inputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + outputs?: Array<{ + type?: string; + name?: string; + internalType?: string; + stateMutability?: string; + components?: Array<{ + type?: string; + name?: string; + internalType?: string; + }>; + }>; + stateMutability?: string; + }>; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/write', diff --git a/sdk/src/services/ContractSubscriptionsService.ts b/sdk/src/services/ContractSubscriptionsService.ts index 93120f56d..cfa357f5b 100644 --- a/sdk/src/services/ContractSubscriptionsService.ts +++ b/sdk/src/services/ContractSubscriptionsService.ts @@ -16,29 +16,29 @@ export class ContractSubscriptionsService { * @throws ApiError */ public getContractSubscriptions(): CancelablePromise<{ -result: Array<{ -id: string; -chainId: number; -/** - * A contract or wallet address - */ -contractAddress: string; -webhook?: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -processEventLogs: boolean; -filterEvents: Array; -processTransactionReceipts: boolean; -filterFunctions: Array; -createdAt: string; -}>; -}> { + result: Array<{ + id: string; + chainId: number; + /** + * A contract or wallet address + */ + contractAddress: string; + webhook?: { + url: string; + name: (string | null); + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + id: number; + }; + processEventLogs: boolean; + filterEvents: Array; + processTransactionReceipts: boolean; + filterFunctions: Array; + createdAt: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract-subscriptions/get-all', @@ -53,65 +53,65 @@ createdAt: string; /** * Add contract subscription * Subscribe to event logs and transaction receipts for a contract. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public addContractSubscription( -requestBody: { -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * The address for the contract. - */ -contractAddress: string; -/** - * Webhook URL - */ -webhookUrl?: string; -/** - * If true, parse event logs for this contract. - */ -processEventLogs: boolean; -/** - * A case-sensitive list of event names to filter event logs. Parses all event logs by default. - */ -filterEvents?: Array; -/** - * If true, parse transaction receipts for this contract. - */ -processTransactionReceipts: boolean; -/** - * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. - */ -filterFunctions?: Array; -}, -): CancelablePromise<{ -result: { -id: string; -chainId: number; -/** - * A contract or wallet address - */ -contractAddress: string; -webhook?: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -processEventLogs: boolean; -filterEvents: Array; -processTransactionReceipts: boolean; -filterFunctions: Array; -createdAt: string; -}; -}> { + requestBody: { + /** + * The chain for the contract. + */ + chain: string; + /** + * The address for the contract. + */ + contractAddress: string; + /** + * Webhook URL + */ + webhookUrl?: string; + /** + * If true, parse event logs for this contract. + */ + processEventLogs: boolean; + /** + * A case-sensitive list of event names to filter event logs. Parses all event logs by default. + */ + filterEvents?: Array; + /** + * If true, parse transaction receipts for this contract. + */ + processTransactionReceipts: boolean; + /** + * A case-sensitive list of function names to filter transaction receipts. Parses all transaction receipts by default. + */ + filterFunctions?: Array; + }, + ): CancelablePromise<{ + result: { + id: string; + chainId: number; + /** + * A contract or wallet address + */ + contractAddress: string; + webhook?: { + url: string; + name: (string | null); + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + id: number; + }; + processEventLogs: boolean; + filterEvents: Array; + processTransactionReceipts: boolean; + filterFunctions: Array; + createdAt: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract-subscriptions/add', @@ -128,22 +128,22 @@ createdAt: string; /** * Remove contract subscription * Remove an existing contract subscription - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public removeContractSubscription( -requestBody: { -/** - * The ID for an existing contract subscription. - */ -contractSubscriptionId: string; -}, -): CancelablePromise<{ -result: { -status: string; -}; -}> { + requestBody: { + /** + * The ID for an existing contract subscription. + */ + contractSubscriptionId: string; + }, + ): CancelablePromise<{ + result: { + status: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract-subscriptions/remove', @@ -160,29 +160,26 @@ status: string; /** * Get subscribed contract indexed block range * Gets the subscribed contract's indexed block range - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ public getContractIndexedBlockRange( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * A contract or wallet address - */ -contractAddress: string; -fromBlock: number; -toBlock: number; -status: string; -}; -}> { + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + chain: string; + /** + * A contract or wallet address + */ + contractAddress: string; + fromBlock: number; + toBlock: number; + status: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/subscriptions/get-indexed-blocks', @@ -201,18 +198,18 @@ status: string; /** * Get last processed block * Get the last processed block for a chain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain name or ID * @returns any Default Response * @throws ApiError */ public getLatestBlock( -chain: string, -): CancelablePromise<{ -result: { -lastBlock: number; -status: string; -}; -}> { + chain: string, + ): CancelablePromise<{ + result: { + lastBlock: number; + status: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract-subscriptions/last-block', diff --git a/sdk/src/services/DefaultService.ts b/sdk/src/services/DefaultService.ts index 54389d7a7..1f2aac2a7 100644 --- a/sdk/src/services/DefaultService.ts +++ b/sdk/src/services/DefaultService.ts @@ -31,15 +31,4 @@ export class DefaultService { }); } - /** - * @returns any Default Response - * @throws ApiError - */ - public getJson1(): CancelablePromise { - return this.httpRequest.request({ - method: 'GET', - url: '/json/', - }); - } - } diff --git a/sdk/src/services/DeployService.ts b/sdk/src/services/DeployService.ts index f343f5a31..19ac25673 100644 --- a/sdk/src/services/DeployService.ts +++ b/sdk/src/services/DeployService.ts @@ -12,82 +12,82 @@ export class DeployService { /** * Deploy Edition * Deploy an Edition contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployEdition( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/edition', @@ -114,83 +114,83 @@ deployedAddress?: string; /** * Deploy Edition Drop * Deploy an Edition Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployEditionDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/edition-drop', @@ -217,78 +217,78 @@ deployedAddress?: string; /** * Deploy Marketplace * Deploy a Marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployMarketplaceV3( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/marketplace-v3', @@ -315,79 +315,79 @@ deployedAddress?: string; /** * Deploy Multiwrap * Deploy a Multiwrap contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployMultiwrap( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/multiwrap', @@ -414,82 +414,82 @@ deployedAddress?: string; /** * Deploy NFT Collection * Deploy an NFT Collection contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployNftCollection( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/nft-collection', @@ -516,83 +516,83 @@ deployedAddress?: string; /** * Deploy NFT Drop * Deploy an NFT Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployNftDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/nft-drop', @@ -619,81 +619,81 @@ deployedAddress?: string; /** * Deploy Pack * Deploy a Pack contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployPack( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/pack', @@ -720,83 +720,83 @@ deployedAddress?: string; /** * Deploy Signature Drop * Deploy a Signature Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deploySignatureDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -seller_fee_basis_points: number; -fee_recipient: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + seller_fee_basis_points: number; + fee_recipient: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/signature-drop', @@ -823,83 +823,83 @@ deployedAddress?: string; /** * Deploy Split * Deploy a Split contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deploySplit( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -recipients: Array<{ -/** - * A contract or wallet address - */ -address: string; -sharesBps: number; -}>; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + recipients: Array<{ + /** + * A contract or wallet address + */ + address: string; + sharesBps: number; + }>; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/split', @@ -926,80 +926,80 @@ deployedAddress?: string; /** * Deploy Token * Deploy a Token contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployToken( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/token', @@ -1026,81 +1026,81 @@ deployedAddress?: string; /** * Deploy Token Drop * Deploy a Token Drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployTokenDrop( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -merkle?: Record; -symbol: string; -platform_fee_basis_points: number; -platform_fee_recipient: string; -primary_sale_recipient?: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + merkle?: Record; + symbol: string; + platform_fee_basis_points: number; + platform_fee_recipient: string; + primary_sale_recipient?: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/token-drop', @@ -1127,84 +1127,84 @@ deployedAddress?: string; /** * Deploy Vote * Deploy a Vote contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployVote( -chain: string, -xBackendWalletAddress: string, -requestBody: { -contractMetadata: { -name: string; -description?: string; -image?: string; -external_link?: string; -app_uri?: string; -defaultAdmin?: string; -voting_delay_in_blocks: number; -voting_period_in_blocks: number; -/** - * A contract or wallet address - */ -voting_token_address: string; -voting_quorum_fraction: number; -proposal_token_threshold: string; -trusted_forwarders: Array; -}; -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -queueId?: string; -/** - * A contract or wallet address - */ -deployedAddress?: string; -}; -}> { + chain: string, + xBackendWalletAddress: string, + requestBody: { + contractMetadata: { + name: string; + description?: string; + image?: string; + external_link?: string; + app_uri?: string; + defaultAdmin?: string; + voting_delay_in_blocks: number; + voting_period_in_blocks: number; + /** + * A contract or wallet address + */ + voting_token_address: string; + voting_quorum_fraction: number; + proposal_token_threshold: string; + trusted_forwarders: Array; + }; + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + queueId?: string; + /** + * A contract or wallet address + */ + deployedAddress?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/prebuilts/vote', @@ -1231,74 +1231,74 @@ deployedAddress?: string; /** * Deploy published contract * Deploy a published contract to the blockchain. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param publisher Address or ENS of the publisher of the contract * @param contractName Name of the published contract to deploy * @param xBackendWalletAddress Backend wallet address - * @param requestBody + * @param requestBody * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public deployPublished( -chain: string, -publisher: string, -contractName: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Version of the contract to deploy. Defaults to latest. - */ -version?: string; -forceDirectDeploy?: boolean; -saltForProxyDeploy?: string; -compilerOptions?: { -compilerType: 'zksolc'; -compilerVersion?: string; -evmVersion?: string; -}; -/** - * Constructor arguments for the deployment. - */ -constructorParams: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -queueId?: string; -/** - * Not all contracts return a deployed address. - */ -deployedAddress?: string; -message?: string; -}> { + chain: string, + publisher: string, + contractName: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Version of the contract to deploy. Defaults to latest. + */ + version?: string; + forceDirectDeploy?: boolean; + saltForProxyDeploy?: string; + compilerOptions?: { + compilerType: 'zksolc'; + compilerVersion?: string; + evmVersion?: string; + }; + /** + * Constructor arguments for the deployment. + */ + constructorParams: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + queueId?: string; + /** + * Not all contracts return a deployed address. + */ + deployedAddress?: string; + message?: string; + }> { return this.httpRequest.request({ method: 'POST', url: '/deploy/{chain}/{publisher}/{contractName}', @@ -1331,8 +1331,8 @@ message?: string; * @throws ApiError */ public contractTypes(): CancelablePromise<{ -result: Array; -}> { + result: Array; + }> { return this.httpRequest.request({ method: 'GET', url: '/deploy/contract-types', diff --git a/sdk/src/services/Erc1155Service.ts b/sdk/src/services/Erc1155Service.ts index bb7c7f54e..b9e834913 100644 --- a/sdk/src/services/Erc1155Service.ts +++ b/sdk/src/services/Erc1155Service.ts @@ -13,24 +13,24 @@ export class Erc1155Service { * Get details * Get the details for a token in an ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155Get( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}; -}> { + public get( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get', @@ -52,27 +52,27 @@ quantityOwned?: string; /** * Get all details * Get details for all tokens in an ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param start The start token ID for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. * @returns any Default Response * @throws ApiError */ - public erc1155GetAll( -chain: string, -contractAddress: string, -start?: number, -count?: number, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { + public getAll( + chain: string, + contractAddress: string, + start?: number, + count?: number, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get-all', @@ -96,24 +96,24 @@ quantityOwned?: string; * Get owned tokens * Get all tokens in an ERC-1155 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155GetOwned( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { + public getOwned( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/get-owned', @@ -137,19 +137,19 @@ quantityOwned?: string; * Get the balance of a specific wallet address for this ERC-1155 contract. * @param walletAddress Address of the wallet to check NFT balance * @param tokenId The tokenId of the NFT to check balance of - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155BalanceOf( -walletAddress: string, -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public balanceOf( + walletAddress: string, + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/balance-of', @@ -174,19 +174,19 @@ result?: string; * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155IsApproved( -ownerWallet: string, -operator: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: boolean; -}> { + public isApproved( + ownerWallet: string, + operator: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/is-approved', @@ -209,17 +209,17 @@ result?: boolean; /** * Get total supply * Get the total supply in circulation for this ERC-1155 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155TotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public totalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/total-count', @@ -239,18 +239,18 @@ result?: string; * Get total supply * Get the total supply in circulation for this ERC-1155 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @returns any Default Response * @throws ApiError */ - public erc1155TotalSupply( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public totalSupply( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/total-supply', @@ -272,261 +272,255 @@ result?: string; /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-1155 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public erc1155SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps?: number; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | ({ -contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); -to: string; -quantity: string; -royaltyRecipient?: string; -royaltyBps?: number; -primarySaleRecipient?: string; -/** - * An amount in native token (decimals allowed). Example: "0.1" - */ -pricePerToken?: string; -/** - * An amount in wei (no decimals). Example: "50000000000" - */ -pricePerTokenWei?: string; -currency?: string; -validityStartTimestamp: number; -validityEndTimestamp?: number; -uid?: string; -} & ({ -metadata: ({ -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -} | string); -} | { -tokenId: string; -}))), -): CancelablePromise<{ -result: ({ -payload: { -uri: string; -tokenId: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -to: string; -royaltyRecipient: string; -royaltyBps: string; -primarySaleRecipient: string; -tokenId: string; -uri: string; -quantity: string; -pricePerToken: string; -currency: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { + public signatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: ({ + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps?: number; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: (string | number); + mintEndTime?: (string | number); + } | ({ + contractType?: ('TokenERC1155' | 'SignatureMintERC1155'); + to: string; + quantity: string; + royaltyRecipient?: string; + royaltyBps?: number; + primarySaleRecipient?: string; + pricePerToken?: string; + pricePerTokenWei?: string; + currency?: string; + validityStartTimestamp: number; + validityEndTimestamp?: number; + uid?: string; + } & ({ + metadata: ({ + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + } | string); + } | { + tokenId: string; + }))), + ): CancelablePromise<{ + result: ({ + payload: { + uri: string; + tokenId: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } | { + payload: { + to: string; + royaltyRecipient: string; + royaltyBps: string; + primarySaleRecipient: string; + tokenId: string; + uri: string; + quantity: string; + pricePerToken: string; + currency: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }); + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/signature/generate', @@ -557,21 +551,21 @@ signature: string; * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ - public erc1155CanClaim( -quantity: string, -tokenId: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { + public canClaim( + quantity: string, + tokenId: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/can-claim', @@ -596,47 +590,47 @@ result: boolean; * Get currently active claim phase for a specific token ID. * Retrieve the currently active claim phase for a specific token ID, if any. * @param tokenId The token ID of the NFT you want to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc1155GetActiveClaimConditions( -tokenId: (string | number), -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { + public getActiveClaimConditions( + tokenId: (string | number), + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-active', @@ -660,47 +654,47 @@ snapshot?: (null | Array); * Get all the claim phases configured for a specific token ID. * Get all the claim phases configured for a specific token ID. * @param tokenId The token ID of the NFT you want to get the claim conditions for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc1155GetAllClaimConditions( -tokenId: (string | number), -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { + public getAllClaimConditions( + tokenId: (string | number), + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-all', @@ -725,31 +719,31 @@ snapshot?: (null | Array); * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param tokenId The token ID of the NFT you want to get the claimer proofs for. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc1155GetClaimerProofs( -tokenId: (string | number), -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { + public getClaimerProofs( + tokenId: (string | number), + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: (null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }); + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claimer-proofs', @@ -774,21 +768,21 @@ proof: Array; * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param tokenId The token ID of the NFT you want to check if the wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ - public erc1155GetClaimIneligibilityReasons( -tokenId: (string | number), -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { + public getClaimIneligibilityReasons( + tokenId: (string | number), + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/get-claim-ineligibility-reasons', @@ -812,73 +806,73 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address /** * Airdrop tokens * Airdrop ERC-1155 tokens to specific wallets. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155Airdrop( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID of the NFT to airdrop - */ -tokenId: string; -/** - * Addresses and quantities to airdrop to - */ -addresses: Array<{ -/** - * A contract or wallet address - */ -address: string; -quantity: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public airdrop( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID of the NFT to airdrop + */ + tokenId: string; + /** + * Addresses and quantities to airdrop to + */ + addresses: Array<{ + /** + * A contract or wallet address + */ + address: string; + quantity: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/airdrop', @@ -909,67 +903,67 @@ queueId: string; /** * Burn token * Burn ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The token ID to burn - */ -tokenId: string; -/** - * The amount of tokens to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The token ID to burn + */ + tokenId: string; + /** + * The amount of tokens to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/burn', @@ -1000,61 +994,61 @@ queueId: string; /** * Burn tokens (batch) * Burn a batch of ERC-1155 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155BurnBatch( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -tokenIds: Array; -amounts: Array; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public burnBatch( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + tokenIds: Array; + amounts: Array; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/burn-batch', @@ -1085,71 +1079,71 @@ queueId: string; /** * Claim tokens to wallet * Claim ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to claim the NFT to - */ -receiver: string; -/** - * Token ID of the NFT to claim - */ -tokenId: string; -/** - * Quantity of NFTs to mint - */ -quantity: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public claimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to claim the NFT to + */ + receiver: string; + /** + * Token ID of the NFT to claim + */ + tokenId: string; + /** + * Quantity of NFTs to mint + */ + quantity: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-to', @@ -1180,93 +1174,93 @@ queueId: string; /** * Lazy mint * Lazy mint ERC-1155 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155LazyMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public lazyMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + metadatas: Array<({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string)>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/lazy-mint', @@ -1297,71 +1291,71 @@ queueId: string; /** * Mint additional supply * Mint additional supply of ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155MintAdditionalSupplyTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -/** - * Token ID to mint additional supply to - */ -tokenId: string; -/** - * The amount of supply to mint - */ -additionalSupply: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintAdditionalSupplyTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + /** + * Token ID to mint additional supply to + */ + tokenId: string; + /** + * The amount of supply to mint + */ + additionalSupply: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-additional-supply-to', @@ -1392,100 +1386,100 @@ queueId: string; /** * Mint tokens (batch) * Mint ERC-1155 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadataWithSupply: Array<{ -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -supply: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadataWithSupply: Array<{ + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + supply: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-batch-to', @@ -1516,100 +1510,100 @@ queueId: string; /** * Mint tokens * Mint ERC-1155 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadataWithSupply: { -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -supply: string; -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadataWithSupply: { + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + supply: string; + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/mint-to', @@ -1640,67 +1634,67 @@ queueId: string; /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155SetApprovalForAll( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * whether to approve or revoke approval - */ -approved: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setApprovalForAll( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * whether to approve or revoke approval + */ + approved: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/set-approval-for-all', @@ -1731,75 +1725,75 @@ queueId: string; /** * Transfer token * Transfer an ERC-1155 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -/** - * A valid hex string - */ -data?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + /** + * A valid hex string + */ + data?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/transfer', @@ -1830,79 +1824,79 @@ queueId: string; /** * Transfer token from wallet * Transfer an ERC-1155 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC1155 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -from: string; -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -/** - * A valid hex string - */ -data?: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + from: string; + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + /** + * A valid hex string + */ + data?: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/transfer-from', @@ -1933,141 +1927,141 @@ queueId: string; /** * Signature mint * Mint ERC-1155 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: { -uri: string; -tokenId: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public signatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: { + uri: string; + tokenId: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now if value not provided. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/signature/mint', @@ -2098,80 +2092,80 @@ queueId: string; /** * Overwrite the claim conditions for a specific token ID.. * Overwrite the claim conditions for a specific token ID. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * ID of the token to set the claim conditions for - */ -tokenId: (string | number); -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * ID of the token to set the claim conditions for + */ + tokenId: (string | number); + claimConditionInputs: Array<{ + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set', @@ -2202,82 +2196,82 @@ queueId: string; /** * Overwrite the claim conditions for a specific token ID.. * Allows you to set claim conditions for multiple token IDs in a single transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155ClaimConditionsUpdate( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionsForToken: Array<{ -/** - * ID of the token to set the claim conditions for - */ -tokenId: (string | number); -claimConditions: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public claimConditionsUpdate( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionsForToken: Array<{ + /** + * ID of the token to set the claim conditions for + */ + tokenId: (string | number); + claimConditions: Array<{ + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }>; + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/set-batch', @@ -2308,83 +2302,83 @@ queueId: string; /** * Update a single claim phase. * Update a single claim phase on a specific token ID, by providing the index of the claim phase and the new phase configuration. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update claim phase for - */ -tokenId: (string | number); -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update claim phase for + */ + tokenId: (string | number); + claimConditionInput: { + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/claim-conditions/update', @@ -2415,97 +2409,97 @@ queueId: string; /** * Update token metadata * Update the metadata for an ERC1155 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc1155UpdateTokenMetadata( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update metadata - */ -tokenId: string; -metadata: { -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateTokenMetadata( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update metadata + */ + tokenId: string; + metadata: { + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc1155/token/update', diff --git a/sdk/src/services/Erc20Service.ts b/sdk/src/services/Erc20Service.ts index 743d72f2b..7e3fdd9f3 100644 --- a/sdk/src/services/Erc20Service.ts +++ b/sdk/src/services/Erc20Service.ts @@ -14,31 +14,31 @@ export class Erc20Service { * Get the allowance of a specific wallet for an ERC-20 contract. * @param ownerWallet Address of the wallet who owns the funds * @param spenderWallet Address of the wallet to check token allowance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ - public erc20AllowanceOf( -ownerWallet: string, -spenderWallet: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { + public allowanceOf( + ownerWallet: string, + spenderWallet: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/allowance-of', @@ -62,30 +62,30 @@ displayValue: string; * Get token balance * Get the balance of a specific wallet address for this ERC-20 contract. * @param walletAddress Address of the wallet to check token balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ - public erc20BalanceOf( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { + public balanceOf( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/balance-of', @@ -107,21 +107,21 @@ displayValue: string; /** * Get token details * Get details for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ - public erc20Get( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -}; -}> { + public get( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/get', @@ -140,29 +140,29 @@ decimals: string; /** * Get total supply * Get the total supply in circulation for this ERC-20 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @returns any Default Response * @throws ApiError */ - public erc20TotalSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -name: string; -symbol: string; -decimals: string; -/** - * Value in wei - */ -value: string; -/** - * Value in tokens - */ -displayValue: string; -}; -}> { + public totalSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + name: string; + symbol: string; + decimals: string; + /** + * Value in wei + */ + value: string; + /** + * Value in tokens + */ + displayValue: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/total-supply', @@ -181,125 +181,125 @@ displayValue: string; /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-20 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public erc20SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | ({ -to: string; -primarySaleRecipient?: string; -price?: string; -priceInWei?: string; -currency?: string; -validityStartTimestamp: number; -validityEndTimestamp?: number; -uid?: string; -} & ({ -quantity: string; -} | { -quantityWei: string; -}))), -): CancelablePromise<{ -result: ({ -payload: { -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -to: string; -primarySaleRecipient: string; -quantity: string; -price: string; -currency: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { + public signatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: ({ + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: (string | number); + mintEndTime?: (string | number); + } | ({ + to: string; + primarySaleRecipient?: string; + price?: string; + priceInWei?: string; + currency?: string; + validityStartTimestamp: number; + validityEndTimestamp?: number; + uid?: string; + } & ({ + quantity: string; + } | { + quantityWei: string; + }))), + ): CancelablePromise<{ + result: ({ + payload: { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } | { + payload: { + to: string; + primarySaleRecipient: string; + quantity: string; + price: string; + currency: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }); + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/signature/generate', @@ -329,20 +329,20 @@ signature: string; * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ - public erc20CanClaim( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { + public canClaim( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/can-claim', @@ -365,46 +365,46 @@ result: boolean; /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc20GetActiveClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { + public getActiveClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-active', @@ -426,46 +426,46 @@ snapshot?: (null | Array); /** * Get all the claim phases configured. * Get all the claim phases configured on the drop contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc20GetAllClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { + public getAllClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-all', @@ -488,20 +488,20 @@ snapshot?: (null | Array); * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ - public erc20ClaimConditionsGetClaimIneligibilityReasons( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { + public claimConditionsGetClaimIneligibilityReasons( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claim-ineligibility-reasons', @@ -525,30 +525,30 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc20ClaimConditionsGetClaimerProofs( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { + public claimConditionsGetClaimerProofs( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: (null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }); + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/get-claimer-proofs', @@ -570,67 +570,67 @@ proof: Array; /** * Set allowance * Grant a specific wallet address to transfer ERC-20 tokens from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20SetAllowance( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to allow transfers from - */ -spenderAddress: string; -/** - * The number of tokens to give as allowance - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setAllowance( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to allow transfers from + */ + spenderAddress: string; + /** + * The number of tokens to give as allowance + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/set-allowance', @@ -661,67 +661,67 @@ queueId: string; /** * Transfer tokens * Transfer ERC-20 tokens from the caller wallet to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -toAddress: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + toAddress: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/transfer', @@ -752,71 +752,71 @@ queueId: string; /** * Transfer tokens from wallet * Transfer ERC-20 tokens from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -fromAddress: string; -/** - * The recipient address. - */ -toAddress: string; -/** - * The amount of tokens to transfer. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + fromAddress: string; + /** + * The recipient address. + */ + toAddress: string; + /** + * The amount of tokens to transfer. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/transfer-from', @@ -847,63 +847,63 @@ queueId: string; /** * Burn token * Burn ERC-20 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The amount of tokens you want to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The amount of tokens you want to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/burn', @@ -934,67 +934,67 @@ queueId: string; /** * Burn token from wallet * Burn ERC-20 tokens in a specific wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20BurnFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet sending the tokens - */ -holderAddress: string; -/** - * The amount of this token you want to burn - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public burnFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet sending the tokens + */ + holderAddress: string; + /** + * The amount of this token you want to burn + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/burn-from', @@ -1025,67 +1025,67 @@ queueId: string; /** * Claim tokens to wallet * Claim ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The wallet address to receive the claimed tokens. - */ -recipient: string; -/** - * The amount of tokens to claim. - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public claimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The wallet address to receive the claimed tokens. + */ + recipient: string; + /** + * The amount of tokens to claim. + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-to', @@ -1116,69 +1116,69 @@ queueId: string; /** * Mint tokens (batch) * Mint ERC-20 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -data: Array<{ -/** - * The address to mint tokens to - */ -toAddress: string; -/** - * The number of tokens to mint to the specific address. - */ -amount: string; -}>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + data: Array<{ + /** + * The address to mint tokens to + */ + toAddress: string; + /** + * The number of tokens to mint to the specific address. + */ + amount: string; + }>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/mint-batch-to', @@ -1209,67 +1209,67 @@ queueId: string; /** * Mint tokens * Mint ERC-20 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC20 contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint tokens to - */ -toAddress: string; -/** - * The amount of tokens you want to send - */ -amount: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint tokens to + */ + toAddress: string; + /** + * The amount of tokens you want to send + */ + amount: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/mint-to', @@ -1300,97 +1300,97 @@ queueId: string; /** * Signature mint * Mint ERC-20 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: { -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public signatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: { + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/signature/mint', @@ -1421,76 +1421,76 @@ queueId: string; /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInputs: Array<{ + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/set', @@ -1521,79 +1521,79 @@ queueId: string; /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc20UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInput: { + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc20/claim-conditions/update', diff --git a/sdk/src/services/Erc721Service.ts b/sdk/src/services/Erc721Service.ts index 8ae8559f4..3fcf716dd 100644 --- a/sdk/src/services/Erc721Service.ts +++ b/sdk/src/services/Erc721Service.ts @@ -13,24 +13,24 @@ export class Erc721Service { * Get details * Get the details for a token in an ERC-721 contract. * @param tokenId The tokenId of the NFT to retrieve - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721Get( -tokenId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}; -}> { + public get( + tokenId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get', @@ -52,27 +52,27 @@ quantityOwned?: string; /** * Get all details * Get details for all tokens in an ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param start The start token id for paginated results. Defaults to 0. * @param count The page count for paginated results. Defaults to 100. * @returns any Default Response * @throws ApiError */ - public erc721GetAll( -chain: string, -contractAddress: string, -start?: number, -count?: number, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { + public getAll( + chain: string, + contractAddress: string, + start?: number, + count?: number, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get-all', @@ -96,24 +96,24 @@ quantityOwned?: string; * Get owned tokens * Get all tokens in an ERC-721 contract owned by a specific wallet. * @param walletAddress Address of the wallet to get NFTs for - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721GetOwned( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: Array<{ -metadata: Record; -owner: string; -type: ('ERC1155' | 'ERC721' | 'metaplex'); -supply: string; -quantityOwned?: string; -}>; -}> { + public getOwned( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: Array<{ + metadata: Record; + owner: string; + type: ('ERC1155' | 'ERC721' | 'metaplex'); + supply: string; + quantityOwned?: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/get-owned', @@ -136,18 +136,18 @@ quantityOwned?: string; * Get token balance * Get the balance of a specific wallet address for this ERC-721 contract. * @param walletAddress Address of the wallet to check NFT balance - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC721 contract address * @returns any Default Response * @throws ApiError */ - public erc721BalanceOf( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public balanceOf( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/balance-of', @@ -171,19 +171,19 @@ result?: string; * Check if the specific wallet has approved transfers from a specific operator wallet. * @param ownerWallet Address of the wallet who owns the NFT * @param operator Address of the operator to check approval on - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721IsApproved( -ownerWallet: string, -operator: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: boolean; -}> { + public isApproved( + ownerWallet: string, + operator: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/is-approved', @@ -206,17 +206,17 @@ result?: boolean; /** * Get total supply * Get the total supply in circulation for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721TotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public totalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-count', @@ -235,17 +235,17 @@ result?: string; /** * Get claimed supply * Get the claimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721TotalClaimedSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public totalClaimedSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-claimed-supply', @@ -264,17 +264,17 @@ result?: string; /** * Get unclaimed supply * Get the unclaimed supply for this ERC-721 contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721TotalUnclaimedSupply( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: string; -}> { + public totalUnclaimedSupply( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/total-unclaimed-supply', @@ -294,20 +294,20 @@ result?: string; * Check if tokens are available for claiming * Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim. * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. This considers all aspects of the active claim phase, including allowlists, previous claims, etc. * @returns any Default Response * @throws ApiError */ - public erc721CanClaim( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: boolean; -}> { + public canClaim( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/can-claim', @@ -330,46 +330,46 @@ result: boolean; /** * Retrieve the currently active claim phase, if any. * Retrieve the currently active claim phase, if any. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc721GetActiveClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: { -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}; -}> { + public getActiveClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: { + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-active', @@ -391,46 +391,46 @@ snapshot?: (null | Array); /** * Get all the claim phases configured for the drop. * Get all the claim phases configured for the drop. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param withAllowList Provide a boolean value to include the allowlist in the response. * @returns any Default Response * @throws ApiError */ - public erc721GetAllClaimConditions( -chain: string, -contractAddress: string, -withAllowList?: boolean, -): CancelablePromise<{ -result: Array<{ -maxClaimableSupply?: (string | number); -startTime: string; -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash: (string | Array); -availableSupply: string; -currentMintSupply: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyMetadata: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -metadata?: { -name?: string; -}; -snapshot?: (null | Array); -}>; -}> { + public getAllClaimConditions( + chain: string, + contractAddress: string, + withAllowList?: boolean, + ): CancelablePromise<{ + result: Array<{ + maxClaimableSupply?: (string | number); + startTime: string; + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash: (string | Array); + availableSupply: string; + currentMintSupply: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyMetadata: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + metadata?: { + name?: string; + }; + snapshot?: (null | Array); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-all', @@ -453,20 +453,20 @@ snapshot?: (null | Array); * Get claim ineligibility reasons * Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any. * @param quantity The amount of tokens to claim. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param addressToCheck The wallet address to check if it can claim tokens. * @returns any Default Response * @throws ApiError */ - public erc721GetClaimIneligibilityReasons( -quantity: string, -chain: string, -contractAddress: string, -addressToCheck?: string, -): CancelablePromise<{ -result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; -}> { + public getClaimIneligibilityReasons( + quantity: string, + chain: string, + contractAddress: string, + addressToCheck?: string, + ): CancelablePromise<{ + result: Array<(string | ('There is not enough supply to claim.' | 'This address is not on the allowlist.' | 'Not enough time since last claim transaction. Please wait.' | 'Claim phase has not started yet.' | 'You have already claimed the token.' | 'Incorrect price or currency.' | 'Cannot claim more than maximum allowed quantity.' | 'There are not enough tokens in the wallet to pay for the claim.' | 'There is no active claim phase at the moment. Please check back in later.' | 'There is no claim condition set.' | 'No wallet connected.' | 'No claim conditions found.'))>; + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claim-ineligibility-reasons', @@ -490,30 +490,30 @@ result: Array<(string | ('There is not enough supply to claim.' | 'This address * Get claimer proofs * Returns allowlist information and merkle proofs for a given wallet address. Returns null if no proof is found for the given wallet address. * @param walletAddress The wallet address to get the merkle proofs for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public erc721GetClaimerProofs( -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: (null | { -price?: string; -/** - * A contract or wallet address - */ -currencyAddress?: string; -/** - * A contract or wallet address - */ -address: string; -maxClaimable: string; -proof: Array; -}); -}> { + public getClaimerProofs( + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: (null | { + price?: string; + /** + * A contract or wallet address + */ + currencyAddress?: string; + /** + * A contract or wallet address + */ + address: string; + maxClaimable: string; + proof: Array; + }); + }> { return this.httpRequest.request({ method: 'GET', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/get-claimer-proofs', @@ -535,67 +535,67 @@ proof: Array; /** * Set approval for all * Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721SetApprovalForAll( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * whether to approve or revoke approval - */ -approved: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setApprovalForAll( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * whether to approve or revoke approval + */ + approved: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-all', @@ -626,67 +626,67 @@ queueId: string; /** * Set approval for token * Approve an operator for the NFT owner. Operators can call transferFrom or safeTransferFrom for the specific token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721SetApprovalForToken( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the operator to give approval to - */ -operator: string; -/** - * the tokenId to give approval for - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setApprovalForToken( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the operator to give approval to + */ + operator: string; + /** + * the tokenId to give approval for + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/set-approval-for-token', @@ -717,67 +717,67 @@ queueId: string; /** * Transfer token * Transfer an ERC-721 token from the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721Transfer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transfer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/transfer', @@ -808,71 +808,71 @@ queueId: string; /** * Transfer token from wallet * Transfer an ERC-721 token from the connected wallet to another wallet. Requires allowance. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721TransferFrom( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The sender address. - */ -from: string; -/** - * The recipient address. - */ -to: string; -/** - * The token ID to transfer. - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public transferFrom( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The sender address. + */ + from: string; + /** + * The recipient address. + */ + to: string; + /** + * The token ID to transfer. + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/transfer-from', @@ -903,97 +903,97 @@ queueId: string; /** * Mint tokens * Mint ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721MintTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/mint-to', @@ -1024,97 +1024,97 @@ queueId: string; /** * Mint tokens (batch) * Mint ERC-721 tokens to multiple wallets in one transaction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721MintBatchTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to mint the NFT to - */ -receiver: string; -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public mintBatchTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to mint the NFT to + */ + receiver: string; + metadatas: Array<({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string)>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/mint-batch-to', @@ -1145,63 +1145,63 @@ queueId: string; /** * Burn token * Burn ERC-721 tokens in the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721Burn( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The token ID to burn - */ -tokenId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public burn( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The token ID to burn + */ + tokenId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/burn', @@ -1232,93 +1232,93 @@ queueId: string; /** * Lazy mint * Lazy mint ERC-721 tokens to be claimed in the future. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721LazyMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -metadatas: Array<({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string)>; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public lazyMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + metadatas: Array<({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string)>; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/lazy-mint', @@ -1349,67 +1349,67 @@ queueId: string; /** * Claim tokens to wallet * Claim ERC-721 tokens to a specific wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721ClaimTo( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Address of the wallet to claim the NFT to - */ -receiver: string; -/** - * Quantity of NFTs to mint - */ -quantity: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public claimTo( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Address of the wallet to claim the NFT to + */ + receiver: string; + /** + * Quantity of NFTs to mint + */ + quantity: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-to', @@ -1440,280 +1440,280 @@ queueId: string; /** * Generate signature * Generate a signature granting access for another wallet to mint tokens from this ERC-721 contract. This method is typically called by the token contract owner. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC721 contract address * @param xBackendWalletAddress Backend wallet address * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @param xThirdwebSdkVersion Override the thirdweb sdk version used. Example: "5" for v5 SDK compatibility. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public erc721SignatureGenerate( -chain: string, -contractAddress: string, -xBackendWalletAddress?: string, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -xThirdwebSdkVersion?: string, -requestBody?: ({ -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient?: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps?: number; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient?: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid?: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress?: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -mintStartTime?: (string | number); -mintEndTime?: (string | number); -} | { -metadata: (string | { -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -}); -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The amount of the "currency" token this token costs. Example: "0.1" - */ -price?: string; -/** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ -priceInWei?: string; -/** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ -currency?: string; -/** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ -primarySaleRecipient?: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ -royaltyBps?: number; -/** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ -validityStartTimestamp?: number; -/** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ -validityEndTimestamp?: number; -/** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ -uid?: string; -}), -): CancelablePromise<{ -result: ({ -payload: { -uri: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -}; -signature: string; -} | { -payload: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -signature: string; -}); -}> { + public signatureGenerate( + chain: string, + contractAddress: string, + xBackendWalletAddress?: string, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + xThirdwebSdkVersion?: string, + requestBody?: ({ + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient?: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps?: number; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient?: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid?: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress?: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + mintStartTime?: (string | number); + mintEndTime?: (string | number); + } | { + metadata: (string | { + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + }); + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The amount of the "currency" token this token costs. Example: "0.1" + */ + price?: string; + /** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ + priceInWei?: string; + /** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ + currency?: string; + /** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ + primarySaleRecipient?: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ + royaltyBps?: number; + /** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ + validityStartTimestamp?: number; + /** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ + validityEndTimestamp?: number; + /** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ + uid?: string; + }), + ): CancelablePromise<{ + result: ({ + payload: { + uri: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + }; + signature: string; + } | { + payload: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + signature: string; + }); + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/generate', @@ -1742,154 +1742,154 @@ signature: string; /** * Signature mint * Mint ERC-721 tokens from a generated signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721SignatureMint( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -payload: ({ -uri: string; -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. - */ -royaltyRecipient: string; -/** - * The number of tokens this signature can be used to mint. - */ -quantity: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. - */ -royaltyBps: string; -/** - * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. - */ -primarySaleRecipient: string; -/** - * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. - * Note that the input value gets hashed in the actual payload that gets generated. - * The smart contract enforces on-chain that no uid gets used more than once, - * which means you can deterministically generate the uid to prevent specific exploits. - */ -uid: string; -metadata: ({ -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -} | string); -/** - * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS - */ -currencyAddress: string; -/** - * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. - */ -price?: string; -/** - * The time from which the signature can be used to mint tokens. Defaults to now. - */ -mintStartTime: number; -/** - * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. - */ -mintEndTime: number; -} | { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}); -signature: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public signatureMint( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + payload: ({ + uri: string; + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the royaltyRecipient address of the contract. + */ + royaltyRecipient: string; + /** + * The number of tokens this signature can be used to mint. + */ + quantity: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the royaltyBps of the contract. + */ + royaltyBps: string; + /** + * If a price is specified, the funds will be sent to the primarySaleRecipient address. Defaults to the primarySaleRecipient address of the contract. + */ + primarySaleRecipient: string; + /** + * A unique identifier for the payload, used to prevent replay attacks and other types of exploits. + * Note that the input value gets hashed in the actual payload that gets generated. + * The smart contract enforces on-chain that no uid gets used more than once, + * which means you can deterministically generate the uid to prevent specific exploits. + */ + uid: string; + metadata: ({ + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + } | string); + /** + * The address of the currency to pay for minting the tokens (use the price field to specify the price). Defaults to NATIVE_TOKEN_ADDRESS + */ + currencyAddress: string; + /** + * If you want the user to pay for minting the tokens, you can specify the price per token. Defaults to 0. + */ + price?: string; + /** + * The time from which the signature can be used to mint tokens. Defaults to now. + */ + mintStartTime: number; + /** + * The time until which the signature can be used to mint tokens. Defaults to 10 years from now. + */ + mintEndTime: number; + } | { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }); + signature: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/mint', @@ -1920,76 +1920,76 @@ queueId: string; /** * Overwrite the claim conditions for the drop. * Overwrite the claim conditions for the drop. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721SetClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInputs: Array<{ -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}>; -resetClaimEligibilityForAll?: boolean; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public setClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInputs: Array<{ + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }>; + resetClaimEligibilityForAll?: boolean; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/set', @@ -2020,79 +2020,79 @@ queueId: string; /** * Update a single claim phase. * Update a single claim phase, by providing the index of the claim phase and the new phase configuration. The index is the position of the phase in the list of phases you have made, starting from zero. e.g. if you have two phases, the first phase has an index of 0 and the second phase has an index of 1. All properties of a phase are optional, with the default being a free, open, unlimited claim, in the native currency, starting immediately. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721UpdateClaimConditions( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -claimConditionInput: { -maxClaimableSupply?: (string | number); -startTime?: (string | number); -price?: (number | string); -/** - * A contract or wallet address - */ -currencyAddress?: string; -maxClaimablePerWallet?: (number | string); -waitInSeconds?: (number | string); -merkleRootHash?: (string | Array); -metadata?: { -name?: string; -}; -snapshot?: (Array | null); -}; -/** - * Index of the claim condition to update - */ -index: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateClaimConditions( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + claimConditionInput: { + maxClaimableSupply?: (string | number); + startTime?: (string | number); + price?: (number | string); + /** + * A contract or wallet address + */ + currencyAddress?: string; + maxClaimablePerWallet?: (number | string); + waitInSeconds?: (number | string); + merkleRootHash?: (string | Array); + metadata?: { + name?: string; + }; + snapshot?: (Array | null); + }; + /** + * Index of the claim condition to update + */ + index: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/claim-conditions/update', @@ -2123,162 +2123,162 @@ queueId: string; /** * Prepare signature * Prepares a payload for a wallet to generate a signature. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress ERC721 contract address - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public erc721SignaturePrepare( -chain: string, -contractAddress: string, -requestBody: { -metadata: (string | { -/** - * The name of the NFT - */ -name?: string; -/** - * The description of the NFT - */ -description?: string; -/** - * The image of the NFT - */ -image?: string; -/** - * The animation url of the NFT - */ -animation_url?: string; -/** - * The external url of the NFT - */ -external_url?: string; -/** - * The background color of the NFT - */ -background_color?: string; -/** - * (not recommended - use "attributes") The properties of the NFT. - */ -properties?: any; -/** - * Arbitrary metadata for this item. - */ -attributes?: Array<{ -trait_type: string; -value: string; -}>; -}); -/** - * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. - */ -to: string; -/** - * The amount of the "currency" token this token costs. Example: "0.1" - */ -price?: string; -/** - * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) - */ -priceInWei?: string; -/** - * The currency address to pay for minting the tokens. Defaults to the chain's native token. - */ -currency?: string; -/** - * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. - */ -primarySaleRecipient?: string; -/** - * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. - */ -royaltyRecipient?: string; -/** - * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. - */ -royaltyBps?: number; -/** - * The start time (in Unix seconds) when the signature can be used to mint. Default: now - */ -validityStartTimestamp?: number; -/** - * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years - */ -validityEndTimestamp?: number; -/** - * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. - */ -uid?: string; -}, -): CancelablePromise<{ -result: { -mintPayload: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -/** - * The payload to sign with a wallet's `signTypedData` method. - */ -typedDataPayload: { -/** - * Specifies the contextual information used to prevent signature reuse across different contexts. - */ -domain: { -name: string; -version: string; -chainId: number; -verifyingContract: string; -}; -/** - * Defines the structure of the data types used in the message. - */ -types: { -EIP712Domain: Array<{ -name: string; -type: string; -}>; -MintRequest: Array<{ -name: string; -type: string; -}>; -}; -/** - * The structured data to be signed. - */ -message: { -uri: string; -to: string; -price: string; -/** - * A contract or wallet address - */ -currency: string; -primarySaleRecipient: string; -royaltyRecipient: string; -royaltyBps: string; -validityStartTimestamp: number; -validityEndTimestamp: number; -uid: string; -}; -/** - * The main type of the data in the message corresponding to a defined type in the `types` field. - */ -primaryType: 'MintRequest'; -}; -}; -}> { + public signaturePrepare( + chain: string, + contractAddress: string, + requestBody: { + metadata: (string | { + /** + * The name of the NFT + */ + name?: string; + /** + * The description of the NFT + */ + description?: string; + /** + * The image of the NFT + */ + image?: string; + /** + * The animation url of the NFT + */ + animation_url?: string; + /** + * The external url of the NFT + */ + external_url?: string; + /** + * The background color of the NFT + */ + background_color?: string; + /** + * (not recommended - use "attributes") The properties of the NFT. + */ + properties?: any; + /** + * Arbitrary metadata for this item. + */ + attributes?: Array<{ + trait_type: string; + value: string; + }>; + }); + /** + * The wallet address that can use this signature to mint tokens. This is to prevent another wallet from intercepting the signature and using it to mint tokens for themselves. + */ + to: string; + /** + * The amount of the "currency" token this token costs. Example: "0.1" + */ + price?: string; + /** + * The amount of the "currency" token this token costs in wei. Remember to use the correct decimals amount for the currency. Example: "100000000000000000" = 0.1 ETH (18 decimals) + */ + priceInWei?: string; + /** + * The currency address to pay for minting the tokens. Defaults to the chain's native token. + */ + currency?: string; + /** + * If a price is specified, funds will be sent to the "primarySaleRecipient" address. Defaults to the "primarySaleRecipient" address of the contract. + */ + primarySaleRecipient?: string; + /** + * The address that will receive the royalty fees from secondary sales. Defaults to the "royaltyRecipient" address of the contract. + */ + royaltyRecipient?: string; + /** + * The percentage fee you want to charge for secondary sales. Defaults to the "royaltyBps" of the contract. + */ + royaltyBps?: number; + /** + * The start time (in Unix seconds) when the signature can be used to mint. Default: now + */ + validityStartTimestamp?: number; + /** + * The end time (in Unix seconds) when the signature can be used to mint. Default: 10 years + */ + validityEndTimestamp?: number; + /** + * The uid is a unique identifier hashed in the payload to prevent replay attacks, ensuring it's only used once on-chain. + */ + uid?: string; + }, + ): CancelablePromise<{ + result: { + mintPayload: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + /** + * The payload to sign with a wallet's `signTypedData` method. + */ + typedDataPayload: { + /** + * Specifies the contextual information used to prevent signature reuse across different contexts. + */ + domain: { + name: string; + version: string; + chainId: number; + verifyingContract: string; + }; + /** + * Defines the structure of the data types used in the message. + */ + types: { + EIP712Domain: Array<{ + name: string; + type: string; + }>; + MintRequest: Array<{ + name: string; + type: string; + }>; + }; + /** + * The structured data to be signed. + */ + message: { + uri: string; + to: string; + price: string; + /** + * A contract or wallet address + */ + currency: string; + primarySaleRecipient: string; + royaltyRecipient: string; + royaltyBps: string; + validityStartTimestamp: number; + validityEndTimestamp: number; + uid: string; + }; + /** + * The main type of the data in the message corresponding to a defined type in the `types` field. + */ + primaryType: 'MintRequest'; + }; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/signature/prepare', @@ -2299,97 +2299,97 @@ primaryType: 'MintRequest'; /** * Update token metadata * Update the metadata for an ERC721 token. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public erc721UpdateTokenMetadata( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * Token ID to update metadata - */ -tokenId: string; -metadata: { -/** - * The name of the NFT - */ -name?: (string | number | null); -/** - * The description of the NFT - */ -description?: (string | null); -/** - * The image of the NFT - */ -image?: (string | null); -/** - * The external url of the NFT - */ -external_url?: (string | null); -/** - * The animation url of the NFT - */ -animation_url?: (string | null); -/** - * The properties of the NFT - */ -properties?: any; -/** - * The attributes of the NFT - */ -attributes?: any; -/** - * The background color of the NFT - */ -background_color?: (string | null); -}; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateTokenMetadata( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * Token ID to update metadata + */ + tokenId: string; + metadata: { + /** + * The name of the NFT + */ + name?: (string | number | null); + /** + * The description of the NFT + */ + description?: (string | null); + /** + * The image of the NFT + */ + image?: (string | null); + /** + * The external url of the NFT + */ + external_url?: (string | null); + /** + * The animation url of the NFT + */ + animation_url?: (string | null); + /** + * The properties of the NFT + */ + properties?: any; + /** + * The attributes of the NFT + */ + attributes?: any; + /** + * The background color of the NFT + */ + background_color?: (string | null); + }; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/contract/{chain}/{contractAddress}/erc721/token/update', diff --git a/sdk/src/services/KeypairService.ts b/sdk/src/services/KeypairService.ts index 27094c3b7..24ff24862 100644 --- a/sdk/src/services/KeypairService.ts +++ b/sdk/src/services/KeypairService.ts @@ -16,33 +16,33 @@ export class KeypairService { * @throws ApiError */ public list(): CancelablePromise<{ -result: Array<{ -/** - * A unique identifier for the keypair - */ -hash: string; -/** - * The public key - */ -publicKey: string; -/** - * The keypair algorithm. - */ -algorithm: string; -/** - * A description for the keypair. - */ -label?: string; -/** - * When the keypair was added - */ -createdAt: string; -/** - * When the keypair was updated - */ -updatedAt: string; -}>; -}> { + result: Array<{ + /** + * A unique identifier for the keypair + */ + hash: string; + /** + * The public key + */ + publicKey: string; + /** + * The keypair algorithm. + */ + algorithm: string; + /** + * A description for the keypair. + */ + label?: string; + /** + * When the keypair was added + */ + createdAt: string; + /** + * When the keypair was updated + */ + updatedAt: string; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/auth/keypair/get-all', @@ -57,49 +57,49 @@ updatedAt: string; /** * Add public key * Add the public key for a keypair - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public add( -requestBody: { -/** - * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. - */ -publicKey: string; -algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); -label?: string; -}, -): CancelablePromise<{ -result: { -keypair: { -/** - * A unique identifier for the keypair - */ -hash: string; -/** - * The public key - */ -publicKey: string; -/** - * The keypair algorithm. - */ -algorithm: string; -/** - * A description for the keypair. - */ -label?: string; -/** - * When the keypair was added - */ -createdAt: string; -/** - * When the keypair was updated - */ -updatedAt: string; -}; -}; -}> { + requestBody: { + /** + * The public key of your keypair beginning with '-----BEGIN PUBLIC KEY-----'. + */ + publicKey: string; + algorithm: ('RS256' | 'RS384' | 'RS512' | 'ES256' | 'ES384' | 'ES512' | 'PS256' | 'PS384' | 'PS512'); + label?: string; + }, + ): CancelablePromise<{ + result: { + keypair: { + /** + * A unique identifier for the keypair + */ + hash: string; + /** + * The public key + */ + publicKey: string; + /** + * The keypair algorithm. + */ + algorithm: string; + /** + * A description for the keypair. + */ + label?: string; + /** + * When the keypair was added + */ + createdAt: string; + /** + * When the keypair was updated + */ + updatedAt: string; + }; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/keypair/add', @@ -116,19 +116,19 @@ updatedAt: string; /** * Remove public key * Remove the public key for a keypair - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public remove( -requestBody: { -hash: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + requestBody: { + hash: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/keypair/remove', diff --git a/sdk/src/services/MarketplaceDirectListingsService.ts b/sdk/src/services/MarketplaceDirectListingsService.ts index a9d72f07f..647a0de13 100644 --- a/sdk/src/services/MarketplaceDirectListingsService.ts +++ b/sdk/src/services/MarketplaceDirectListingsService.ts @@ -12,76 +12,76 @@ export class MarketplaceDirectListingsService { /** * Get all listings * Get all direct listings for this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllDirectListings( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}>; -}> { + public getAll( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all', @@ -107,76 +107,76 @@ endTimeInSeconds?: number; /** * Get all valid listings * Get all the valid direct listings for this marketplace contract. A valid listing is where the listing is active, and the creator still owns & has approved Marketplace to transfer the listed NFTs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllValidDirectListings( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}>; -}> { + public getAllValid( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-all-valid', @@ -203,67 +203,67 @@ endTimeInSeconds?: number; * Get direct listing * Gets a direct listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getDirectListing( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The listing ID. - */ -id: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValuePerToken?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimeInSeconds?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimeInSeconds?: number; -}; -}> { + public getListing( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The listing ID. + */ + id: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValuePerToken?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimeInSeconds?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimeInSeconds?: number; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-listing', @@ -287,19 +287,19 @@ endTimeInSeconds?: number; * Check if a buyer is approved to purchase a specific direct listing. * @param listingId The id of the listing to retrieve. * @param walletAddress The wallet address of the buyer to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public isBuyerApprovedForDirectListings( -listingId: string, -walletAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { + public isBuyerApprovedForListing( + listingId: string, + walletAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-buyer-approved-for-listing', @@ -324,19 +324,19 @@ result: boolean; * Check if a currency is approved for a specific direct listing. * @param listingId The id of the listing to retrieve. * @param currencyContractAddress The smart contract address of the ERC20 token to check. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public isCurrencyApprovedForDirectListings( -listingId: string, -currencyContractAddress: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { + public isCurrencyApprovedForListing( + listingId: string, + currencyContractAddress: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/is-currency-approved-for-listing', @@ -359,17 +359,17 @@ result: boolean; /** * Transfer token from wallet * Get the total number of direct listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getDirectListingsTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { + public getTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/direct-listings/get-total-count', @@ -388,91 +388,91 @@ result: string; /** * Create direct listing * Create a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public createDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public createListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/create-listing', @@ -503,95 +503,95 @@ queueId: string; /** * Update direct listing * Update a direct listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public updateDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to update. - */ -listingId: string; -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The price to pay per unit of NFTs listed. - */ -pricePerToken: string; -/** - * Whether the listing is reserved to be bought from a specific set of buyers. - */ -isReservedListing?: boolean; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public updateListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to update. + */ + listingId: string; + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The price to pay per unit of NFTs listed. + */ + pricePerToken: string; + /** + * Whether the listing is reserved to be bought from a specific set of buyers. + */ + isReservedListing?: boolean; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/update-listing', @@ -622,71 +622,71 @@ queueId: string; /** * Buy from direct listing * Buy from a specific direct listing from this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public buyFromDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The number of tokens to buy (default is 1 for ERC721 NFTs). - */ -quantity: string; -/** - * The wallet address of the buyer. - */ -buyer: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public buyFromListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The number of tokens to buy (default is 1 for ERC721 NFTs). + */ + quantity: string; + /** + * The wallet address of the buyer. + */ + buyer: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/buy-from-listing', @@ -717,67 +717,67 @@ queueId: string; /** * Approve buyer for reserved listing * Approve a wallet address to buy from a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public approveBuyerForReservedListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -buyer: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + buyer: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/approve-buyer-for-reserved-listing', @@ -808,67 +808,67 @@ queueId: string; /** * Revoke approval for reserved listings * Revoke approval for a buyer to purchase a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeBuyerApprovalForReservedListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -buyerAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + buyerAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-buyer-approval-for-reserved-listing', @@ -899,67 +899,67 @@ queueId: string; /** * Revoke currency approval for reserved listing * Revoke approval of a currency for a reserved listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ public revokeCurrencyApprovalForListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to approve a buyer for. - */ -listingId: string; -/** - * The wallet address of the buyer to approve. - */ -currencyContractAddress: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to approve a buyer for. + */ + listingId: string; + /** + * The wallet address of the buyer to approve. + */ + currencyContractAddress: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/revoke-currency-approval-for-listing', @@ -990,63 +990,63 @@ queueId: string; /** * Cancel direct listing * Cancel a direct listing from this marketplace contract. Only the creator of the listing can cancel it. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public cancelDirectListing( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the listing you want to cancel. - */ -listingId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public cancelListing( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the listing you want to cancel. + */ + listingId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/direct-listings/cancel-listing', diff --git a/sdk/src/services/MarketplaceEnglishAuctionsService.ts b/sdk/src/services/MarketplaceEnglishAuctionsService.ts index 4570b18fa..ff9fc197a 100644 --- a/sdk/src/services/MarketplaceEnglishAuctionsService.ts +++ b/sdk/src/services/MarketplaceEnglishAuctionsService.ts @@ -12,84 +12,84 @@ export class MarketplaceEnglishAuctionsService { /** * Get all English auctions * Get all English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllEnglishAuctions( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { + public getAll( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all', @@ -115,84 +115,84 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); /** * Get all valid English auctions * Get all valid English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param seller Being sold by this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllValidEnglishAuctions( -chain: string, -contractAddress: string, -count?: number, -seller?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { + public getAllValid( + chain: string, + contractAddress: string, + count?: number, + seller?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-all-valid', @@ -219,75 +219,75 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * Get English auction * Get a specific English auction listing on this marketplace contract. * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuction( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The listing ID. - */ -id: string; -/** - * The minimum price that a bid must be in order to be accepted. - */ -minimumBidAmount?: string; -/** - * The buyout price of the auction. - */ -buyoutBidAmount: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -buyoutCurrencyValue: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -/** - * This is a buffer e.g. x seconds. - */ -timeBufferInSeconds: number; -/** - * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. - */ -bidBufferBps: number; -/** - * The start time of the auction. - */ -startTimeInSeconds: number; -/** - * The end time of the auction. - */ -endTimeInSeconds: number; -asset?: Record; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}; -}> { + public getAuction( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The listing ID. + */ + id: string; + /** + * The minimum price that a bid must be in order to be accepted. + */ + minimumBidAmount?: string; + /** + * The buyout price of the auction. + */ + buyoutBidAmount: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + buyoutCurrencyValue: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + /** + * This is a buffer e.g. x seconds. + */ + timeBufferInSeconds: number; + /** + * To be considered as a new winning bid, a bid must be at least x% greater than the previous bid. + */ + bidBufferBps: number; + /** + * The start time of the auction. + */ + startTimeInSeconds: number; + /** + * The end time of the auction. + */ + endTimeInSeconds: number; + asset?: Record; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-auction', @@ -309,25 +309,25 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); /** * Get bid buffer BPS * Get the basis points of the bid buffer. - * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. - * If there is no current bid, the bid must be at least the minimum bid amount. - * Returns the value in percentage format, e.g. 100 = 1%. + * This is the percentage higher that a new bid must be than the current highest bid in order to be placed. + * If there is no current bid, the bid must be at least the minimum bid amount. + * Returns the value in percentage format, e.g. 100 = 1%. * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuctionsBidBufferBps( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * Returns a number representing the basis points of the bid buffer. - */ -result: number; -}> { + public getBidBufferBps( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * Returns a number representing the basis points of the bid buffer. + */ + result: number; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-bid-buffer-bps', @@ -349,30 +349,30 @@ result: number; /** * Get minimum next bid * Helper function to calculate the value that the next bid must be in order to be accepted. - * If there is no current bid, the bid must be at least the minimum bid amount. - * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. + * If there is no current bid, the bid must be at least the minimum bid amount. + * If there is a current bid, the bid must be at least the current bid amount + the bid buffer. * @param listingId The id of the listing to retrieve. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuctionsMinimumNextBid( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -result: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -}> { + public getMinimumNextBid( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + result: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-minimum-next-bid', @@ -395,45 +395,45 @@ displayValue: string; * Get winning bid * Get the current highest bid of an active auction. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuctionsWinningBid( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result?: { -/** - * The id of the auction. - */ -auctionId?: string; -/** - * The address of the buyer who made the offer. - */ -bidderAddress?: string; -/** - * The currency contract address of the offer token. - */ -currencyContractAddress?: string; -/** - * The amount of coins offered per token. - */ -bidAmount?: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -bidAmountCurrencyValue?: { -name?: string; -symbol?: string; -decimals?: number; -value?: string; -displayValue?: string; -}; -}; -}> { + public getWinningBid( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result?: { + /** + * The id of the auction. + */ + auctionId?: string; + /** + * The address of the buyer who made the offer. + */ + bidderAddress?: string; + /** + * The currency contract address of the offer token. + */ + currencyContractAddress?: string; + /** + * The amount of coins offered per token. + */ + bidAmount?: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + bidAmountCurrencyValue?: { + name?: string; + symbol?: string; + decimals?: number; + value?: string; + displayValue?: string; + }; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winning-bid', @@ -455,17 +455,17 @@ displayValue?: string; /** * Get total listings * Get the count of English auction listings on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuctionsTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { + public getTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-total-count', @@ -486,19 +486,19 @@ result: string; * Check if a bid is or will be the winning bid for an auction. * @param listingId The ID of the listing to retrieve the winner for. * @param bidAmount The amount of the bid to check if it is the winning bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public isEnglishAuctionsWinningBid( -listingId: string, -bidAmount: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: boolean; -}> { + public isWinningBid( + listingId: string, + bidAmount: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: boolean; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/is-winning-bid', @@ -522,18 +522,18 @@ result: boolean; * Get winner * Get the winner of an English auction. Can only be called after the auction has ended. * @param listingId The ID of the listing to retrieve the winner for. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getEnglishAuctionsWinner( -listingId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { + public getWinner( + listingId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/english-auctions/get-winner', @@ -555,31 +555,31 @@ result: string; /** * Buyout English auction * Buyout the listing for this auction. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public buyoutEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to buy NFT(s) from. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public buyoutAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to buy NFT(s) from. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/buyout-auction', @@ -603,31 +603,31 @@ queueId: string; /** * Cancel English auction * Cancel an existing auction listing. Only the creator of the listing can cancel it. Auctions cannot be canceled once a bid has been made. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public cancelEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to cancel auction. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public cancelAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to cancel auction. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/cancel-auction', @@ -651,67 +651,67 @@ queueId: string; /** * Create English auction * Create an English auction listing on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public createEnglishAuction( -chain: string, -contractAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The start time of the listing. If not set, defaults to now. - */ -startTimestamp?: number; -/** - * The end time of the listing. If not set, defaults to 7 days from now. - */ -endTimestamp?: number; -/** - * amount to buy the NFT and close the listing. - */ -buyoutBidAmount: string; -/** - * Minimum amount that bids must be to placed - */ -minimumBidAmount: string; -/** - * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) - */ -bidBufferBps?: string; -/** - * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) - */ -timeBufferInSeconds?: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public createAuction( + chain: string, + contractAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The start time of the listing. If not set, defaults to now. + */ + startTimestamp?: number; + /** + * The end time of the listing. If not set, defaults to 7 days from now. + */ + endTimestamp?: number; + /** + * amount to buy the NFT and close the listing. + */ + buyoutBidAmount: string; + /** + * Minimum amount that bids must be to placed + */ + minimumBidAmount: string; + /** + * percentage the next bid must be higher than the current highest bid (default is contract-level bid buffer bps) + */ + bidBufferBps?: string; + /** + * time in seconds that are added to the end time when a bid is placed (default is contract-level time buffer in seconds) + */ + timeBufferInSeconds?: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/create-auction', @@ -735,34 +735,34 @@ queueId: string; /** * Close English auction for bidder * After an auction has concluded (and a buyout did not occur), - * execute the sale for the buyer, meaning the buyer receives the NFT(s). - * You must also call closeAuctionForSeller to execute the sale for the seller, - * meaning the seller receives the payment from the highest bid. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * execute the sale for the buyer, meaning the buyer receives the NFT(s). + * You must also call closeAuctionForSeller to execute the sale for the seller, + * meaning the seller receives the payment from the highest bid. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public closeEnglishAuctionForBidder( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public closeAuctionForBidder( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-bidder', @@ -786,33 +786,33 @@ queueId: string; /** * Close English auction for seller * After an auction has concluded (and a buyout did not occur), - * execute the sale for the seller, meaning the seller receives the payment from the highest bid. - * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * execute the sale for the seller, meaning the seller receives the payment from the highest bid. + * You must also call closeAuctionForBidder to execute the sale for the buyer, meaning the buyer receives the NFT(s). + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public closeEnglishAuctionForSeller( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public closeAuctionForSeller( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/close-auction-for-seller', @@ -836,33 +836,33 @@ queueId: string; /** * Execute sale * Close the auction for both buyer and seller. - * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. - * This function can only be called after the auction has ended. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * This means the NFT(s) will be transferred to the buyer and the seller will receive the funds. + * This function can only be called after the auction has ended. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public executeEnglishAuctionSale( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to execute the sale for. - */ -listingId: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public executeSale( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to execute the sale for. + */ + listingId: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/execute-sale', @@ -886,35 +886,35 @@ queueId: string; /** * Make bid * Place a bid on an English auction listing. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @returns any Default Response * @throws ApiError */ - public makeEnglishAuctionBid( -chain: string, -contractAddress: string, -requestBody: { -/** - * The ID of the listing to place a bid on. - */ -listingId: string; -/** - * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. - */ -bidAmount: string; -}, -simulateTx: boolean = false, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public makeBid( + chain: string, + contractAddress: string, + requestBody: { + /** + * The ID of the listing to place a bid on. + */ + listingId: string; + /** + * The amount of the bid to place in the currency of the listing. Use getNextBidAmount to get the minimum amount for the next bid. + */ + bidAmount: string; + }, + simulateTx: boolean = false, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/english-auctions/make-bid', diff --git a/sdk/src/services/MarketplaceOffersService.ts b/sdk/src/services/MarketplaceOffersService.ts index 89e3f71f3..3d25ebf17 100644 --- a/sdk/src/services/MarketplaceOffersService.ts +++ b/sdk/src/services/MarketplaceOffersService.ts @@ -12,72 +12,72 @@ export class MarketplaceOffersService { /** * Get all offers * Get all offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllMarketplaceOffers( -chain: string, -contractAddress: string, -count?: number, -offeror?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { + public getAll( + chain: string, + contractAddress: string, + count?: number, + offeror?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-all', @@ -103,72 +103,72 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); /** * Get all valid offers * Get all valid offers on this marketplace contract. Valid offers are offers that have not expired, been canceled, or been accepted. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param count Number of listings to fetch * @param offeror has offers from this Address - * @param start Start from this index (pagination) + * @param start Satrt from this index (pagination) * @param tokenContract Token contract address to show NFTs from * @param tokenId Only show NFTs with this ID * @returns any Default Response * @throws ApiError */ - public getAllValidMarketplaceOffers( -chain: string, -contractAddress: string, -count?: number, -offeror?: string, -start?: number, -tokenContract?: string, -tokenId?: string, -): CancelablePromise<{ -result: Array<{ -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}>; -}> { + public getAllValid( + chain: string, + contractAddress: string, + count?: number, + offeror?: string, + start?: number, + tokenContract?: string, + tokenId?: string, + ): CancelablePromise<{ + result: Array<{ + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-all-valid', @@ -195,63 +195,63 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); * Get offer * Get details about an offer. * @param offerId The ID of the offer to get information about. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getMarketplaceOffer( -offerId: string, -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * The id of the offer. - */ -id: string; -/** - * The address of the creator of offer. - */ -offerorAddress: string; -/** - * The `CurrencyValue` of the listing. Useful for displaying the price information. - */ -currencyValue?: { -name: string; -symbol: string; -decimals: number; -value: string; -displayValue: string; -}; -/** - * The total offer amount for the NFTs. - */ -totalPrice: string; -asset?: Record; -/** - * The end time of the auction. - */ -endTimeInSeconds?: number; -status?: (0 | 1 | 2 | 3 | 4 | 5); -}; -}> { + public getOffer( + offerId: string, + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * The id of the offer. + */ + id: string; + /** + * The address of the creator of offer. + */ + offerorAddress: string; + /** + * The `CurrencyValue` of the listing. Useful for displaying the price information. + */ + currencyValue?: { + name: string; + symbol: string; + decimals: number; + value: string; + displayValue: string; + }; + /** + * The total offer amount for the NFTs. + */ + totalPrice: string; + asset?: Record; + /** + * The end time of the auction. + */ + endTimeInSeconds?: number; + status?: (0 | 1 | 2 | 3 | 4 | 5); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-offer', @@ -273,17 +273,17 @@ status?: (0 | 1 | 2 | 3 | 4 | 5); /** * Get total count * Get the total number of offers on this marketplace contract. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @returns any Default Response * @throws ApiError */ - public getMarketplaceOffersTotalCount( -chain: string, -contractAddress: string, -): CancelablePromise<{ -result: string; -}> { + public getTotalCount( + chain: string, + contractAddress: string, + ): CancelablePromise<{ + result: string; + }> { return this.httpRequest.request({ method: 'GET', url: '/marketplace/{chain}/{contractAddress}/offers/get-total-count', @@ -302,83 +302,83 @@ result: string; /** * Make offer * Make an offer on a token. A valid listing is not required. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public makeMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The address of the asset being listed. - */ -assetContractAddress: string; -/** - * The ID of the token to list. - */ -tokenId: string; -/** - * The address of the currency to accept for the listing. - */ -currencyContractAddress?: string; -/** - * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). - */ -quantity?: string; -/** - * the price to offer in the currency specified - */ -totalPrice: string; -/** - * Defaults to 10 years from now. - */ -endTimestamp?: number; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public makeOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The address of the asset being listed. + */ + assetContractAddress: string; + /** + * The ID of the token to list. + */ + tokenId: string; + /** + * The address of the currency to accept for the listing. + */ + currencyContractAddress?: string; + /** + * The quantity of tokens to include in the listing. NOTE: For ERC721s, this value should always be 1 (and will be forced internally regardless of what is passed here). + */ + quantity?: string; + /** + * the price to offer in the currency specified + */ + totalPrice: string; + /** + * Defaults to 10 years from now. + */ + endTimestamp?: number; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/make-offer', @@ -409,63 +409,63 @@ queueId: string; /** * Cancel offer * Cancel a valid offer made by the caller wallet. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public cancelMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. - */ -offerId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public cancelOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the offer to cancel. You can view all offers with getAll or getAllValid. + */ + offerId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/cancel-offer', @@ -496,63 +496,63 @@ queueId: string; /** * Accept offer * Accept a valid offer. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param contractAddress Contract address * @param xBackendWalletAddress Backend wallet address - * @param requestBody - * @param simulateTx Simulates the transaction before adding it to the queue, returning an error if it fails simulation. Note: This step is less performant and recommended only for debugging purposes. + * @param requestBody + * @param simulateTx Simulate the transaction on-chain without executing * @param xIdempotencyKey Transactions submitted with the same idempotency key will be de-duplicated. Only the last 100000 transactions are compared. * @param xAccountAddress Smart account address - * @param xAccountFactoryAddress Smart account factory address. If omitted, Engine will try to resolve it from the contract. + * @param xAccountFactoryAddress Smart account factory address. If omitted, engine will try to resolve it from the chain. * @param xAccountSalt Smart account salt as string or hex. This is used to predict the smart account address. Useful when creating multiple accounts with the same admin and only needed when deploying the account as part of a userop. * @returns any Default Response * @throws ApiError */ - public acceptMarketplaceOffer( -chain: string, -contractAddress: string, -xBackendWalletAddress: string, -requestBody: { -/** - * The ID of the offer to accept. You can view all offers with getAll or getAllValid. - */ -offerId: string; -txOverrides?: { -/** - * Gas limit for the transaction - */ -gas?: string; -/** - * Maximum fee per gas - */ -maxFeePerGas?: string; -/** - * Maximum priority fee per gas - */ -maxPriorityFeePerGas?: string; -/** - * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout - */ -timeoutSeconds?: number; -/** - * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. - */ -value?: string; -}; -}, -simulateTx: boolean = false, -xIdempotencyKey?: string, -xAccountAddress?: string, -xAccountFactoryAddress?: string, -xAccountSalt?: string, -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + public acceptOffer( + chain: string, + contractAddress: string, + xBackendWalletAddress: string, + requestBody: { + /** + * The ID of the offer to accept. You can view all offers with getAll or getAllValid. + */ + offerId: string; + txOverrides?: { + /** + * Gas limit for the transaction + */ + gas?: string; + /** + * Maximum fee per gas + */ + maxFeePerGas?: string; + /** + * Maximum priority fee per gas + */ + maxPriorityFeePerGas?: string; + /** + * Maximum duration that a transaction is valid. If a transaction cannot be sent before the timeout, the transaction will be set to 'errored'. Default: no timeout + */ + timeoutSeconds?: number; + /** + * Amount of native currency in wei to send with this transaction. Used to transfer funds or pay a contract. + */ + value?: string; + }; + }, + simulateTx: boolean = false, + xIdempotencyKey?: string, + xAccountAddress?: string, + xAccountFactoryAddress?: string, + xAccountSalt?: string, + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/marketplace/{chain}/{contractAddress}/offers/accept-offer', diff --git a/sdk/src/services/PermissionsService.ts b/sdk/src/services/PermissionsService.ts index dc1348060..9d43621f8 100644 --- a/sdk/src/services/PermissionsService.ts +++ b/sdk/src/services/PermissionsService.ts @@ -15,16 +15,16 @@ export class PermissionsService { * @returns any Default Response * @throws ApiError */ - public listAdmins(): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -walletAddress: string; -permissions: string; -label: (string | null); -}>; -}> { + public getAll(): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + walletAddress: string; + permissions: string; + label: (string | null); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/auth/permissions/get-all', @@ -39,24 +39,24 @@ label: (string | null); /** * Grant permissions to user * Grant permissions to a user - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public grantAdmin( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -permissions: ('ADMIN' | 'OWNER'); -label?: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public grant( + requestBody: { + /** + * A contract or wallet address + */ + walletAddress: string; + permissions: ('ADMIN' | 'OWNER'); + label?: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/permissions/grant', @@ -73,22 +73,22 @@ success: boolean; /** * Revoke permissions from user * Revoke a user's permissions - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public revokeAdmin( -requestBody: { -/** - * A contract or wallet address - */ -walletAddress: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public revoke( + requestBody: { + /** + * A contract or wallet address + */ + walletAddress: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/auth/permissions/revoke', diff --git a/sdk/src/services/RelayerService.ts b/sdk/src/services/RelayerService.ts index 3c91ffe1d..46965f4a4 100644 --- a/sdk/src/services/RelayerService.ts +++ b/sdk/src/services/RelayerService.ts @@ -15,19 +15,19 @@ export class RelayerService { * @returns any Default Response * @throws ApiError */ - public listRelayers(): CancelablePromise<{ -result: Array<{ -id: string; -name: (string | null); -chainId: string; -/** - * A contract or wallet address - */ -backendWalletAddress: string; -allowedContracts: (Array | null); -allowedForwarders: (Array | null); -}>; -}> { + public getAll(): CancelablePromise<{ + result: Array<{ + id: string; + name: (string | null); + chainId: string; + /** + * A contract or wallet address + */ + backendWalletAddress: string; + allowedContracts: (Array | null); + allowedForwarders: (Array | null); + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/relayer/get-all', @@ -42,29 +42,26 @@ allowedForwarders: (Array | null); /** * Create a new meta-transaction relayer * Create a new meta-transaction relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public createRelayer( -requestBody: { -name?: string; -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain: string; -/** - * The address of the backend wallet to use for relaying transactions. - */ -backendWalletAddress: string; -allowedContracts?: Array; -allowedForwarders?: Array; -}, -): CancelablePromise<{ -result: { -relayerId: string; -}; -}> { + public create( + requestBody: { + name?: string; + chain: string; + /** + * The address of the backend wallet to use for relaying transactions. + */ + backendWalletAddress: string; + allowedContracts?: Array; + allowedForwarders?: Array; + }, + ): CancelablePromise<{ + result: { + relayerId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/relayer/create', @@ -81,19 +78,19 @@ relayerId: string; /** * Revoke a relayer * Revoke a relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public revokeRelayer( -requestBody: { -id: string; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public revoke( + requestBody: { + id: string; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/relayer/revoke', @@ -110,30 +107,27 @@ success: boolean; /** * Update a relayer * Update a relayer - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ - public updateRelayer( -requestBody: { -id: string; -name?: string; -/** - * A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - */ -chain?: string; -/** - * A contract or wallet address - */ -backendWalletAddress?: string; -allowedContracts?: Array; -allowedForwarders?: Array; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + public update( + requestBody: { + id: string; + name?: string; + chain?: string; + /** + * A contract or wallet address + */ + backendWalletAddress?: string; + allowedContracts?: Array; + allowedForwarders?: Array; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/relayer/update', @@ -150,57 +144,57 @@ success: boolean; /** * Relay a meta-transaction * Relay an EIP-2771 meta-transaction - * @param relayerId - * @param requestBody + * @param relayerId + * @param requestBody * @returns any Default Response * @throws ApiError */ public relay( -relayerId: string, -requestBody?: ({ -type: 'forward'; -request: { -from: string; -to: string; -value: string; -gas: string; -nonce: string; -data: string; -chainid?: string; -}; -signature: string; -/** - * A contract or wallet address - */ -forwarderAddress: string; -} | { -type: 'permit'; -request: { -to: string; -owner: string; -spender: string; -value: string; -nonce: string; -deadline: string; -}; -signature: string; -} | { -type: 'execute-meta-transaction'; -request: { -from: string; -to: string; -data: string; -}; -signature: string; -}), -): CancelablePromise<{ -result: { -/** - * Queue ID - */ -queueId: string; -}; -}> { + relayerId: string, + requestBody?: ({ + type: 'forward'; + request: { + from: string; + to: string; + value: string; + gas: string; + nonce: string; + data: string; + chainid?: string; + }; + signature: string; + /** + * A contract or wallet address + */ + forwarderAddress: string; + } | { + type: 'permit'; + request: { + to: string; + owner: string; + spender: string; + value: string; + nonce: string; + deadline: string; + }; + signature: string; + } | { + type: 'execute-meta-transaction'; + request: { + from: string; + to: string; + data: string; + }; + signature: string; + }), + ): CancelablePromise<{ + result: { + /** + * Queue ID + */ + queueId: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/relayer/{relayerId}', diff --git a/sdk/src/services/TransactionService.ts b/sdk/src/services/TransactionService.ts index f9aede094..863cd47c5 100644 --- a/sdk/src/services/TransactionService.ts +++ b/sdk/src/services/TransactionService.ts @@ -18,70 +18,70 @@ export class TransactionService { * @returns any Default Response * @throws ApiError */ - public listTransactions( -status: ('queued' | 'mined' | 'cancelled' | 'errored'), -page: number = 1, -limit: number = 100, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -totalCount: number; -}; -}> { + public getAll( + status: ('queued' | 'mined' | 'cancelled' | 'errored'), + page: number = 1, + limit: number = 100, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: (string | null); + /** + * The current state of the transaction. + */ + status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); + chainId: (string | null); + fromAddress: (string | null); + toAddress: (string | null); + data: (string | null); + extension: (string | null); + value: (string | null); + nonce: (number | string | null); + gasLimit: (string | null); + gasPrice: (string | null); + maxFeePerGas: (string | null); + maxPriorityFeePerGas: (string | null); + transactionType: (number | null); + transactionHash: (string | null); + queuedAt: (string | null); + sentAt: (string | null); + minedAt: (string | null); + cancelledAt: (string | null); + deployedContractAddress: (string | null); + deployedContractType: (string | null); + errorMessage: (string | null); + sentAtBlockNumber: (number | null); + blockNumber: (number | null); + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: (boolean | null); + retryMaxFeePerGas: (string | null); + retryMaxPriorityFeePerGas: (string | null); + signerAddress: (string | null); + accountAddress: (string | null); + accountSalt: (string | null); + accountFactoryAddress: (string | null); + target: (string | null); + sender: (string | null); + initCode: (string | null); + callData: (string | null); + callGasLimit: (string | null); + verificationGasLimit: (string | null); + preVerificationGas: (string | null); + paymasterAndData: (string | null); + userOpHash: (string | null); + functionName: (string | null); + functionArgs: (string | null); + onChainTxStatus: (number | null); + onchainStatus: ('success' | 'reverted' | null); + effectiveGasPrice: (string | null); + cumulativeGasUsed: (string | null); + }>; + totalCount: number; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/get-all', @@ -106,64 +106,64 @@ totalCount: number; * @throws ApiError */ public status( -queueId: string, -): CancelablePromise<{ -result: { -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}; -}> { + queueId: string, + ): CancelablePromise<{ + result: { + queueId: (string | null); + /** + * The current state of the transaction. + */ + status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); + chainId: (string | null); + fromAddress: (string | null); + toAddress: (string | null); + data: (string | null); + extension: (string | null); + value: (string | null); + nonce: (number | string | null); + gasLimit: (string | null); + gasPrice: (string | null); + maxFeePerGas: (string | null); + maxPriorityFeePerGas: (string | null); + transactionType: (number | null); + transactionHash: (string | null); + queuedAt: (string | null); + sentAt: (string | null); + minedAt: (string | null); + cancelledAt: (string | null); + deployedContractAddress: (string | null); + deployedContractType: (string | null); + errorMessage: (string | null); + sentAtBlockNumber: (number | null); + blockNumber: (number | null); + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: (boolean | null); + retryMaxFeePerGas: (string | null); + retryMaxPriorityFeePerGas: (string | null); + signerAddress: (string | null); + accountAddress: (string | null); + accountSalt: (string | null); + accountFactoryAddress: (string | null); + target: (string | null); + sender: (string | null); + initCode: (string | null); + callData: (string | null); + callGasLimit: (string | null); + verificationGasLimit: (string | null); + preVerificationGas: (string | null); + paymasterAndData: (string | null); + userOpHash: (string | null); + functionName: (string | null); + functionArgs: (string | null); + onChainTxStatus: (number | null); + onchainStatus: ('success' | 'reverted' | null); + effectiveGasPrice: (string | null); + cumulativeGasUsed: (string | null); + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/status/{queueId}', @@ -187,68 +187,68 @@ cumulativeGasUsed: (string | null); * @throws ApiError */ public getAllDeployedContracts( -page: number = 1, -limit: number = 10, -): CancelablePromise<{ -result: { -transactions: Array<{ -queueId: (string | null); -/** - * The current state of the transaction. - */ -status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); -chainId: (string | null); -fromAddress: (string | null); -toAddress: (string | null); -data: (string | null); -extension: (string | null); -value: (string | null); -nonce: (number | string | null); -gasLimit: (string | null); -gasPrice: (string | null); -maxFeePerGas: (string | null); -maxPriorityFeePerGas: (string | null); -transactionType: (number | null); -transactionHash: (string | null); -queuedAt: (string | null); -sentAt: (string | null); -minedAt: (string | null); -cancelledAt: (string | null); -deployedContractAddress: (string | null); -deployedContractType: (string | null); -errorMessage: (string | null); -sentAtBlockNumber: (number | null); -blockNumber: (number | null); -/** - * The number of retry attempts - */ -retryCount: number; -retryGasValues: (boolean | null); -retryMaxFeePerGas: (string | null); -retryMaxPriorityFeePerGas: (string | null); -signerAddress: (string | null); -accountAddress: (string | null); -accountSalt: (string | null); -accountFactoryAddress: (string | null); -target: (string | null); -sender: (string | null); -initCode: (string | null); -callData: (string | null); -callGasLimit: (string | null); -verificationGasLimit: (string | null); -preVerificationGas: (string | null); -paymasterAndData: (string | null); -userOpHash: (string | null); -functionName: (string | null); -functionArgs: (string | null); -onChainTxStatus: (number | null); -onchainStatus: ('success' | 'reverted' | null); -effectiveGasPrice: (string | null); -cumulativeGasUsed: (string | null); -}>; -totalCount: number; -}; -}> { + page: number = 1, + limit: number = 10, + ): CancelablePromise<{ + result: { + transactions: Array<{ + queueId: (string | null); + /** + * The current state of the transaction. + */ + status: ('queued' | 'sent' | 'mined' | 'errored' | 'cancelled'); + chainId: (string | null); + fromAddress: (string | null); + toAddress: (string | null); + data: (string | null); + extension: (string | null); + value: (string | null); + nonce: (number | string | null); + gasLimit: (string | null); + gasPrice: (string | null); + maxFeePerGas: (string | null); + maxPriorityFeePerGas: (string | null); + transactionType: (number | null); + transactionHash: (string | null); + queuedAt: (string | null); + sentAt: (string | null); + minedAt: (string | null); + cancelledAt: (string | null); + deployedContractAddress: (string | null); + deployedContractType: (string | null); + errorMessage: (string | null); + sentAtBlockNumber: (number | null); + blockNumber: (number | null); + /** + * The number of retry attempts + */ + retryCount: number; + retryGasValues: (boolean | null); + retryMaxFeePerGas: (string | null); + retryMaxPriorityFeePerGas: (string | null); + signerAddress: (string | null); + accountAddress: (string | null); + accountSalt: (string | null); + accountFactoryAddress: (string | null); + target: (string | null); + sender: (string | null); + initCode: (string | null); + callData: (string | null); + callGasLimit: (string | null); + verificationGasLimit: (string | null); + preVerificationGas: (string | null); + paymasterAndData: (string | null); + userOpHash: (string | null); + functionName: (string | null); + functionArgs: (string | null); + onChainTxStatus: (number | null); + onchainStatus: ('success' | 'reverted' | null); + effectiveGasPrice: (string | null); + cumulativeGasUsed: (string | null); + }>; + totalCount: number; + }; + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/get-all-deployed-contracts', @@ -267,27 +267,27 @@ totalCount: number; /** * Retry transaction (synchronous) * Retry a transaction with updated gas settings. Blocks until the transaction is mined or errors. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public syncRetry( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -maxFeePerGas?: string; -maxPriorityFeePerGas?: string; -}, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -}; -}> { + requestBody: { + /** + * Transaction queue ID + */ + queueId: string; + maxFeePerGas?: string; + maxPriorityFeePerGas?: string; + }, + ): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/transaction/sync-retry', @@ -304,23 +304,23 @@ transactionHash: string; /** * Retry failed transaction * Retry a failed transaction - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public retryFailed( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -}, -): CancelablePromise<{ -result: { -message: string; -status: string; -}; -}> { + requestBody: { + /** + * Transaction queue ID + */ + queueId: string; + }, + ): CancelablePromise<{ + result: { + message: string; + status: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/transaction/retry-failed', @@ -337,37 +337,37 @@ status: string; /** * Cancel transaction * Attempt to cancel a transaction by sending a null transaction with a higher gas setting. This transaction is not guaranteed to be cancelled. - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public cancel( -requestBody: { -/** - * Transaction queue ID - */ -queueId: string; -}, -): CancelablePromise<{ -result: { -/** - * Transaction queue ID - */ -queueId: string; -/** - * Response status - */ -status: string; -/** - * Response message - */ -message: string; -/** - * A transaction hash - */ -transactionHash?: string; -}; -}> { + requestBody: { + /** + * Transaction queue ID + */ + queueId: string; + }, + ): CancelablePromise<{ + result: { + /** + * Transaction queue ID + */ + queueId: string; + /** + * Response status + */ + status: string; + /** + * Response message + */ + message: string; + /** + * A transaction hash + */ + transactionHash?: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/transaction/cancel', @@ -384,24 +384,24 @@ transactionHash?: string; /** * Send a signed transaction * Send a signed transaction - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody + * @param chain Chain ID + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendRawTransaction( -chain: string, -requestBody: { -signedTransaction: string; -}, -): CancelablePromise<{ -result: { -/** - * A transaction hash - */ -transactionHash: string; -}; -}> { + chain: string, + requestBody: { + signedTransaction: string; + }, + ): CancelablePromise<{ + result: { + /** + * A transaction hash + */ + transactionHash: string; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/transaction/{chain}/send-signed-transaction', @@ -421,28 +421,28 @@ transactionHash: string; /** * Send a signed user operation * Send a signed user operation - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. - * @param requestBody + * @param chain Chain ID + * @param requestBody * @returns any Default Response * @throws ApiError */ public sendSignedUserOp( -chain: string, -requestBody: { -signedUserOp: any; -}, -): CancelablePromise<({ -result: { -/** - * A transaction hash - */ -userOpHash: string; -}; -} | { -error: { -message: string; -}; -})> { + chain: string, + requestBody: { + signedUserOp: any; + }, + ): CancelablePromise<({ + result: { + /** + * A transaction hash + */ + userOpHash: string; + }; + } | { + error: { + message: string; + }; + })> { return this.httpRequest.request({ method: 'POST', url: '/transaction/{chain}/send-signed-user-op', @@ -462,44 +462,44 @@ message: string; /** * Get transaction receipt * Get the transaction receipt from a transaction hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param transactionHash Transaction hash + * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public getTransactionReceipt( -chain: string, -transactionHash: string, -): CancelablePromise<{ -result: ({ -to?: string; -from?: string; -contractAddress?: (string | null); -transactionIndex?: number; -root?: string; -gasUsed?: string; -logsBloom?: string; -blockHash?: string; -/** - * A transaction hash - */ -transactionHash?: string; -logs?: Array; -blockNumber?: number; -confirmations?: number; -cumulativeGasUsed?: string; -effectiveGasPrice?: string; -byzantium?: boolean; -type?: number; -status?: number; -} | null); -}> { + transactionHash: string, + chain: string, + ): CancelablePromise<{ + result: ({ + to?: string; + from?: string; + contractAddress?: (string | null); + transactionIndex?: number; + root?: string; + gasUsed?: string; + logsBloom?: string; + blockHash?: string; + /** + * A transaction hash + */ + transactionHash?: string; + logs?: Array; + blockNumber?: number; + confirmations?: number; + cumulativeGasUsed?: string; + effectiveGasPrice?: string; + byzantium?: boolean; + type?: number; + status?: number; + } | null); + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/{chain}/tx-hash/{transactionHash}', path: { - 'chain': chain, 'transactionHash': transactionHash, + 'chain': chain, }, errors: { 400: `Bad Request`, @@ -512,23 +512,23 @@ status?: number; /** * Get transaction receipt from user-op hash * Get the transaction receipt from a user-op hash. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. * @param userOpHash User operation hash + * @param chain Chain ID or name * @returns any Default Response * @throws ApiError */ public useropHashReceipt( -chain: string, -userOpHash: string, -): CancelablePromise<{ -result: any; -}> { + userOpHash: string, + chain: string, + ): CancelablePromise<{ + result: any; + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/{chain}/userop-hash/{userOpHash}', path: { - 'chain': chain, 'userOpHash': userOpHash, + 'chain': chain, }, errors: { 400: `Bad Request`, @@ -541,7 +541,7 @@ result: any; /** * Get transaction logs * Get transaction logs for a mined transaction. A tranasction queue ID or hash must be provided. Set `parseLogs` to parse the event logs. - * @param chain A chain ID ("137") or slug ("polygon-amoy-testnet"). Chain ID is preferred. + * @param chain Chain ID or name * @param queueId The queue ID for a mined transaction. * @param transactionHash The transaction hash for a mined transaction. * @param parseLogs If true, parse the raw logs as events defined in the contract ABI. (Default: true) @@ -549,37 +549,37 @@ result: any; * @throws ApiError */ public getTransactionLogs( -chain: string, -queueId?: string, -transactionHash?: string, -parseLogs?: boolean, -): CancelablePromise<{ -result: Array<{ -/** - * A contract or wallet address - */ -address: string; -topics: Array; -data: string; -blockNumber: string; -/** - * A transaction hash - */ -transactionHash: string; -transactionIndex: number; -blockHash: string; -logIndex: number; -removed: boolean; -/** - * Event name, only returned when `parseLogs` is true - */ -eventName?: string; -/** - * Event arguments. Only returned when `parseLogs` is true - */ -args?: any; -}>; -}> { + chain: string, + queueId?: string, + transactionHash?: string, + parseLogs?: boolean, + ): CancelablePromise<{ + result: Array<{ + /** + * A contract or wallet address + */ + address: string; + topics: Array; + data: string; + blockNumber: string; + /** + * A transaction hash + */ + transactionHash: string; + transactionIndex: number; + blockHash: string; + logIndex: number; + removed: boolean; + /** + * Event name, only returned when `parseLogs` is true + */ + eventName?: string; + /** + * Event arguments. Only returned when `parseLogs` is true + */ + args?: any; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/transaction/logs', diff --git a/sdk/src/services/WebhooksService.ts b/sdk/src/services/WebhooksService.ts index eb025cee8..9411e4e44 100644 --- a/sdk/src/services/WebhooksService.ts +++ b/sdk/src/services/WebhooksService.ts @@ -15,17 +15,17 @@ export class WebhooksService { * @returns any Default Response * @throws ApiError */ - public listWebhooks(): CancelablePromise<{ -result: Array<{ -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}>; -}> { + public getAll(): CancelablePromise<{ + result: Array<{ + url: string; + name: (string | null); + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + id: number; + }>; + }> { return this.httpRequest.request({ method: 'GET', url: '/webhooks/get-all', @@ -39,31 +39,31 @@ createdAt: string; /** * Create a webhook - * Create a webhook to call when a specific Engine event occurs. - * @param requestBody + * Create a webhook to call when certain blockchain events occur. + * @param requestBody * @returns any Default Response * @throws ApiError */ - public createWebhook( -requestBody: { -/** - * Webhook URL. Non-HTTPS URLs are not supported. - */ -url: string; -name?: string; -eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); -}, -): CancelablePromise<{ -result: { -id: number; -url: string; -name: (string | null); -secret?: string; -eventType: string; -active: boolean; -createdAt: string; -}; -}> { + public create( + requestBody: { + /** + * Webhook URL + */ + url: string; + name?: string; + eventType: ('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription'); + }, + ): CancelablePromise<{ + result: { + url: string; + name: (string | null); + secret?: string; + eventType: string; + active: boolean; + createdAt: string; + id: number; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/webhooks/create', @@ -80,19 +80,19 @@ createdAt: string; /** * Revoke webhook * Revoke a Webhook - * @param requestBody + * @param requestBody * @returns any Default Response * @throws ApiError */ public revoke( -requestBody: { -id: number; -}, -): CancelablePromise<{ -result: { -success: boolean; -}; -}> { + requestBody: { + id: number; + }, + ): CancelablePromise<{ + result: { + success: boolean; + }; + }> { return this.httpRequest.request({ method: 'POST', url: '/webhooks/revoke', @@ -113,8 +113,8 @@ success: boolean; * @throws ApiError */ public getEventTypes(): CancelablePromise<{ -result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; -}> { + result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | 'errored_transaction' | 'cancelled_transaction' | 'all_transactions' | 'backend_wallet_balance' | 'auth' | 'contract_subscription')>; + }> { return this.httpRequest.request({ method: 'GET', url: '/webhooks/event-types', @@ -126,34 +126,4 @@ result: Array<('queued_transaction' | 'sent_transaction' | 'mined_transaction' | }); } - /** - * Test webhook - * Send a test payload to a webhook. - * @param webhookId - * @returns any Default Response - * @throws ApiError - */ - public testWebhook( -webhookId: string, -): CancelablePromise<{ -result: { -ok: boolean; -status: number; -body: string; -}; -}> { - return this.httpRequest.request({ - method: 'POST', - url: '/webhooks/{webhookId}/test', - path: { - 'webhookId': webhookId, - }, - errors: { - 400: `Bad Request`, - 404: `Not Found`, - 500: `Internal Server Error`, - }, - }); - } - }