From 3dff9ed4d09be9e71c38a280de0a665fc7716fe5 Mon Sep 17 00:00:00 2001 From: Allan Almeida <152931211+allan-almeida-imtbl@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:11:48 +1000 Subject: [PATCH] chore: Update blockchainData package (#2222) --- .../sdk/src/blockchain-data.ts | 24 +- packages/internal/generated-clients/Makefile | 27 +- .../src/blockchain-data-openapi.json | 4595 +++++++++++++++++ .../blockchain-data/.openapi-generator/FILES | 29 +- .../src/blockchain-data/api.ts | 4 + .../blockchain-data/domain/crafting-api.ts | 66 + .../models/{apierror501-all-of.ts => call.ts} | 33 +- .../src/blockchain-data/models/index.ts | 7 +- .../src/blockchain-data/models/nft.ts | 9 +- .../src/blockchain-data/models/nftowner.ts | 7 - .../blockchain-data/models/nftwith-owner.ts | 7 - .../sign-crafting-request-multi-caller.ts | 42 + .../models/sign-crafting-request.ts | 54 + ...rder-status.ts => sign-crafting-result.ts} | 25 +- .../generated-clients/src/mr-openapi.json | 320 +- .../src/multi-rollup/.openapi-generator/FILES | 8 + .../generated-clients/src/multi-rollup/api.ts | 1 + .../src/multi-rollup/domain/crafting-api.ts | 172 + .../src/multi-rollup/models/call.ts | 42 + .../models/highest-severity.ts} | 24 +- .../src/multi-rollup/models/index.ts | 7 + .../src/multi-rollup/models/nftowner.ts | 7 - .../src/multi-rollup/models/nftwith-owner.ts | 7 - .../models/seaport-advanced-order-buy.ts | 8 +- .../seaport-create-listing-metadata-buy.ts | 8 +- .../models/seaport-erc1155-collection-item.ts | 64 + .../models/seaport-erc1155-item.ts | 2 +- .../models/seaport-erc721-collection-item.ts | 64 + .../sign-crafting-request-multi-caller.ts | 42 + .../models/sign-crafting-request.ts | 54 + .../models/sign-crafting-result.ts | 36 + .../multi-rollup/models/validation-result.ts | 2 +- .../models/validation-success-results.ts | 6 +- .../NFTTransfer.tsx | 12 +- 34 files changed, 5689 insertions(+), 126 deletions(-) create mode 100644 packages/internal/generated-clients/src/blockchain-data-openapi.json create mode 100644 packages/internal/generated-clients/src/blockchain-data/domain/crafting-api.ts rename packages/internal/generated-clients/src/blockchain-data/models/{apierror501-all-of.ts => call.ts} (50%) create mode 100644 packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request-multi-caller.ts create mode 100644 packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request.ts rename packages/internal/generated-clients/src/blockchain-data/models/{active-order-status.ts => sign-crafting-result.ts} (56%) create mode 100644 packages/internal/generated-clients/src/multi-rollup/domain/crafting-api.ts create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/call.ts rename packages/internal/generated-clients/src/{blockchain-data/models/apierror501.ts => multi-rollup/models/highest-severity.ts} (55%) create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-collection-item.ts create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/seaport-erc721-collection-item.ts create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request-multi-caller.ts create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request.ts create mode 100644 packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-result.ts diff --git a/packages/blockchain-data/sdk/src/blockchain-data.ts b/packages/blockchain-data/sdk/src/blockchain-data.ts index 1c7e1bfb54..f22f44f58f 100644 --- a/packages/blockchain-data/sdk/src/blockchain-data.ts +++ b/packages/blockchain-data/sdk/src/blockchain-data.ts @@ -22,6 +22,8 @@ export class BlockchainData { private readonly metadata: mr.MetadataApi; + private readonly crafting: mr.CraftingApi; + constructor(moduleConfig: BlockchainDataModuleConfiguration) { this.config = new BlockchainDataConfiguration(moduleConfig); @@ -32,6 +34,7 @@ export class BlockchainData { this.nftOwners = new mr.NftOwnersApi(this.config.apiConfig); this.tokens = new mr.TokensApi(this.config.apiConfig); this.metadata = new mr.MetadataApi(this.config.apiConfig); + this.crafting = new mr.CraftingApi(this.config.apiConfig); } /** @@ -195,13 +198,13 @@ export class BlockchainData { */ public async listNFTsByAccountAddress( request: Types.ListNFTsByAccountAddressRequestParams, - ): Promise { + ): Promise { return (await this.nfts .listNFTsByAccountAddress(request) .then((res) => res.data) .catch((err) => { throw formatError(err); - })) as Types.ListNFTsResult; + })) as Types.ListNFTsByOwnerResult; } /** @@ -458,4 +461,21 @@ export class BlockchainData { throw formatError(err); })) as Types.MetadataRefreshRateLimitResult; } + + /** + * Sign a crafting payload + * @param request - the request object containing the parameters to be provided in the API request + * @returns a promise that resolves with the signature result + * @throws {@link index.APIError} + */ + public async signCraftingPayload( + request: Types.SignCraftingPayloadRequestParams, + ): Promise { + return (await this.crafting + .signCraftingPayload(request) + .then((res) => res.data) + .catch((err) => { + throw formatError(err); + })) as Types.SignCraftingResult; + } } diff --git a/packages/internal/generated-clients/Makefile b/packages/internal/generated-clients/Makefile index 56d7bd61a7..9d780d0348 100644 --- a/packages/internal/generated-clients/Makefile +++ b/packages/internal/generated-clients/Makefile @@ -1,3 +1,7 @@ +# ------------------------------------------------- +# Combined clients +# ------------------------------------------------- + .PHONY: generate-imx-openapi generate-imx-openapi: get-imx-openapi generate-imx-api-client @@ -42,15 +46,34 @@ generate-mr-api-client: -o /app/src/multi-rollup \ -c /app/config/mr.config.json -# When running this command, ensure files not relevant to blockchain data are manually removed +# ------------------------------------------------- +# Seperate clients +# ------------------------------------------------- + +.PHONY: generate-blockchain-data +generate-blockchain-data: get-blockchain-data-openapi generate-blockchain-data-client + +.PHONY: get-blockchain-data-openapi +get-blockchain-data-openapi: + rimraf src/blockchain-data-openapi.json && touch src/blockchain-data-openapi.json && \ + curl -H "Accept: application/json+v3" \ + https://imtbl-sdk.s3.us-east-2.amazonaws.com/openapi/indexer-mr-oas.json \ + -o src/blockchain-data-openapi.json + +# TODO +.PHONY: generate-blockchain-data-client +generate-blockchain-data-client: + +# TODO remove once combined with API functions in above command .PHONY: generate-blockchain-data-types generate-blockchain-data-types: rimraf src/blockchain-data && \ mkdir src/blockchain-data && \ docker run --rm -v $(shell pwd):/app openapitools/openapi-generator-cli:v7.0.1 generate \ --inline-schema-options REFACTOR_ALLOF_INLINE_SCHEMAS=true \ - -i ./app/src/mr-openapi.json \ + -i ./app/src/blockchain-data-openapi.json \ -g typescript-axios \ -o /app/src/blockchain-data \ -c /app/config/blockchain-data.config.json \ --additional-properties=stringEnums=true + diff --git a/packages/internal/generated-clients/src/blockchain-data-openapi.json b/packages/internal/generated-clients/src/blockchain-data-openapi.json new file mode 100644 index 0000000000..85d4fd2844 --- /dev/null +++ b/packages/internal/generated-clients/src/blockchain-data-openapi.json @@ -0,0 +1,4595 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Immutable zkEVM API", + "version": "1.0.0", + "description": "Immutable Multi Rollup API", + "contact": { + "name": "Immutable API Support", + "email": "support@immutable.com", + "url": "https://support.immutable.com" + } + }, + "servers": [ + { + "url": "https://api.sandbox.immutable.com" + } + ], + "tags": [ + { + "name": "activities", + "description": "Activities Endpoints" + }, + { + "name": "chains", + "description": "Chains Endpoints" + }, + { + "name": "collections", + "description": "Collections Endpoints" + }, + { + "name": "nfts", + "description": "NFTs Endpoints" + }, + { + "name": "nft owners", + "description": "NFT Owner Endpoints" + }, + { + "name": "metadata", + "description": "NFT Metadata Endpoints" + }, + { + "name": "tokens", + "description": "ERC20 Token Endpoints" + }, + { + "name": "demopage", + "description": "Temporary HTML endpoint for demo purposes" + } + ], + "paths": { + "/v1/chains/{chain_name}/activity-history": { + "get": { + "tags": [ + "activities" + ], + "operationId": "ListActivityHistory", + "summary": "List history of activities", + "description": "List activities sorted by updated_at timestamp ascending, useful for time based data replication", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "in": "path", + "required": true, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "From indexed at including given date", + "required": true, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "to_updated_at", + "in": "query", + "required": false, + "description": "To indexed at including given date", + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "contract_address", + "in": "query", + "description": "The contract address of the collection", + "required": false, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "activity_type", + "in": "query", + "description": "The activity type", + "required": false, + "example": "burn", + "schema": { + "$ref": "#/components/schemas/ActivityType" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListActivitiesResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/activities": { + "get": { + "tags": [ + "activities" + ], + "operationId": "ListActivities", + "summary": "List all activities", + "description": "List all activities", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "in": "path", + "required": true, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "query", + "description": "The contract address of NFT or ERC20 Token", + "required": false, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "token_id", + "in": "query", + "description": "An `uint256` token id as string", + "required": false, + "schema": { + "type": "string" + }, + "example": "1" + }, + { + "name": "account_address", + "in": "query", + "required": false, + "schema": { + "type": "string" + }, + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3", + "description": "The account address activity contains" + }, + { + "name": "activity_type", + "in": "query", + "description": "The activity type", + "required": false, + "example": "burn", + "schema": { + "$ref": "#/components/schemas/ActivityType" + } + }, + { + "name": "transaction_hash", + "in": "query", + "description": "The transaction hash of activity", + "required": false, + "schema": { + "type": "string" + }, + "example": "0x68d9eac5e3b3c3580404989a4030c948a78e1b07b2b5ea5688d8c38a6c61c93e" + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListActivitiesResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/activities/{activity_id}": { + "get": { + "tags": [ + "activities" + ], + "operationId": "GetActivity", + "summary": "Get a single activity by ID", + "description": "Get a single activity by ID", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "in": "path", + "required": true, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "activity_id", + "description": "The id of activity", + "schema": { + "$ref": "#/components/schemas/ActivityID" + }, + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetActivityResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections": { + "get": { + "description": "List all collections", + "tags": [ + "collections" + ], + "operationId": "ListCollections", + "summary": "List all collections", + "parameters": [ + { + "name": "chain_name", + "in": "path", + "description": "The name of chain", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "query", + "required": false, + "description": "List of contract addresses to filter by", + "schema": { + "type": "array", + "items": { + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + } + } + }, + { + "name": "verification_status", + "in": "query", + "required": false, + "description": "List of verification status to filter by", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetVerificationStatus" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCollectionsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}": { + "get": { + "description": "Get collection by contract address", + "tags": [ + "collections" + ], + "operationId": "GetCollection", + "summary": "Get collection by contract address", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetCollectionResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/refresh-metadata": { + "post": { + "description": "Refresh collection metadata", + "summary": "Refresh collection metadata", + "tags": [ + "collections" + ], + "operationId": "RefreshCollectionMetadata", + "security": [ + { + "ImmutableApiKey": [ + "refresh:metadata" + ] + }, + { + "BearerAuth": [ + "refresh:metadata" + ] + } + ], + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "requestBody": { + "description": "The request body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshCollectionMetadataRequest" + } + } + } + }, + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshCollectionMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/accounts/{account_address}/collections": { + "get": { + "description": "List collections by NFT owner account address", + "tags": [ + "collections" + ], + "operationId": "ListCollectionsByNFTOwner", + "summary": "List collections by NFT owner", + "parameters": [ + { + "name": "account_address", + "in": "path", + "description": "Account address", + "required": true, + "schema": { + "type": "string" + }, + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCollectionsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}": { + "get": { + "description": "Get NFT by token ID", + "tags": [ + "nfts" + ], + "summary": "Get NFT by token ID", + "operationId": "GetNFT", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The address of NFT contract", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "token_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "An `uint256` token id as string", + "example": "1" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetNFTResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/metadata/{metadata_id}": { + "get": { + "description": "Get metadata by ID", + "tags": [ + "metadata" + ], + "summary": "Get metadata by ID", + "operationId": "GetMetadata", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The address of metadata contract", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "metadata_id", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/MetadataID" + }, + "description": "The id of the metadata" + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/metadata": { + "get": { + "description": "Get a list of metadata from the given contract", + "tags": [ + "metadata" + ], + "summary": "Get a list of metadata from the given contract", + "operationId": "ListMetadata", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The address of metadata contract", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/metadata": { + "get": { + "description": "Get a list of metadata from the given chain", + "tags": [ + "metadata" + ], + "summary": "Get a list of metadata from the given chain", + "operationId": "ListMetadataForChain", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMetadataResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/metadata/refresh-metadata": { + "post": { + "x-go-name": "RefreshMetadataByID", + "operationId": "RefreshMetadataByID", + "description": "Refresh stacked metadata", + "summary": "Refresh stacked metadata", + "tags": [ + "metadata" + ], + "parameters": [ + { + "$ref": "#/components/parameters/ChainName" + }, + { + "$ref": "#/components/parameters/ContractAddress" + } + ], + "security": [ + { + "ImmutableApiKey": [ + "refresh:metadata" + ] + } + ], + "requestBody": { + "description": "NFT Metadata Refresh Request", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshMetadataByIDRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Accepted", + "headers": { + "imx-refreshes-limit": { + "$ref": "#/components/headers/MetadataRefreshLimit" + }, + "imx-refresh-limit-reset": { + "$ref": "#/components/headers/MetadataRefreshLimitReset" + }, + "imx-remaining-refreshes": { + "$ref": "#/components/headers/MetadataRefreshLimitRemaining" + }, + "retry-after": { + "$ref": "#/components/headers/MetadataRefreshRetryAfter" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetadataRefreshRateLimitResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/TooManyMetadataRefreshes" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts": { + "get": { + "description": "List NFTs by contract address", + "tags": [ + "nfts" + ], + "summary": "List NFTs by contract address", + "operationId": "ListNFTs", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "required": true, + "description": "Contract address", + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "token_id", + "in": "query", + "required": false, + "description": "List of token IDs to filter by", + "schema": { + "type": "array", + "maxItems": 30, + "items": { + "type": "string", + "example": "1" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListNFTsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/accounts/{account_address}/nfts": { + "get": { + "description": "List NFTs by account address", + "tags": [ + "nfts" + ], + "operationId": "ListNFTsByAccountAddress", + "summary": "List NFTs by account address", + "parameters": [ + { + "name": "account_address", + "in": "path", + "description": "Account address", + "required": true, + "schema": { + "type": "string" + }, + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "contract_address", + "in": "query", + "description": "The address of contract", + "required": false, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "token_id", + "in": "query", + "required": false, + "description": "List of token IDs to filter by", + "schema": { + "type": "array", + "maxItems": 30, + "items": { + "type": "string", + "example": "1" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListNFTsByOwnerResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}/owners": { + "get": { + "description": "List NFT owners by token ID", + "tags": [ + "nft owners" + ], + "operationId": "ListNFTOwners", + "summary": "List NFT owners by token ID", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "token_id", + "in": "path", + "description": "An `uint256` token id as string", + "required": true, + "schema": { + "type": "string" + }, + "example": "1" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListNFTOwnersResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/nfts": { + "get": { + "description": "List all NFTs on a chain", + "tags": [ + "nfts" + ], + "operationId": "ListAllNFTs", + "summary": "List all NFTs", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListNFTsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/nft-owners": { + "get": { + "description": "List all NFT owners on a chain", + "tags": [ + "nft owners" + ], + "operationId": "ListAllNFTOwners", + "summary": "List all NFT owners", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListNFTOwnersResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/owners": { + "get": { + "description": "List owners by contract address", + "tags": [ + "nft owners" + ], + "operationId": "ListOwnersByContractAddress", + "summary": "List owners by contract address", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + { + "name": "account_address", + "in": "query", + "required": false, + "description": "List of account addresses to filter by", + "schema": { + "type": "array", + "maxItems": 30, + "items": { + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + } + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListCollectionOwnersResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/tokens": { + "get": { + "description": "List ERC20 tokens", + "tags": [ + "tokens" + ], + "operationId": "ListERC20Tokens", + "summary": "List ERC20 tokens", + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + }, + { + "name": "from_updated_at", + "in": "query", + "description": "Datetime to use as the oldest updated timestamp", + "required": false, + "schema": { + "type": "string", + "example": "2022-08-16T17:43:26.991388Z", + "format": "date-time" + } + }, + { + "name": "verification_status", + "in": "query", + "required": false, + "description": "List of verification status to filter by", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AssetVerificationStatus" + } + } + }, + { + "name": "is_canonical", + "in": "query", + "required": false, + "description": "[Experimental - Canonical token data may be updated] Filter by canonical or non-canonical tokens.", + "schema": { + "type": "boolean" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListTokensResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/tokens/{contract_address}": { + "get": { + "description": "Get single ERC20 token", + "tags": [ + "tokens" + ], + "operationId": "GetERC20Token", + "summary": "Get single ERC20 token", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTokenResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains": { + "get": { + "description": "List supported chains", + "summary": "List supported chains", + "tags": [ + "chains" + ], + "operationId": "ListChains", + "parameters": [ + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListChainsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts/refresh-metadata": { + "post": { + "description": "Refresh NFT metadata", + "summary": "Refresh NFT metadata", + "tags": [ + "metadata" + ], + "operationId": "RefreshNFTMetadataByTokenID", + "security": [ + { + "ImmutableApiKey": [ + "refresh:metadata" + ] + } + ], + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + } + ], + "requestBody": { + "description": "the request body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshNFTMetadataByTokenIDRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Accepted", + "headers": { + "imx-refreshes-limit": { + "$ref": "#/components/headers/MetadataRefreshLimit" + }, + "imx-refresh-limit-reset": { + "$ref": "#/components/headers/MetadataRefreshLimitReset" + }, + "imx-remaining-refreshes": { + "$ref": "#/components/headers/MetadataRefreshLimitRemaining" + }, + "retry-after": { + "$ref": "#/components/headers/MetadataRefreshRetryAfter" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetadataRefreshRateLimitResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/TooManyMetadataRefreshes" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests": { + "post": { + "description": "Create a mint request to mint a set of NFTs for a given collection", + "summary": "Mint NFTs", + "security": [ + { + "ImmutableApiKey": [ + "write:mint-request" + ] + } + ], + "tags": [ + "nfts" + ], + "operationId": "CreateMintRequest", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + } + ], + "requestBody": { + "description": "Create Mint Request Body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMintRequestRequest" + } + } + } + }, + "responses": { + "202": { + "description": "Accepted", + "headers": { + "imx-mint-requests-limit": { + "$ref": "#/components/headers/MintRequestsLimit" + }, + "imx-mint-requests-limit-reset": { + "$ref": "#/components/headers/MintRequestsLimitReset" + }, + "imx-remaining-mint-requests": { + "$ref": "#/components/headers/MintRequestsLimitRemaining" + }, + "imx-mint-requests-retry-after": { + "$ref": "#/components/headers/MintRequestsRetryAfter" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateMintRequestResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "429": { + "$ref": "#/components/responses/TooManyMintRequests" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + }, + "get": { + "description": "Retrieve the status of all mints for a given contract address", + "summary": "List mint requests", + "security": [ + { + "ImmutableApiKey": [ + "write:mint-request" + ] + } + ], + "tags": [ + "nfts" + ], + "operationId": "ListMintRequests", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + }, + { + "name": "page_cursor", + "in": "query", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageCursor" + } + }, + { + "name": "page_size", + "description": "Maximum number of items to return", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/PageSize" + } + }, + { + "name": "status", + "description": "The status of the mint request", + "in": "query", + "required": false, + "schema": { + "$ref": "#/components/schemas/MintRequestStatus" + } + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMintRequestsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests/{reference_id}": { + "get": { + "description": "Retrieve the status of a mint request identified by its reference_id", + "summary": "Get mint request by reference ID", + "security": [ + { + "ImmutableApiKey": [ + "write:mint-request" + ] + } + ], + "tags": [ + "nfts" + ], + "operationId": "GetMintRequest", + "parameters": [ + { + "name": "contract_address", + "in": "path", + "description": "The address of contract", + "required": true, + "schema": { + "type": "string" + }, + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + } + }, + { + "name": "reference_id", + "description": "The id of the mint request", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "example": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0" + } + ], + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ListMintRequestsResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, + "/v1/chains/{chain_name}/crafting/sign": { + "post": { + "description": "Sign a crafting payload", + "tags": [ + "crafting" + ], + "operationId": "SignCraftingPayload", + "summary": "Sign a crafting payload", + "security": [ + { + "ImmutableApiKey": [ + "create:collections" + ] + } + ], + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "requestBody": { + "description": "The request body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignCraftingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignCraftingResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + } + }, + "components": { + "securitySchemes": { + "BearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + }, + "ImmutableApiKey": { + "x-go-name": "ImmutableApiKey", + "type": "apiKey", + "in": "header", + "name": "x-immutable-api-key" + } + }, + "parameters": { + "ChainName": { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + }, + "ContractAddress": { + "name": "contract_address", + "in": "path", + "required": true, + "description": "Contract address", + "schema": { + "$ref": "#/components/schemas/Address" + } + } + }, + "responses": { + "NotFound": { + "description": "The specified resource was not found (404)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError404" + } + } + } + }, + "BadRequest": { + "description": "Bad Request (400)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError400" + } + } + } + }, + "UnauthorisedRequest": { + "description": "Unauthorised Request (401)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError401" + } + } + } + }, + "ForbiddenRequest": { + "description": "Forbidden Request (403)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError403" + } + } + } + }, + "Conflict": { + "description": "Conflict (409)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError409" + } + } + } + }, + "TooManyMetadataRefreshes": { + "description": "Too Many Metadata refreshes (429)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError429" + } + } + }, + "headers": { + "imx-refreshes-limit": { + "$ref": "#/components/headers/MetadataRefreshLimit" + }, + "imx-refresh-limit-reset": { + "$ref": "#/components/headers/MetadataRefreshLimitReset" + }, + "imx-remaining-refreshes": { + "$ref": "#/components/headers/MetadataRefreshLimitRemaining" + }, + "Retry-After": { + "$ref": "#/components/headers/MetadataRefreshRetryAfter" + } + } + }, + "TooManyMintRequests": { + "description": "Too Many mint requests (429)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError429" + } + } + }, + "headers": { + "imx-mint-requests-limit": { + "$ref": "#/components/headers/MintRequestsLimit" + }, + "imx-mint-requests-limit-reset": { + "$ref": "#/components/headers/MintRequestsLimitReset" + }, + "imx-remaining-mint-requests": { + "$ref": "#/components/headers/MintRequestsLimitRemaining" + }, + "imx-mint-requests-retry-after": { + "$ref": "#/components/headers/MintRequestsRetryAfter" + }, + "Retry-After": { + "$ref": "#/components/headers/MintRequestsRetryAfter" + } + } + }, + "InternalServerError": { + "description": "Internal Server Error (500)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/APIError500" + } + } + } + } + }, + "headers": { + "MetadataRefreshLimit": { + "description": "The refresh request limit available to the project for each one-hour window.", + "schema": { + "type": "string" + } + }, + "MetadataRefreshLimitReset": { + "description": "The expiry date of the current one-hour window.", + "schema": { + "type": "string" + } + }, + "MetadataRefreshLimitRemaining": { + "description": "The number of refresh requests remaining in the current window.", + "schema": { + "type": "string" + } + }, + "MetadataRefreshRetryAfter": { + "description": "The number of seconds until the next refresh request can be made.", + "schema": { + "type": "string" + } + }, + "MintRequestsLimit": { + "description": "The mint requests limit available to the project for each time window.", + "schema": { + "type": "string" + } + }, + "MintRequestsLimitReset": { + "description": "The expiry date of the current time window.", + "schema": { + "type": "string" + } + }, + "MintRequestsLimitRemaining": { + "description": "The number of mint requests remaining in the current window.", + "schema": { + "type": "string" + } + }, + "MintRequestsRetryAfter": { + "description": "The number of seconds until the next refresh request can be made.", + "schema": { + "type": "string" + } + } + }, + "schemas": { + "PageSize": { + "type": "integer", + "format": "int32", + "description": "Maximum number of items to return", + "minimum": 1, + "default": 100, + "maximum": 200, + "example": 10 + }, + "PageCursor": { + "type": "string", + "description": "Encoded page cursor to retrieve previous or next page. Use the value returned in the response.", + "example": "ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=" + }, + "Page": { + "type": "object", + "description": "Pagination properties", + "properties": { + "previous_cursor": { + "type": "string", + "nullable": true, + "description": "First item as an encoded string", + "example": "ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=" + }, + "next_cursor": { + "type": "string", + "nullable": true, + "description": "Last item as an encoded string", + "example": "ewogICJ0eXBlIjogInByZXYiLAogICJpdGVtIjogewogICAgImlkIjogNjI3NTEzMCwKICAgICJjcmVhdGVkX2F0IjogIjIwMjItMDktMTNUMTc6MDQ6MTIuMDI0MTI2WiIKICB9Cn0=" + } + }, + "required": [ + "previous_cursor", + "next_cursor" + ] + }, + "ActivityType": { + "description": "The activity type", + "example": "mint", + "type": "string", + "enum": [ + "mint", + "burn", + "transfer", + "sale", + "deposit", + "withdrawal" + ] + }, + "ActivityNFT": { + "type": "object", + "properties": { + "contract_type": { + "$ref": "#/components/schemas/NFTContractType" + }, + "contract_address": { + "description": "The token contract address", + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "token_id": { + "description": "An `uint256` token id as string", + "type": "string", + "example": "1" + }, + "amount": { + "description": "(deprecated - will never be filled, use amount on Activity instead) The amount of tokens exchanged", + "type": "string", + "example": "1", + "deprecated": true + } + }, + "required": [ + "contract_type", + "contract_address", + "token_id", + "amount" + ] + }, + "ActivityToken": { + "type": "object", + "properties": { + "contract_type": { + "$ref": "#/components/schemas/TokenContractType" + }, + "contract_address": { + "description": "The contract address", + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + } + }, + "required": [ + "contract_type", + "contract_address" + ] + }, + "ActivityAsset": { + "description": "The contract and asset details for this activity", + "oneOf": [ + { + "$ref": "#/components/schemas/ActivityNFT" + }, + { + "$ref": "#/components/schemas/ActivityToken" + } + ], + "discriminator": { + "propertyName": "contract_type" + } + }, + "Address": { + "x-go-type": "common.Address", + "x-go-type-import": { + "path": "github.com/ethereum/go-ethereum/common", + "name": "common" + }, + "description": "An Ethereum address", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "Mint": { + "type": "object", + "description": "The mint activity details", + "properties": { + "to": { + "description": "The account address the asset was minted to", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "amount": { + "description": "The minted amount", + "type": "string", + "example": "1" + }, + "asset": { + "$ref": "#/components/schemas/ActivityAsset" + } + }, + "required": [ + "to", + "amount", + "asset" + ] + }, + "Deposit": { + "type": "object", + "description": "The deposit activity details", + "properties": { + "to": { + "description": "The account address the asset was deposited to", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "amount": { + "description": "The deposited amount", + "type": "string", + "example": "1" + }, + "asset": { + "$ref": "#/components/schemas/ActivityAsset" + } + }, + "required": [ + "to", + "amount", + "asset" + ] + }, + "Burn": { + "description": "The burn activity details", + "type": "object", + "properties": { + "from": { + "description": "The account address the asset was transferred from", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "amount": { + "description": "The amount of assets burnt", + "type": "string", + "example": "1" + }, + "asset": { + "$ref": "#/components/schemas/ActivityAsset" + } + }, + "required": [ + "from", + "amount", + "asset" + ] + }, + "Withdrawal": { + "description": "The withdrawal activity details", + "type": "object", + "properties": { + "from": { + "description": "The account address the asset was withdrawn from", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "amount": { + "description": "The amount of assets withdrawn", + "type": "string", + "example": "1" + }, + "asset": { + "$ref": "#/components/schemas/ActivityAsset" + } + }, + "required": [ + "from", + "amount", + "asset" + ] + }, + "Transfer": { + "type": "object", + "description": "The transfer activity details", + "properties": { + "from": { + "description": "The account address the asset was transferred from", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "to": { + "description": "The account address the asset was transferred to", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "amount": { + "description": "The amount of assets transferred", + "type": "string", + "example": "1" + }, + "asset": { + "$ref": "#/components/schemas/ActivityAsset" + } + }, + "required": [ + "activity_type", + "from", + "to", + "amount", + "asset" + ] + }, + "ActivityNativeToken": { + "type": "object", + "properties": { + "symbol": { + "description": "The token symbol", + "type": "string", + "example": "ETH" + } + }, + "required": [ + "symbol" + ] + }, + "SalePayment": { + "type": "object", + "properties": { + "token": { + "description": "The type of payment token", + "oneOf": [ + { + "$ref": "#/components/schemas/ActivityToken" + }, + { + "$ref": "#/components/schemas/ActivityNativeToken" + } + ] + }, + "price_excluding_fees": { + "description": "The base price of the sale not including any fees", + "type": "string", + "example": "180" + }, + "price_including_fees": { + "description": "The total price of the sale. Includes the sum of all fees", + "type": "string", + "example": "200" + }, + "fees": { + "description": "The fees associated with this sale", + "type": "array", + "items": { + "$ref": "#/components/schemas/SaleFee" + }, + "example": [ + { + "address": "0xB0F3749458169B7Ad51B5503CC3649DE55c2D0D2", + "amount": "20", + "type": "ROYALTY" + } + ], + "minItems": 0 + } + }, + "required": [ + "token", + "price_excluding_fees", + "price_including_fees", + "fees" + ] + }, + "SaleFee": { + "type": "object", + "properties": { + "amount": { + "type": "string", + "description": "Fee payable to recipient upon settlement", + "example": "200" + }, + "type": { + "type": "string", + "description": "Fee type", + "example": "ROYALTY", + "enum": [ + "ROYALTY" + ] + }, + "recipient": { + "type": "string", + "description": "Wallet address of fee recipient", + "example": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92233" + } + } + }, + "NFTSale": { + "description": "The NFT Sale activity details", + "type": "object", + "properties": { + "order_id": { + "description": "The id of order", + "type": "string", + "example": "ARZ3NDEKTSV4RRFFQ69G5FAV" + }, + "to": { + "description": "The account address of buyer", + "type": "string", + "example": "0xe9b00a87700f660e46b6f5deaa1232836bcc07d3" + }, + "from": { + "description": "The account address of seller", + "type": "string", + "example": "0xbD6cFcf93474De653d7B42b346c7c25d1F9c559C" + }, + "asset": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityNFT" + } + }, + "payment": { + "$ref": "#/components/schemas/SalePayment" + } + }, + "required": [ + "order_id", + "to", + "from", + "asset", + "payment" + ] + }, + "ActivityDetails": { + "description": "The activity details", + "oneOf": [ + { + "$ref": "#/components/schemas/Mint" + }, + { + "$ref": "#/components/schemas/Burn" + }, + { + "$ref": "#/components/schemas/Transfer" + }, + { + "$ref": "#/components/schemas/NFTSale" + }, + { + "$ref": "#/components/schemas/Deposit" + }, + { + "$ref": "#/components/schemas/Withdrawal" + } + ] + }, + "BlockchainMetadata": { + "description": "The metadata related to blockchain transaction", + "nullable": true, + "type": "object", + "properties": { + "transaction_hash": { + "type": "string", + "description": "The transaction hash of the activity", + "example": "0x68d9eac5e3b3c3580404989a4030c948a78e1b07b2b5ea5688d8c38a6c61c93e" + }, + "block_number": { + "description": "EVM block number (uint64 as string)", + "type": "string", + "example": "1" + }, + "transaction_index": { + "description": "Transaction index in a block (uint32 as string)", + "type": "string", + "example": "1" + }, + "log_index": { + "description": "The log index of activity in a block (uint32 as string)", + "type": "string", + "nullable": true, + "example": "1" + } + }, + "required": [ + "transaction_hash", + "block_number", + "transaction_index", + "log_index" + ] + }, + "Activity": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/ActivityID" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "type": { + "$ref": "#/components/schemas/ActivityType" + }, + "details": { + "$ref": "#/components/schemas/ActivityDetails" + }, + "updated_at": { + "type": "string", + "description": "The time activity was updated at", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z" + }, + "indexed_at": { + "type": "string", + "description": "The time activity was indexed", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z" + }, + "blockchain_metadata": { + "$ref": "#/components/schemas/BlockchainMetadata" + } + }, + "required": [ + "id", + "chain", + "type", + "details", + "indexed_at", + "updated_at", + "blockchain_metadata" + ] + }, + "ListActivitiesResult": { + "type": "object", + "description": "List activities response", + "properties": { + "result": { + "type": "array", + "description": "List of activities", + "items": { + "$ref": "#/components/schemas/Activity" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "GetActivityResult": { + "type": "object", + "description": "Single activity", + "properties": { + "result": { + "$ref": "#/components/schemas/Activity" + } + }, + "required": [ + "result" + ] + }, + "Collection": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "symbol": { + "type": "string", + "nullable": true, + "description": "The symbol of contract", + "example": "BASP" + }, + "contract_type": { + "$ref": "#/components/schemas/CollectionContractType" + }, + "contract_address": { + "type": "string", + "description": "The address of the contract", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of collection", + "example": "Some description" + }, + "image": { + "type": "string", + "description": "The url of the collection image", + "example": "https://some-url", + "nullable": true + }, + "external_link": { + "type": "string", + "description": "The url of external link", + "example": "https://some-url", + "nullable": true + }, + "contract_uri": { + "type": "string", + "description": "The uri for the metadata of the collection", + "example": "https://some-url", + "nullable": true + }, + "base_uri": { + "type": "string", + "nullable": true, + "description": "The metadata uri for nft", + "example": "https://some-url" + }, + "verification_status": { + "$ref": "#/components/schemas/AssetVerificationStatus" + }, + "indexed_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the collection was first indexed" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the collection was last updated" + }, + "metadata_synced_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the collection metadata was last synced" + } + }, + "required": [ + "chain", + "name", + "symbol", + "contract_type", + "contract_address", + "description", + "image", + "external_link", + "base_uri", + "metadata_uri", + "indexed_at", + "updated_at", + "metadata_synced_at", + "verification_status" + ] + }, + "ListCollectionsResult": { + "type": "object", + "properties": { + "result": { + "description": "List of collections", + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "GetCollectionResult": { + "type": "object", + "description": "Single Collection", + "properties": { + "result": { + "$ref": "#/components/schemas/Collection" + } + }, + "required": [ + "result" + ] + }, + "GetMetadataResult": { + "type": "object", + "description": "Single metadata", + "properties": { + "result": { + "$ref": "#/components/schemas/Metadata" + } + }, + "required": [ + "result" + ] + }, + "ListMetadataResult": { + "type": "object", + "properties": { + "result": { + "description": "List of metadata", + "type": "array", + "items": { + "$ref": "#/components/schemas/Metadata" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "Metadata": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/MetadataID" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "contract_address": { + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "description": "The contract address of the metadata" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the metadata was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When the metadata was last updated", + "example": "2022-08-16T17:43:26.991388Z" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" + }, + "description": { + "type": "string", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "The description of the NFT" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_url": { + "type": "string", + "nullable": true, + "description": "The external website link of NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube URL of NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of Metadata attributes", + "nullable": true, + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + } + }, + "required": [ + "id", + "chain", + "contract_address", + "created_at", + "updated_at", + "name", + "description", + "image", + "external_link", + "animation_url", + "youtube_url", + "attributes" + ] + }, + "RefreshMetadataByIDRequest": { + "type": "object", + "description": "Request body for refreshing metadata by id. Total size of this list should not exceed 228 KiB", + "properties": { + "metadata": { + "type": "array", + "maxItems": 10, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/RefreshMetadataByID" + } + } + }, + "required": [ + "metadata" + ] + }, + "NFT": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "token_id": { + "type": "string", + "example": "1", + "description": "An `uint256` token id as string" + }, + "contract_address": { + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "description": "The contract address of the NFT" + }, + "contract_type": { + "$ref": "#/components/schemas/NFTContractType" + }, + "indexed_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the NFT was first indexed" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the NFT owner was last updated" + }, + "metadata_synced_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When NFT metadata was last synced", + "example": "2022-08-16T17:43:26.991388Z" + }, + "metadata_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The id of the metadata of this NFT", + "example": "ae83bc80-4dd5-11ee-be56-0242ac120002" + }, + "name": { + "type": "string", + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" + }, + "description": { + "type": "string", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "The description of the NFT" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_link": { + "deprecated": true, + "type": "string", + "nullable": true, + "description": "(deprecated - use external_url instead) The external website link of NFT", + "example": "https://some-url" + }, + "external_url": { + "type": "string", + "nullable": true, + "description": "The external website link of NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube URL of NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of NFT Metadata attributes", + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + }, + "total_supply": { + "type": "string", + "nullable": true, + "description": "The total supply of NFT", + "example": "100" + } + }, + "required": [ + "chain", + "token_id", + "contract_address", + "indexed_at", + "updated_at", + "metadata_synced_at", + "name", + "description", + "image", + "external_link", + "external_url", + "animation_url", + "youtube_url", + "attributes", + "contract_type" + ] + }, + "NFTWithBalance": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "token_id": { + "type": "string", + "example": "1", + "description": "An `uint256` token id as string" + }, + "contract_address": { + "type": "string", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "description": "The contract address of the NFT" + }, + "contract_type": { + "$ref": "#/components/schemas/NFTContractType" + }, + "indexed_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the NFT was first indexed" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the NFT owner was last updated" + }, + "metadata_synced_at": { + "type": "string", + "format": "date-time", + "nullable": true, + "description": "When NFT metadata was last synced", + "example": "2022-08-16T17:43:26.991388Z" + }, + "metadata_id": { + "type": "string", + "format": "uuid", + "nullable": true, + "description": "The id of the metadata of this NFT", + "example": "ae83bc80-4dd5-11ee-be56-0242ac120002" + }, + "name": { + "type": "string", + "nullable": true, + "description": "The name of the NFT", + "example": "Sword" + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of the NFT", + "example": "This is a super awesome sword" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_link": { + "type": "string", + "nullable": true, + "description": "The external website link of NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube URL of NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of Metadata attributes", + "nullable": false, + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + }, + "balance": { + "type": "string", + "nullable": false, + "description": "The amount of this NFT this account owns", + "example": "11" + } + }, + "required": [ + "chain", + "token_id", + "contract_address", + "indexed_at", + "updated_at", + "metadata_synced_at", + "name", + "description", + "image", + "external_link", + "animation_url", + "youtube_url", + "balance", + "contract_type", + "attributes" + ] + }, + "NFTMetadataAttribute": { + "type": "object", + "properties": { + "display_type": { + "description": "Display type for this attribute", + "nullable": true, + "type": "string", + "enum": [ + "number", + "boost_percentage", + "boost_number", + "date" + ], + "example": "number" + }, + "trait_type": { + "description": "The metadata trait type", + "type": "string", + "example": "Aqua Power" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ], + "description": "The metadata trait value", + "example": "Happy" + } + }, + "required": [ + "trait_type", + "value" + ] + }, + "ChainName": { + "type": "string", + "description": "The name of chain", + "example": "imtbl-zkevm-testnet" + }, + "ActivityID": { + "description": "Activity id in UUIDv4 format", + "type": "string", + "format": "uuid", + "example": "4e28df8d-f65c-4c11-ba04-6a9dd47b179b" + }, + "MetadataID": { + "description": "Metadata id in UUIDv4 format", + "type": "string", + "format": "uuid", + "example": "4e28df8d-f65c-4c11-ba04-6a9dd47b179b" + }, + "CollectionContractType": { + "description": "The collection contract type", + "type": "string", + "enum": [ + "ERC721", + "ERC1155" + ] + }, + "NFTContractType": { + "description": "The contract type for an NFT", + "type": "string", + "enum": [ + "ERC721", + "ERC1155" + ] + }, + "TokenContractType": { + "description": "The contract type for a token", + "type": "string", + "enum": [ + "ERC20" + ] + }, + "AssetVerificationStatus": { + "description": "The verification status for a given contract", + "type": "string", + "enum": [ + "verified", + "unverified", + "spam", + "inactive" + ] + }, + "GetNFTResult": { + "type": "object", + "description": "Single NFT", + "properties": { + "result": { + "$ref": "#/components/schemas/NFT" + } + }, + "required": [ + "result" + ] + }, + "ListNFTsResult": { + "type": "object", + "properties": { + "result": { + "description": "List of NFTs", + "type": "array", + "items": { + "$ref": "#/components/schemas/NFT" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "ListNFTsByOwnerResult": { + "type": "object", + "properties": { + "result": { + "description": "List of NFTs by owner", + "type": "array", + "items": { + "$ref": "#/components/schemas/NFTWithBalance" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "NFTOwner": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "contract_address": { + "type": "string", + "description": "The address of NFT contract", + "example": "0x5a019874f4fae314b0eaa4606be746366e661306" + }, + "token_id": { + "type": "string", + "description": "An `uint256` token id as string", + "example": "1" + }, + "account_address": { + "type": "string", + "description": "The account address of the owner of the NFT", + "example": "0x5a019874f4fae314b0eaa4606be746366e661306" + }, + "balance": { + "type": "string", + "description": "The amount of owned tokens (uint256 as string)", + "example": "1" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the NFT owner was last updated" + } + }, + "required": [ + "chain", + "contract_address", + "token_id", + "account_address", + "balance" + ] + }, + "NFTWithOwner": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "contract_address": { + "type": "string", + "description": "The address of NFT contract", + "example": "0x5a019874f4fae314b0eaa4606be746366e661306" + }, + "token_id": { + "type": "string", + "description": "An `uint256` token id as string", + "example": "1" + }, + "account_address": { + "type": "string", + "description": "The account address of the owner of the NFT", + "example": "0x5a019874f4fae314b0eaa4606be746366e661306" + }, + "balance": { + "type": "string", + "description": "The amount of owned tokens (uint256 as string)", + "example": "1" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the owner last changed for the given NFT" + } + }, + "required": [ + "chain", + "contract_address", + "token_id", + "account_address", + "balance", + "updated_at" + ] + }, + "GetTokenResult": { + "type": "object", + "description": "Single Token", + "properties": { + "result": { + "$ref": "#/components/schemas/Token" + } + }, + "required": [ + "result" + ] + }, + "ListNFTOwnersResult": { + "type": "object", + "properties": { + "result": { + "description": "List of nft owners", + "type": "array", + "items": { + "$ref": "#/components/schemas/NFTOwner" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "ListCollectionOwnersResult": { + "type": "object", + "properties": { + "result": { + "description": "List of NFT owners", + "type": "array", + "items": { + "$ref": "#/components/schemas/NFTWithOwner" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "ChainWithDetails": { + "allOf": [ + { + "$ref": "#/components/schemas/Chain" + }, + { + "type": "object", + "properties": { + "rpc_url": { + "type": "string", + "nullable": true, + "description": "URL for RPC node" + } + }, + "required": [ + "rpc_url" + ] + } + ] + }, + "Chain": { + "type": "object", + "description": "The chain details", + "properties": { + "id": { + "type": "string", + "description": "The id of chain", + "example": "eip155:13372" + }, + "name": { + "type": "string", + "description": "The name of chain", + "example": "imtbl-zkevm-testnet" + } + }, + "required": [ + "id", + "name" + ] + }, + "ListChainsResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "description": "List of chains", + "items": { + "$ref": "#/components/schemas/ChainWithDetails" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "ListTokensResult": { + "type": "object", + "properties": { + "result": { + "type": "array", + "description": "List of tokens", + "items": { + "$ref": "#/components/schemas/Token" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "RefreshMetadataByID": { + "allOf": [ + { + "$ref": "#/components/schemas/RefreshableNFTAttributes" + }, + { + "type": "object", + "properties": { + "metadata_id": { + "$ref": "#/components/schemas/MetadataID" + } + }, + "required": [ + "metadata_id" + ] + } + ] + }, + "RefreshMetadataByTokenID": { + "allOf": [ + { + "$ref": "#/components/schemas/RefreshableNFTAttributes" + }, + { + "type": "object", + "properties": { + "token_id": { + "type": "string", + "description": "An `uint256` token id as string", + "example": "1" + } + }, + "required": [ + "token_id" + ] + } + ] + }, + "RefreshableNFTAttributes": { + "allOf": [ + { + "$ref": "#/components/schemas/NFTMetadataRequest" + } + ], + "required": [ + "name", + "description", + "image", + "external_url", + "animation_url", + "youtube_url", + "attributes" + ] + }, + "NFTMetadataRequest": { + "type": "object", + "description": "The NFT metadata. Total size of this object should not exceed 16 KiB", + "properties": { + "name": { + "type": "string", + "nullable": true, + "example": "Sword", + "description": "The name of the NFT" + }, + "description": { + "type": "string", + "nullable": true, + "example": "2022-08-16T17:43:26.991388Z", + "description": "The description of the NFT" + }, + "image": { + "type": "string", + "nullable": true, + "description": "The image url of the NFT", + "example": "https://some-url" + }, + "external_url": { + "type": "string", + "nullable": true, + "description": "The external link of the NFT", + "example": "https://some-url" + }, + "animation_url": { + "type": "string", + "nullable": true, + "description": "The animation url of the NFT", + "example": "https://some-url" + }, + "youtube_url": { + "type": "string", + "nullable": true, + "description": "The youtube link of the NFT", + "example": "https://some-url" + }, + "attributes": { + "type": "array", + "description": "List of Metadata attributes", + "nullable": true, + "items": { + "$ref": "#/components/schemas/NFTMetadataAttribute" + } + } + } + }, + "RefreshNFTMetadataByTokenIDRequest": { + "type": "object", + "properties": { + "nft_metadata": { + "type": "array", + "description": "List of nft metadata to be refreshed. Total size of the list should not exceed 228 KiB", + "maxItems": 250, + "minItems": 1, + "items": { + "$ref": "#/components/schemas/RefreshMetadataByTokenID" + } + } + }, + "required": [ + "nft_metadata" + ] + }, + "Token": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "contract_address": { + "type": "string", + "description": "The address of token contract", + "example": "0xc344c05eef8876e517072f879dae8905aa2b956b" + }, + "root_contract_address": { + "type": "string", + "description": "The address of root token contract", + "example": "0x43e60b30d5bec48c0f5890e3d1e9f1b1296bb4aa", + "nullable": true + }, + "root_chain_id": { + "type": "string", + "description": "The id of the root chain for a bridged token", + "example": "eip155:1", + "nullable": true + }, + "bridge_used": { + "type": "string", + "description": "The name of the bridge, for bridged tokens only", + "example": "axelar", + "nullable": true + }, + "symbol": { + "type": "string", + "description": "The symbol of token", + "example": "AAA", + "nullable": true + }, + "decimals": { + "type": "integer", + "description": "The decimals of token", + "example": 18, + "nullable": true + }, + "image_url": { + "type": "string", + "description": "The image url of token", + "example": "https://some-url", + "nullable": true + }, + "name": { + "type": "string", + "description": "The name of token", + "example": "Token A", + "nullable": true + }, + "verification_status": { + "$ref": "#/components/schemas/AssetVerificationStatus" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the collection was last updated" + }, + "is_canonical": { + "type": "boolean", + "example": true, + "description": "Indicates whether the token is canonical or not" + } + }, + "required": [ + "chain", + "contract_address", + "root_contract_address", + "symbol", + "decimals", + "image_url", + "name", + "updated_at", + "verification_status", + "is_canonical" + ] + }, + "CollectionMetadata": { + "type": "object", + "properties": { + "name": { + "type": "string", + "nullable": true, + "description": "The name of the collection", + "example": "Gigantic Lizards" + }, + "symbol": { + "type": "string", + "nullable": true, + "description": "The symbol of contract", + "example": "GLZ" + }, + "description": { + "type": "string", + "nullable": true, + "description": "The description of collection", + "example": "This is the Gigantic Lizards collection" + }, + "image": { + "type": "string", + "description": "The url of the collection image", + "example": "https://some-url", + "nullable": true + }, + "external_link": { + "type": "string", + "description": "The url of external link", + "example": "https://some-url", + "nullable": true + }, + "contract_uri": { + "type": "string", + "description": "The uri for the metadata of the collection", + "example": "https://some-url", + "nullable": true + }, + "base_uri": { + "type": "string", + "nullable": true, + "description": "The metadata uri for nft", + "example": "https://some-url" + } + }, + "required": [ + "name", + "image", + "symbol", + "description", + "base_uri", + "external_link", + "contract_uri" + ] + }, + "RefreshCollectionMetadataRequest": { + "type": "object", + "properties": { + "collection_metadata": { + "$ref": "#/components/schemas/CollectionMetadata" + } + }, + "required": [ + "collection_metadata" + ] + }, + "RefreshCollectionMetadataResult": { + "type": "object", + "properties": { + "contract_address": { + "type": "string" + }, + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "collection_metadata": { + "$ref": "#/components/schemas/CollectionMetadata" + } + }, + "required": [ + "contract_address", + "chain", + "collection_metadata" + ] + }, + "MetadataRefreshRateLimitResult": { + "type": "object", + "properties": { + "imx_refreshes_limit": { + "type": "string" + }, + "imx_refresh_limit_reset": { + "type": "string" + }, + "imx_remaining_refreshes": { + "type": "string" + }, + "retry_after": { + "type": "string" + } + }, + "required": [ + "imx_refreshes_limit", + "imx_refresh_limit_reset", + "imx_remaining_refreshes", + "retry_after" + ] + }, + "CreateMintRequestRequest": { + "type": "object", + "properties": { + "assets": { + "type": "array", + "maxItems": 100, + "minItems": 1, + "description": "List of nft to be minted", + "items": { + "$ref": "#/components/schemas/MintAsset" + } + } + }, + "required": [ + "assets" + ] + }, + "MintAsset": { + "type": "object", + "properties": { + "reference_id": { + "type": "string", + "description": "The id of this asset in the system that originates the mint request", + "example": "67f7d464-b8f0-4f6a-9a3b-8d3cb4a21af0" + }, + "owner_address": { + "type": "string", + "description": "The address of the receiver", + "example": "0xc344c05eef8876e517072f879dae8905aa2b956b" + }, + "token_id": { + "type": "string", + "description": "An optional `uint256` token id as string. Required for ERC1155 collections.", + "example": "1", + "nullable": true + }, + "amount": { + "type": "string", + "description": "Optional mount of tokens to mint. Required for ERC1155 collections. ERC712 collections can omit this field or set it to 1", + "example": "1", + "nullable": true, + "minLength": 1 + }, + "metadata": { + "$ref": "#/components/schemas/NFTMetadataRequest" + } + }, + "required": [ + "reference_id", + "owner_address" + ] + }, + "CreateMintRequestResult": { + "type": "object", + "properties": { + "imx_mint_requests_limit": { + "type": "string" + }, + "imx_mint_requests_limit_reset": { + "type": "string" + }, + "imx_remaining_mint_requests": { + "type": "string" + }, + "imx_mint_requests_retry_after": { + "type": "string" + } + }, + "required": [ + "imx_mint_requests_limit", + "imx_mint_requests_limit_reset", + "imx_remaining_mint_requests", + "imx_mint_requests_retry_after" + ] + }, + "ListMintRequestsResult": { + "type": "object", + "description": "List mint requests", + "properties": { + "result": { + "type": "array", + "description": "List of mint requests", + "items": { + "$ref": "#/components/schemas/GetMintRequestResult" + } + }, + "page": { + "$ref": "#/components/schemas/Page" + } + }, + "required": [ + "result", + "page" + ] + }, + "GetMintRequestResult": { + "type": "object", + "properties": { + "chain": { + "$ref": "#/components/schemas/Chain" + }, + "collection_address": { + "type": "string", + "description": "The address of the contract", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "reference_id": { + "type": "string", + "description": "The reference id of this mint request" + }, + "owner_address": { + "type": "string", + "description": "The address of the owner of the NFT" + }, + "token_id": { + "type": "string", + "example": "1", + "nullable": true, + "description": "An `uint256` token id as string. Only available when the mint request succeeds" + }, + "amount": { + "type": "string", + "example": "1", + "nullable": true, + "description": "An `uint256` amount as string. Only relevant for mint requests on ERC1155 contracts" + }, + "activity_id": { + "type": "string", + "format": "uuid", + "example": "4e28df8d-f65c-4c11-ba04-6a9dd47b179b", + "nullable": true, + "description": "The id of the mint activity associated with this mint request" + }, + "transaction_hash": { + "type": "string", + "nullable": true, + "description": "The transaction hash of the activity", + "example": "0x68d9eac5e3b3c3580404989a4030c948a78e1b07b2b5ea5688d8c38a6c61c93e" + }, + "created_at": { + "type": "string", + "format": "date-time", + "example": "2022-08-16T17:43:26.991388Z", + "description": "When the mint request was created" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "description": "When the mint request was last updated", + "example": "2022-08-16T17:43:26.991388Z" + }, + "error": { + "$ref": "#/components/schemas/MintRequestErrorMessage" + }, + "status": { + "$ref": "#/components/schemas/MintRequestStatus" + } + }, + "required": [ + "chain", + "collection_address", + "reference_id", + "owner_address", + "status", + "token_id", + "transaction_hash", + "error", + "created_at", + "updated_at" + ] + }, + "MintRequestErrorMessage": { + "type": "object", + "description": "The error details in case the mint request fails", + "nullable": true, + "properties": { + "message": { + "description": "An error message in case the mint request fails", + "type": "string" + } + } + }, + "MintRequestStatus": { + "description": "The status of the mint request", + "example": "pending", + "type": "string", + "enum": [ + "pending", + "succeeded", + "failed" + ] + }, + "Call": { + "type": "object", + "properties": { + "target_address": { + "$ref": "#/components/schemas/Address" + }, + "function_signature": { + "type": "string", + "description": "The function signature", + "example": "mint(address,uint256)" + }, + "function_args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The function arguments", + "example": [ + "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "1" + ] + } + }, + "required": [ + "target_address", + "function_signature", + "function_args" + ] + }, + "SignCraftingRequest": { + "type": "object", + "properties": { + "multi_caller": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/Address" + }, + "name": { + "type": "string", + "description": "The name of the multicaller contract", + "example": "Multicaller" + }, + "version": { + "type": "string", + "description": "The version of the multicaller contract", + "example": "1" + } + }, + "required": [ + "address", + "name", + "version" + ] + }, + "reference_id": { + "type": "string", + "description": "The id of this request in the system that originates the crafting request, specified as a 32 byte hex string", + "example": "67f7d464b8f04f6a9a3b8d3cb4a21af0" + }, + "calls": { + "type": "array", + "description": "The calls to be signed", + "items": { + "$ref": "#/components/schemas/Call" + }, + "minLength": 1, + "maxLength": 100 + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The expiration time of the request", + "example": "2022-08-16T17:43:26.991388Z" + } + }, + "required": [ + "multi_caller", + "reference_id", + "calls", + "expires_at" + ] + }, + "SignCraftingResult": { + "type": "object", + "properties": { + "signer_address": { + "$ref": "#/components/schemas/Address" + }, + "signature": { + "type": "string", + "description": "The signature of the request", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + } + }, + "required": [ + "signer_address", + "signature" + ] + }, + "BasicAPIError": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Error Message", + "example": "all fields must be provided" + }, + "link": { + "type": "string", + "description": "Link to IMX documentation that can help resolve this error", + "example": "https://docs.x.immutable.com/reference/#/" + }, + "trace_id": { + "type": "string", + "description": "Trace ID of the initial request", + "example": "e47634b79a5cd6894ddc9639ec4aad26" + } + }, + "required": [ + "message", + "link", + "trace_id" + ] + }, + "APIError400": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "VALIDATION_ERROR" + ], + "example": "VALIDATION_ERROR" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError404": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "RESOURCE_NOT_FOUND" + ], + "example": "RESOURCE_NOT_FOUND" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError500": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "INTERNAL_SERVER_ERROR" + ], + "example": "INTERNAL_SERVER_ERROR" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError401": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "UNAUTHORISED_REQUEST" + ], + "example": "UNAUTHORISED_REQUEST" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError403": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "AUTHENTICATION_ERROR" + ], + "example": "AUTHENTICATION_ERROR" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError429": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "TOO_MANY_REQUESTS_ERROR" + ], + "example": "TOO_MANY_REQUESTS_ERROR" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error" + } + }, + "required": [ + "code", + "details" + ] + } + ] + }, + "APIError409": { + "allOf": [ + { + "$ref": "#/components/schemas/BasicAPIError" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Error Code", + "enum": [ + "CONFLICT_ERROR" + ], + "example": "CONFLICT_ERROR" + }, + "details": { + "type": "object", + "nullable": true, + "description": "Additional details to help resolve the error", + "additionalProperties": true + } + }, + "required": [ + "code", + "details" + ] + } + ] + } + } + } +} diff --git a/packages/internal/generated-clients/src/blockchain-data/.openapi-generator/FILES b/packages/internal/generated-clients/src/blockchain-data/.openapi-generator/FILES index 2c2dcc3990..6293b044a8 100644 --- a/packages/internal/generated-clients/src/blockchain-data/.openapi-generator/FILES +++ b/packages/internal/generated-clients/src/blockchain-data/.openapi-generator/FILES @@ -8,13 +8,13 @@ configuration.ts domain/activities-api.ts domain/chains-api.ts domain/collections-api.ts +domain/crafting-api.ts domain/metadata-api.ts domain/nft-owners-api.ts domain/nfts-api.ts domain/tokens-api.ts git_push.sh index.ts -models/active-order-status.ts models/activity-asset.ts models/activity-details.ts models/activity-native-token.ts @@ -36,16 +36,11 @@ models/apierror429-all-of.ts models/apierror429.ts models/apierror500-all-of.ts models/apierror500.ts -models/apierror501-all-of.ts -models/apierror501.ts models/asset-verification-status.ts models/basic-apierror.ts models/blockchain-metadata.ts models/burn.ts -models/cancel-orders-request-body.ts -models/cancel-orders-result-data.ts -models/cancel-orders-result.ts -models/cancelled-order-status.ts +models/call.ts models/chain-with-details-all-of.ts models/chain-with-details.ts models/chain.ts @@ -57,28 +52,21 @@ models/create-mint-request-result.ts models/deposit.ts models/get-activity-result.ts models/get-collection-result.ts -models/get-linked-addresses-res-deprecated.ts -models/get-linked-addresses-res.ts models/get-metadata-result.ts models/get-mint-request-result.ts models/get-nftresult.ts models/get-token-result.ts -models/inactive-order-status.ts models/index.ts -models/item.ts models/list-activities-result.ts models/list-chains-result.ts models/list-collection-owners-result.ts models/list-collections-result.ts -models/list-listings-result.ts models/list-metadata-result.ts models/list-mint-requests-result.ts models/list-nftowners-result.ts models/list-nfts-by-owner-result.ts models/list-nfts-result.ts models/list-tokens-result.ts -models/list-trade-result.ts -models/listing-result.ts models/metadata-refresh-rate-limit-result.ts models/metadata.ts models/mint-asset.ts @@ -94,13 +82,7 @@ models/nftowner.ts models/nftsale.ts models/nftwith-balance.ts models/nftwith-owner.ts -models/order-status-name.ts -models/order-status.ts -models/order.ts -models/organisation-tier.ts models/page.ts -models/pending-order-status.ts -models/protocol-data.ts models/refresh-collection-metadata-request.ts models/refresh-collection-metadata-result.ts models/refresh-metadata-by-id.ts @@ -113,11 +95,10 @@ models/refreshable-nftattributes.ts models/sale-fee.ts models/sale-payment-token.ts models/sale-payment.ts +models/sign-crafting-request-multi-caller.ts +models/sign-crafting-request.ts +models/sign-crafting-result.ts models/token-contract-type.ts models/token.ts -models/trade-blockchain-metadata.ts -models/trade-result.ts -models/trade.ts models/transfer.ts -models/unfulfillable-order.ts models/withdrawal.ts diff --git a/packages/internal/generated-clients/src/blockchain-data/api.ts b/packages/internal/generated-clients/src/blockchain-data/api.ts index df63f15779..3d9ed6dbf3 100644 --- a/packages/internal/generated-clients/src/blockchain-data/api.ts +++ b/packages/internal/generated-clients/src/blockchain-data/api.ts @@ -12,10 +12,14 @@ * Do not edit the class manually. */ + + export * from './domain/activities-api'; export * from './domain/chains-api'; export * from './domain/collections-api'; +export * from './domain/crafting-api'; export * from './domain/metadata-api'; export * from './domain/nft-owners-api'; export * from './domain/nfts-api'; export * from './domain/tokens-api'; + diff --git a/packages/internal/generated-clients/src/blockchain-data/domain/crafting-api.ts b/packages/internal/generated-clients/src/blockchain-data/domain/crafting-api.ts new file mode 100644 index 0000000000..9e44513fc2 --- /dev/null +++ b/packages/internal/generated-clients/src/blockchain-data/domain/crafting-api.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// @ts-ignore +import { APIError400 } from '../models'; +// @ts-ignore +import { APIError401 } from '../models'; +// @ts-ignore +import { APIError403 } from '../models'; +// @ts-ignore +import { APIError404 } from '../models'; +// @ts-ignore +import { APIError500 } from '../models'; +// @ts-ignore +import { SignCraftingRequest } from '../models'; +// @ts-ignore +import { SignCraftingResult } from '../models'; +// @ts-ignore +export type { APIError400 } from '../models'; +// @ts-ignore +export type { APIError401 } from '../models'; +// @ts-ignore +export type { APIError403 } from '../models'; +// @ts-ignore +export type { APIError404 } from '../models'; +// @ts-ignore +export type { APIError500 } from '../models'; +// @ts-ignore +export type { SignCraftingRequest } from '../models'; +// @ts-ignore +export type { SignCraftingResult } from '../models'; + +/** + * Request parameters for signCraftingPayload operation in CraftingApi. + * @export + * @interface SignCraftingPayloadRequest + */ +export interface SignCraftingPayloadRequestParams { + /** + * The name of chain + * @type {string} + * @memberof SignCraftingPayload + */ + readonly chainName: string + + /** + * The request body + * @type {SignCraftingRequest} + * @memberof SignCraftingPayload + */ + readonly signCraftingRequest: SignCraftingRequest +} + + diff --git a/packages/internal/generated-clients/src/blockchain-data/models/apierror501-all-of.ts b/packages/internal/generated-clients/src/blockchain-data/models/call.ts similarity index 50% rename from packages/internal/generated-clients/src/blockchain-data/models/apierror501-all-of.ts rename to packages/internal/generated-clients/src/blockchain-data/models/call.ts index 0ffe9cfbde..98b1604388 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/apierror501-all-of.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/call.ts @@ -17,29 +17,26 @@ /** * * @export - * @interface APIError501AllOf + * @interface Call */ -export interface APIError501AllOf { +export interface Call { /** - * Error Code + * An Ethereum address * @type {string} - * @memberof APIError501AllOf + * @memberof Call */ - 'code': APIError501AllOfCodeEnum; + 'target_address': string; /** - * Additional details to help resolve the error - * @type {object} - * @memberof APIError501AllOf + * The function signature + * @type {string} + * @memberof Call */ - 'details': object | null; -} - -/** - * @export - * @enum {string} - */ -export enum APIError501AllOfCodeEnum { - NotImplementedError = 'NOT_IMPLEMENTED_ERROR' + 'function_signature': string; + /** + * The function arguments + * @type {Array} + * @memberof Call + */ + 'function_args': Array; } - diff --git a/packages/internal/generated-clients/src/blockchain-data/models/index.ts b/packages/internal/generated-clients/src/blockchain-data/models/index.ts index e96431ce78..fb2e5cbb01 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/index.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/index.ts @@ -12,9 +12,6 @@ export * from './apierror429'; export * from './apierror429-all-of'; export * from './apierror500'; export * from './apierror500-all-of'; -export * from './apierror501'; -export * from './apierror501-all-of'; -export * from './active-order-status'; export * from './activity'; export * from './activity-asset'; export * from './activity-details'; @@ -26,6 +23,7 @@ export * from './asset-verification-status'; export * from './basic-apierror'; export * from './blockchain-metadata'; export * from './burn'; +export * from './call'; export * from './chain'; export * from './chain-with-details'; export * from './chain-with-details-all-of'; @@ -79,6 +77,9 @@ export * from './refreshable-nftattributes'; export * from './sale-fee'; export * from './sale-payment'; export * from './sale-payment-token'; +export * from './sign-crafting-request'; +export * from './sign-crafting-request-multi-caller'; +export * from './sign-crafting-result'; export * from './token'; export * from './token-contract-type'; export * from './transfer'; diff --git a/packages/internal/generated-clients/src/blockchain-data/models/nft.ts b/packages/internal/generated-clients/src/blockchain-data/models/nft.ts index 25f86e8091..7deed291c2 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/nft.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/nft.ts @@ -96,11 +96,18 @@ export interface NFT { */ 'image': string | null; /** - * The external website link of NFT + * (deprecated - use external_url instead) The external website link of NFT * @type {string} * @memberof NFT + * @deprecated */ 'external_link': string | null; + /** + * The external website link of NFT + * @type {string} + * @memberof NFT + */ + 'external_url': string | null; /** * The animation url of the NFT * @type {string} diff --git a/packages/internal/generated-clients/src/blockchain-data/models/nftowner.ts b/packages/internal/generated-clients/src/blockchain-data/models/nftowner.ts index fd502829e7..b8ba329ca8 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/nftowner.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/nftowner.ts @@ -47,13 +47,6 @@ export interface NFTOwner { * @memberof NFTOwner */ 'account_address': string; - /** - * (deprecated - use balance instead) The quantity of owned tokens (uint256 as string) - * @type {string} - * @memberof NFTOwner - * @deprecated - */ - 'quantity': string; /** * The amount of owned tokens (uint256 as string) * @type {string} diff --git a/packages/internal/generated-clients/src/blockchain-data/models/nftwith-owner.ts b/packages/internal/generated-clients/src/blockchain-data/models/nftwith-owner.ts index 9f7bc44bc0..6d2ea12a24 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/nftwith-owner.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/nftwith-owner.ts @@ -47,13 +47,6 @@ export interface NFTWithOwner { * @memberof NFTWithOwner */ 'account_address': string; - /** - * (deprecated - use balance instead) The quantity of owned tokens (uint256 as string) - * @type {string} - * @memberof NFTWithOwner - * @deprecated - */ - 'quantity': string; /** * The amount of owned tokens (uint256 as string) * @type {string} diff --git a/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request-multi-caller.ts b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request-multi-caller.ts new file mode 100644 index 0000000000..c4e8e3974d --- /dev/null +++ b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request-multi-caller.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SignCraftingRequestMultiCaller + */ +export interface SignCraftingRequestMultiCaller { + /** + * An Ethereum address + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'address': string; + /** + * The name of the multicaller contract + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'name': string; + /** + * The version of the multicaller contract + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'version': string; +} + diff --git a/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request.ts b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request.ts new file mode 100644 index 0000000000..48a81d1ea0 --- /dev/null +++ b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-request.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Call } from './call'; +// May contain unused imports in some cases +// @ts-ignore +import { SignCraftingRequestMultiCaller } from './sign-crafting-request-multi-caller'; + +/** + * + * @export + * @interface SignCraftingRequest + */ +export interface SignCraftingRequest { + /** + * + * @type {SignCraftingRequestMultiCaller} + * @memberof SignCraftingRequest + */ + 'multi_caller': SignCraftingRequestMultiCaller; + /** + * The id of this request in the system that originates the crafting request, specified as a 32 byte hex string + * @type {string} + * @memberof SignCraftingRequest + */ + 'reference_id': string; + /** + * The calls to be signed + * @type {Array} + * @memberof SignCraftingRequest + */ + 'calls': Array; + /** + * The expiration time of the request + * @type {string} + * @memberof SignCraftingRequest + */ + 'expires_at': string; +} + diff --git a/packages/internal/generated-clients/src/blockchain-data/models/active-order-status.ts b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-result.ts similarity index 56% rename from packages/internal/generated-clients/src/blockchain-data/models/active-order-status.ts rename to packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-result.ts index fbbd6af7ff..af179f758b 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/active-order-status.ts +++ b/packages/internal/generated-clients/src/blockchain-data/models/sign-crafting-result.ts @@ -17,23 +17,20 @@ /** * * @export - * @interface ActiveOrderStatus + * @interface SignCraftingResult */ -export interface ActiveOrderStatus { +export interface SignCraftingResult { /** - * The order status that indicates an order can be fulfilled. + * An Ethereum address * @type {string} - * @memberof ActiveOrderStatus + * @memberof SignCraftingResult */ - 'name': ActiveOrderStatusNameEnum; -} - -/** - * @export - * @enum {string} - */ -export enum ActiveOrderStatusNameEnum { - Active = 'ACTIVE' + 'signer_address': string; + /** + * The signature of the request + * @type {string} + * @memberof SignCraftingResult + */ + 'signature': string; } - diff --git a/packages/internal/generated-clients/src/mr-openapi.json b/packages/internal/generated-clients/src/mr-openapi.json index e69f75c37f..85448c7d73 100644 --- a/packages/internal/generated-clients/src/mr-openapi.json +++ b/packages/internal/generated-clients/src/mr-openapi.json @@ -2189,6 +2189,78 @@ } } }, + "/v1/chains/{chain_name}/crafting/sign": { + "post": { + "description": "Sign a crafting payload", + "tags": [ + "crafting" + ], + "operationId": "SignCraftingPayload", + "summary": "Sign a crafting payload", + "security": [ + { + "ImmutableApiKey": [ + "create:collections" + ] + } + ], + "parameters": [ + { + "name": "chain_name", + "description": "The name of chain", + "in": "path", + "required": true, + "schema": { + "$ref": "#/components/schemas/ChainName" + }, + "examples": { + "testnet": { + "value": "imtbl-zkevm-testnet", + "summary": "Immutable zkEVM Public Testnet" + } + } + } + ], + "requestBody": { + "description": "The request body", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignCraftingRequest" + } + } + } + }, + "responses": { + "200": { + "description": "200 response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SignCraftingResult" + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/UnauthorisedRequest" + }, + "403": { + "$ref": "#/components/responses/ForbiddenRequest" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "500": { + "$ref": "#/components/responses/InternalServerError" + } + } + } + }, "/v1/chains/{chain_name}/orders/cancel": { "post": { "tags": [ @@ -6193,12 +6265,6 @@ "description": "The account address of the owner of the NFT", "example": "0x5a019874f4fae314b0eaa4606be746366e661306" }, - "quantity": { - "type": "string", - "description": "(deprecated - use balance instead) The quantity of owned tokens (uint256 as string)", - "example": "1", - "deprecated": true - }, "balance": { "type": "string", "description": "The amount of owned tokens (uint256 as string)", @@ -6216,7 +6282,6 @@ "contract_address", "token_id", "account_address", - "quantity", "balance" ] }, @@ -6241,12 +6306,6 @@ "description": "The account address of the owner of the NFT", "example": "0x5a019874f4fae314b0eaa4606be746366e661306" }, - "quantity": { - "type": "string", - "description": "(deprecated - use balance instead) The quantity of owned tokens (uint256 as string)", - "example": "1", - "deprecated": true - }, "balance": { "type": "string", "description": "The amount of owned tokens (uint256 as string)", @@ -6264,7 +6323,6 @@ "contract_address", "token_id", "account_address", - "quantity", "balance", "updated_at" ] @@ -7136,6 +7194,106 @@ "created_by" ] }, + "Call": { + "type": "object", + "properties": { + "target_address": { + "$ref": "#/components/schemas/Address" + }, + "function_signature": { + "type": "string", + "description": "The function signature", + "example": "mint(address,uint256)" + }, + "function_args": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The function arguments", + "example": [ + "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e", + "1" + ] + } + }, + "required": [ + "target_address", + "function_signature", + "function_args" + ] + }, + "SignCraftingRequest": { + "type": "object", + "properties": { + "multi_caller": { + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/Address" + }, + "name": { + "type": "string", + "description": "The name of the multicaller contract", + "example": "Multicaller" + }, + "version": { + "type": "string", + "description": "The version of the multicaller contract", + "example": "1" + } + }, + "required": [ + "address", + "name", + "version" + ] + }, + "reference_id": { + "type": "string", + "description": "The id of this request in the system that originates the crafting request, specified as a 32 byte hex string", + "example": "67f7d464b8f04f6a9a3b8d3cb4a21af0" + }, + "calls": { + "type": "array", + "description": "The calls to be signed", + "items": { + "$ref": "#/components/schemas/Call" + }, + "minLength": 1, + "maxLength": 100 + }, + "expires_at": { + "type": "string", + "format": "date-time", + "description": "The expiration time of the request", + "example": "2022-08-16T17:43:26.991388Z" + } + }, + "required": [ + "multi_caller", + "reference_id", + "calls", + "expires_at" + ] + }, + "SignCraftingResult": { + "type": "object", + "properties": { + "signer_address": { + "$ref": "#/components/schemas/Address" + }, + "signature": { + "type": "string", + "description": "The signature of the request", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + } + }, + "required": [ + "signer_address", + "signature" + ] + }, "BasicAPIError": { "type": "object", "properties": { @@ -10058,8 +10216,14 @@ { "$ref": "#/components/schemas/SeaportERC1155Item" }, + { + "$ref": "#/components/schemas/SeaportERC1155CollectionItem" + }, { "$ref": "#/components/schemas/SeaportERC721Item" + }, + { + "$ref": "#/components/schemas/SeaportERC721CollectionItem" } ], "example": [ @@ -10288,7 +10452,7 @@ }, "amount": { "type": "string", - "description": "A string representing the total units of an ERC1155 token which the user is selling", + "description": "A string representing the total units of an ERC1155 token which the user is buying/selling", "example": "100" }, "immutable_verification_status": { @@ -10316,6 +10480,105 @@ "immutable_verification_status" ] }, + "SeaportERC721CollectionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Token type user is offering, which in this case is ERC721Collection", + "example": "ERC721Collection", + "enum": [ + "ERC721Collection" + ] + }, + "contract_address": { + "type": "string", + "description": "Address of ERC721 token", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "contract_name": { + "type": "string", + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "amount": { + "type": "string", + "description": "A string representing the total units of an ERC721 token which the user is buying", + "example": "10" + }, + "immutable_verification_status": { + "type": "string", + "description": "The Immutable verification status of this collection", + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + } + }, + "example": [ + { + "type": "ERC721Collection", + "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", + "amount": "10", + "immutable_verification_status": "verified" + } + ], + "required": [ + "type", + "contract_address", + "amount", + "immutable_verification_status" + ] + }, + "SeaportERC1155CollectionItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Token type user is offering, which in this case is ERC1155Collection", + "example": "ERC1155Collection", + "enum": [ + "ERC1155Collection" + ] + }, + "contract_address": { + "type": "string", + "description": "Address of ERC1155 token", + "example": "0x692edAd005237c7E737bB2c0F3D8ccCc10D3479E", + "pattern": "^0x[a-fA-F0-9]{40}$" + }, + "contract_name": { + "type": "string", + "nullable": true, + "description": "The name of the collection", + "example": "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e" + }, + "amount": { + "type": "string", + "description": "A string representing the total units of an ERC1155 token which the user is buying", + "example": "100" + }, + "immutable_verification_status": { + "type": "string", + "description": "The Immutable verification status of this collection", + "$ref": "#/components/schemas/ImmutableVerificationStatusEnum" + } + }, + "example": [ + { + "type": "ERC1155", + "contract_address": "0x87c07c927eba711cbc55ec628a670acd48d0b525", + "contract_name": "Guild of Guardians Heroes", + "amount": "100", + "immutable_verification_status": "verified" + } + ], + "required": [ + "type", + "contract_address", + "amount", + "immutable_verification_status" + ] + }, "SeaportFee": { "type": "object", "properties": { @@ -10397,8 +10660,14 @@ { "$ref": "#/components/schemas/SeaportERC721Item" }, + { + "$ref": "#/components/schemas/SeaportERC721CollectionItem" + }, { "$ref": "#/components/schemas/SeaportERC1155Item" + }, + { + "$ref": "#/components/schemas/SeaportERC1155CollectionItem" } ], "example": [ @@ -11062,14 +11331,15 @@ "type": "object", "required": [ "status", - "analysis" + "analysis", + "highestSeverity" ], "properties": { "status": { "$ref": "#/components/schemas/ValidationStatus" }, "highestSeverity": { - "$ref": "#/components/schemas/Severity" + "$ref": "#/components/schemas/HighestSeverity" }, "analysis": { "type": "array", @@ -11129,6 +11399,22 @@ "info" ] }, + "HighestSeverity": { + "type": "object", + "required": [ + "severity", + "description" + ], + "description": "Top level severity analysis", + "properties": { + "severity": { + "$ref": "#/components/schemas/Severity" + }, + "description": { + "type": "string" + } + } + }, "ValidationStatus": { "type": "string", "description": "Status of the validation", diff --git a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES index 3671f19cbf..f203bca4c8 100644 --- a/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES +++ b/packages/internal/generated-clients/src/multi-rollup/.openapi-generator/FILES @@ -8,6 +8,7 @@ configuration.ts domain/activities-api.ts domain/chains-api.ts domain/collections-api.ts +domain/crafting-api.ts domain/guardian-api.ts domain/metadata-api.ts domain/nft-owners-api.ts @@ -49,6 +50,7 @@ models/basic-apierror.ts models/bid-result.ts models/blockchain-metadata.ts models/burn.ts +models/call.ts models/cancel-orders-request-body.ts models/cancel-orders-result-data.ts models/cancel-orders-result.ts @@ -108,6 +110,7 @@ models/get-transaction-metadata-request.ts models/get-transaction-metadata-res.ts models/get-typed-data-metadata-request.ts models/get-typed-data-metadata-res.ts +models/highest-severity.ts models/immutable-verification-status-enum.ts models/inactive-order-status.ts models/index.ts @@ -181,13 +184,18 @@ models/seaport-advanced-order.ts models/seaport-create-listing-metadata-buy.ts models/seaport-create-listing-metadata-sell.ts models/seaport-create-listing-metadata.ts +models/seaport-erc1155-collection-item.ts models/seaport-erc1155-item.ts models/seaport-erc20-item.ts +models/seaport-erc721-collection-item.ts models/seaport-erc721-item.ts models/seaport-fee.ts models/seaport-fulfill-available-advanced-orders-metadata.ts models/seaport-native-item.ts models/severity.ts +models/sign-crafting-request-multi-caller.ts +models/sign-crafting-request.ts +models/sign-crafting-result.ts models/stark-ex-transaction-evaluation-request.ts models/token-contract-type.ts models/token.ts diff --git a/packages/internal/generated-clients/src/multi-rollup/api.ts b/packages/internal/generated-clients/src/multi-rollup/api.ts index 0000e4fd7f..a5bc07d233 100644 --- a/packages/internal/generated-clients/src/multi-rollup/api.ts +++ b/packages/internal/generated-clients/src/multi-rollup/api.ts @@ -17,6 +17,7 @@ export * from './domain/activities-api'; export * from './domain/chains-api'; export * from './domain/collections-api'; +export * from './domain/crafting-api'; export * from './domain/guardian-api'; export * from './domain/metadata-api'; export * from './domain/nft-owners-api'; diff --git a/packages/internal/generated-clients/src/multi-rollup/domain/crafting-api.ts b/packages/internal/generated-clients/src/multi-rollup/domain/crafting-api.ts new file mode 100644 index 0000000000..85a85a6ba5 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/domain/crafting-api.ts @@ -0,0 +1,172 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from '../configuration'; +import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +// @ts-ignore +import { APIError400 } from '../models'; +// @ts-ignore +import { APIError401 } from '../models'; +// @ts-ignore +import { APIError403 } from '../models'; +// @ts-ignore +import { APIError404 } from '../models'; +// @ts-ignore +import { APIError500 } from '../models'; +// @ts-ignore +import { SignCraftingRequest } from '../models'; +// @ts-ignore +import { SignCraftingResult } from '../models'; +/** + * CraftingApi - axios parameter creator + * @export + */ +export const CraftingApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Sign a crafting payload + * @summary Sign a crafting payload + * @param {string} chainName The name of chain + * @param {SignCraftingRequest} signCraftingRequest The request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signCraftingPayload: async (chainName: string, signCraftingRequest: SignCraftingRequest, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'chainName' is not null or undefined + assertParamExists('signCraftingPayload', 'chainName', chainName) + // verify required parameter 'signCraftingRequest' is not null or undefined + assertParamExists('signCraftingPayload', 'signCraftingRequest', signCraftingRequest) + const localVarPath = `/v1/chains/{chain_name}/crafting/sign` + .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication ImmutableApiKey required + await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration) + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(signCraftingRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * CraftingApi - functional programming interface + * @export + */ +export const CraftingApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = CraftingApiAxiosParamCreator(configuration) + return { + /** + * Sign a crafting payload + * @summary Sign a crafting payload + * @param {string} chainName The name of chain + * @param {SignCraftingRequest} signCraftingRequest The request body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async signCraftingPayload(chainName: string, signCraftingRequest: SignCraftingRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.signCraftingPayload(chainName, signCraftingRequest, options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * CraftingApi - factory interface + * @export + */ +export const CraftingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = CraftingApiFp(configuration) + return { + /** + * Sign a crafting payload + * @summary Sign a crafting payload + * @param {CraftingApiSignCraftingPayloadRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + signCraftingPayload(requestParameters: CraftingApiSignCraftingPayloadRequest, options?: AxiosRequestConfig): AxiosPromise { + return localVarFp.signCraftingPayload(requestParameters.chainName, requestParameters.signCraftingRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * Request parameters for signCraftingPayload operation in CraftingApi. + * @export + * @interface CraftingApiSignCraftingPayloadRequest + */ +export interface CraftingApiSignCraftingPayloadRequest { + /** + * The name of chain + * @type {string} + * @memberof CraftingApiSignCraftingPayload + */ + readonly chainName: string + + /** + * The request body + * @type {SignCraftingRequest} + * @memberof CraftingApiSignCraftingPayload + */ + readonly signCraftingRequest: SignCraftingRequest +} + +/** + * CraftingApi - object-oriented interface + * @export + * @class CraftingApi + * @extends {BaseAPI} + */ +export class CraftingApi extends BaseAPI { + /** + * Sign a crafting payload + * @summary Sign a crafting payload + * @param {CraftingApiSignCraftingPayloadRequest} requestParameters Request parameters. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof CraftingApi + */ + public signCraftingPayload(requestParameters: CraftingApiSignCraftingPayloadRequest, options?: AxiosRequestConfig) { + return CraftingApiFp(this.configuration).signCraftingPayload(requestParameters.chainName, requestParameters.signCraftingRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/call.ts b/packages/internal/generated-clients/src/multi-rollup/models/call.ts new file mode 100644 index 0000000000..98b1604388 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/call.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface Call + */ +export interface Call { + /** + * An Ethereum address + * @type {string} + * @memberof Call + */ + 'target_address': string; + /** + * The function signature + * @type {string} + * @memberof Call + */ + 'function_signature': string; + /** + * The function arguments + * @type {Array} + * @memberof Call + */ + 'function_args': Array; +} + diff --git a/packages/internal/generated-clients/src/blockchain-data/models/apierror501.ts b/packages/internal/generated-clients/src/multi-rollup/models/highest-severity.ts similarity index 55% rename from packages/internal/generated-clients/src/blockchain-data/models/apierror501.ts rename to packages/internal/generated-clients/src/multi-rollup/models/highest-severity.ts index ab123854bc..0abe4a542f 100644 --- a/packages/internal/generated-clients/src/blockchain-data/models/apierror501.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/highest-severity.ts @@ -15,15 +15,27 @@ // May contain unused imports in some cases // @ts-ignore -import { APIError501AllOf } from './apierror501-all-of'; -// May contain unused imports in some cases -// @ts-ignore -import { BasicAPIError } from './basic-apierror'; +import { Severity } from './severity'; /** - * @type APIError501 + * Top level severity analysis * @export + * @interface HighestSeverity */ -export type APIError501 = APIError501AllOf & BasicAPIError; +export interface HighestSeverity { + /** + * + * @type {Severity} + * @memberof HighestSeverity + */ + 'severity': Severity; + /** + * + * @type {string} + * @memberof HighestSeverity + */ + 'description': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/index.ts b/packages/internal/generated-clients/src/multi-rollup/models/index.ts index 4d4ec4a7fc..01b11ccc83 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/index.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/index.ts @@ -29,6 +29,7 @@ export * from './basic-apierror'; export * from './bid-result'; export * from './blockchain-metadata'; export * from './burn'; +export * from './call'; export * from './cancel-orders-request-body'; export * from './cancel-orders-result'; export * from './cancel-orders-result-data'; @@ -88,6 +89,7 @@ export * from './get-transaction-metadata-request'; export * from './get-transaction-metadata-res'; export * from './get-typed-data-metadata-request'; export * from './get-typed-data-metadata-res'; +export * from './highest-severity'; export * from './immutable-verification-status-enum'; export * from './inactive-order-status'; export * from './item'; @@ -160,13 +162,18 @@ export * from './seaport-advanced-order-sell'; export * from './seaport-create-listing-metadata'; export * from './seaport-create-listing-metadata-buy'; export * from './seaport-create-listing-metadata-sell'; +export * from './seaport-erc1155-collection-item'; export * from './seaport-erc1155-item'; export * from './seaport-erc20-item'; +export * from './seaport-erc721-collection-item'; export * from './seaport-erc721-item'; export * from './seaport-fee'; export * from './seaport-fulfill-available-advanced-orders-metadata'; export * from './seaport-native-item'; export * from './severity'; +export * from './sign-crafting-request'; +export * from './sign-crafting-request-multi-caller'; +export * from './sign-crafting-result'; export * from './stark-ex-transaction-evaluation-request'; export * from './token'; export * from './token-contract-type'; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/nftowner.ts b/packages/internal/generated-clients/src/multi-rollup/models/nftowner.ts index fd502829e7..b8ba329ca8 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/nftowner.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/nftowner.ts @@ -47,13 +47,6 @@ export interface NFTOwner { * @memberof NFTOwner */ 'account_address': string; - /** - * (deprecated - use balance instead) The quantity of owned tokens (uint256 as string) - * @type {string} - * @memberof NFTOwner - * @deprecated - */ - 'quantity': string; /** * The amount of owned tokens (uint256 as string) * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/nftwith-owner.ts b/packages/internal/generated-clients/src/multi-rollup/models/nftwith-owner.ts index 9f7bc44bc0..6d2ea12a24 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/nftwith-owner.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/nftwith-owner.ts @@ -47,13 +47,6 @@ export interface NFTWithOwner { * @memberof NFTWithOwner */ 'account_address': string; - /** - * (deprecated - use balance instead) The quantity of owned tokens (uint256 as string) - * @type {string} - * @memberof NFTWithOwner - * @deprecated - */ - 'quantity': string; /** * The amount of owned tokens (uint256 as string) * @type {string} diff --git a/packages/internal/generated-clients/src/multi-rollup/models/seaport-advanced-order-buy.ts b/packages/internal/generated-clients/src/multi-rollup/models/seaport-advanced-order-buy.ts index 08d0e7c3fc..22e3de89f4 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/seaport-advanced-order-buy.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/seaport-advanced-order-buy.ts @@ -18,12 +18,18 @@ import { ImmutableVerificationStatusEnum } from './immutable-verification-status-enum'; // May contain unused imports in some cases // @ts-ignore +import { SeaportERC1155CollectionItem } from './seaport-erc1155-collection-item'; +// May contain unused imports in some cases +// @ts-ignore import { SeaportERC1155Item } from './seaport-erc1155-item'; // May contain unused imports in some cases // @ts-ignore import { SeaportERC20Item } from './seaport-erc20-item'; // May contain unused imports in some cases // @ts-ignore +import { SeaportERC721CollectionItem } from './seaport-erc721-collection-item'; +// May contain unused imports in some cases +// @ts-ignore import { SeaportERC721Item } from './seaport-erc721-item'; // May contain unused imports in some cases // @ts-ignore @@ -33,6 +39,6 @@ import { SeaportNativeItem } from './seaport-native-item'; * @type SeaportAdvancedOrderBuy * @export */ -export type SeaportAdvancedOrderBuy = SeaportERC1155Item | SeaportERC20Item | SeaportERC721Item | SeaportNativeItem; +export type SeaportAdvancedOrderBuy = SeaportERC1155CollectionItem | SeaportERC1155Item | SeaportERC20Item | SeaportERC721CollectionItem | SeaportERC721Item | SeaportNativeItem; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/seaport-create-listing-metadata-buy.ts b/packages/internal/generated-clients/src/multi-rollup/models/seaport-create-listing-metadata-buy.ts index 8b5d5389f1..602d0e7027 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/seaport-create-listing-metadata-buy.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/seaport-create-listing-metadata-buy.ts @@ -18,12 +18,18 @@ import { ImmutableVerificationStatusEnum } from './immutable-verification-status-enum'; // May contain unused imports in some cases // @ts-ignore +import { SeaportERC1155CollectionItem } from './seaport-erc1155-collection-item'; +// May contain unused imports in some cases +// @ts-ignore import { SeaportERC1155Item } from './seaport-erc1155-item'; // May contain unused imports in some cases // @ts-ignore import { SeaportERC20Item } from './seaport-erc20-item'; // May contain unused imports in some cases // @ts-ignore +import { SeaportERC721CollectionItem } from './seaport-erc721-collection-item'; +// May contain unused imports in some cases +// @ts-ignore import { SeaportERC721Item } from './seaport-erc721-item'; // May contain unused imports in some cases // @ts-ignore @@ -33,6 +39,6 @@ import { SeaportNativeItem } from './seaport-native-item'; * @type SeaportCreateListingMetadataBuy * @export */ -export type SeaportCreateListingMetadataBuy = SeaportERC1155Item | SeaportERC20Item | SeaportERC721Item | SeaportNativeItem; +export type SeaportCreateListingMetadataBuy = SeaportERC1155CollectionItem | SeaportERC1155Item | SeaportERC20Item | SeaportERC721CollectionItem | SeaportERC721Item | SeaportNativeItem; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-collection-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-collection-item.ts new file mode 100644 index 0000000000..9e4da069f8 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-collection-item.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ImmutableVerificationStatusEnum } from './immutable-verification-status-enum'; + +/** + * + * @export + * @interface SeaportERC1155CollectionItem + */ +export interface SeaportERC1155CollectionItem { + /** + * Token type user is offering, which in this case is ERC1155Collection + * @type {string} + * @memberof SeaportERC1155CollectionItem + */ + 'type': SeaportERC1155CollectionItemTypeEnum; + /** + * Address of ERC1155 token + * @type {string} + * @memberof SeaportERC1155CollectionItem + */ + 'contract_address': string; + /** + * The name of the collection + * @type {string} + * @memberof SeaportERC1155CollectionItem + */ + 'contract_name'?: string | null; + /** + * A string representing the total units of an ERC1155 token which the user is buying + * @type {string} + * @memberof SeaportERC1155CollectionItem + */ + 'amount': string; + /** + * + * @type {ImmutableVerificationStatusEnum} + * @memberof SeaportERC1155CollectionItem + */ + 'immutable_verification_status': ImmutableVerificationStatusEnum; +} + +export const SeaportERC1155CollectionItemTypeEnum = { + Erc1155Collection: 'ERC1155Collection' +} as const; + +export type SeaportERC1155CollectionItemTypeEnum = typeof SeaportERC1155CollectionItemTypeEnum[keyof typeof SeaportERC1155CollectionItemTypeEnum]; + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-item.ts index dc68edff46..369e71431d 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-item.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc1155-item.ts @@ -60,7 +60,7 @@ export interface SeaportERC1155Item { */ 'token_id': string; /** - * A string representing the total units of an ERC1155 token which the user is selling + * A string representing the total units of an ERC1155 token which the user is buying/selling * @type {string} * @memberof SeaportERC1155Item */ diff --git a/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc721-collection-item.ts b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc721-collection-item.ts new file mode 100644 index 0000000000..685d5638b7 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/seaport-erc721-collection-item.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ImmutableVerificationStatusEnum } from './immutable-verification-status-enum'; + +/** + * + * @export + * @interface SeaportERC721CollectionItem + */ +export interface SeaportERC721CollectionItem { + /** + * Token type user is offering, which in this case is ERC721Collection + * @type {string} + * @memberof SeaportERC721CollectionItem + */ + 'type': SeaportERC721CollectionItemTypeEnum; + /** + * Address of ERC721 token + * @type {string} + * @memberof SeaportERC721CollectionItem + */ + 'contract_address': string; + /** + * The name of the collection + * @type {string} + * @memberof SeaportERC721CollectionItem + */ + 'contract_name'?: string | null; + /** + * A string representing the total units of an ERC721 token which the user is buying + * @type {string} + * @memberof SeaportERC721CollectionItem + */ + 'amount': string; + /** + * + * @type {ImmutableVerificationStatusEnum} + * @memberof SeaportERC721CollectionItem + */ + 'immutable_verification_status': ImmutableVerificationStatusEnum; +} + +export const SeaportERC721CollectionItemTypeEnum = { + Erc721Collection: 'ERC721Collection' +} as const; + +export type SeaportERC721CollectionItemTypeEnum = typeof SeaportERC721CollectionItemTypeEnum[keyof typeof SeaportERC721CollectionItemTypeEnum]; + + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request-multi-caller.ts b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request-multi-caller.ts new file mode 100644 index 0000000000..c4e8e3974d --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request-multi-caller.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SignCraftingRequestMultiCaller + */ +export interface SignCraftingRequestMultiCaller { + /** + * An Ethereum address + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'address': string; + /** + * The name of the multicaller contract + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'name': string; + /** + * The version of the multicaller contract + * @type {string} + * @memberof SignCraftingRequestMultiCaller + */ + 'version': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request.ts b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request.ts new file mode 100644 index 0000000000..48a81d1ea0 --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-request.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Call } from './call'; +// May contain unused imports in some cases +// @ts-ignore +import { SignCraftingRequestMultiCaller } from './sign-crafting-request-multi-caller'; + +/** + * + * @export + * @interface SignCraftingRequest + */ +export interface SignCraftingRequest { + /** + * + * @type {SignCraftingRequestMultiCaller} + * @memberof SignCraftingRequest + */ + 'multi_caller': SignCraftingRequestMultiCaller; + /** + * The id of this request in the system that originates the crafting request, specified as a 32 byte hex string + * @type {string} + * @memberof SignCraftingRequest + */ + 'reference_id': string; + /** + * The calls to be signed + * @type {Array} + * @memberof SignCraftingRequest + */ + 'calls': Array; + /** + * The expiration time of the request + * @type {string} + * @memberof SignCraftingRequest + */ + 'expires_at': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-result.ts new file mode 100644 index 0000000000..af179f758b --- /dev/null +++ b/packages/internal/generated-clients/src/multi-rollup/models/sign-crafting-result.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Immutable zkEVM API + * Immutable Multi Rollup API + * + * The version of the OpenAPI document: 1.0.0 + * Contact: support@immutable.com + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** + * + * @export + * @interface SignCraftingResult + */ +export interface SignCraftingResult { + /** + * An Ethereum address + * @type {string} + * @memberof SignCraftingResult + */ + 'signer_address': string; + /** + * The signature of the request + * @type {string} + * @memberof SignCraftingResult + */ + 'signature': string; +} + diff --git a/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts index a93d1dd3dc..a3d8f73003 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-result.ts @@ -18,7 +18,7 @@ import { Analysis } from './analysis'; // May contain unused imports in some cases // @ts-ignore -import { Severity } from './severity'; +import { HighestSeverity } from './highest-severity'; // May contain unused imports in some cases // @ts-ignore import { ValidationErrorResults } from './validation-error-results'; diff --git a/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts b/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts index 1529ca9d21..bcecc6cabb 100644 --- a/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts +++ b/packages/internal/generated-clients/src/multi-rollup/models/validation-success-results.ts @@ -18,7 +18,7 @@ import { Analysis } from './analysis'; // May contain unused imports in some cases // @ts-ignore -import { Severity } from './severity'; +import { HighestSeverity } from './highest-severity'; // May contain unused imports in some cases // @ts-ignore import { ValidationStatus } from './validation-status'; @@ -37,10 +37,10 @@ export interface ValidationSuccessResults { 'status': ValidationStatus; /** * - * @type {Severity} + * @type {HighestSeverity} * @memberof ValidationSuccessResults */ - 'highestSeverity'?: Severity; + 'highestSeverity': HighestSeverity; /** * Contains a recommended action and warnings pertaining to the simulated transaction, such as interactions with known malicious addresses * @type {Array} diff --git a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/NFTTransfer.tsx b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/NFTTransfer.tsx index 6f7c3a0cfa..eb06649aa1 100644 --- a/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/NFTTransfer.tsx +++ b/packages/passport/sdk-sample-app/src/components/zkevm/EthSendTransactionExamples/NFTTransfer.tsx @@ -20,7 +20,11 @@ type GroupedAsset = { assets: NFTCandidate[]; }; -type NFTCandidate = BlockchainData.NFT & { selected: boolean, to_address?: string, to_address_required?: string }; +type NFTCandidate = BlockchainData.NFTWithBalance & { + selected: boolean; + to_address?: string; + to_address_required?: string; +}; const chainNameMapping = (environment: EnvironmentNames) => { switch (environment) { @@ -36,7 +40,7 @@ const chainNameMapping = (environment: EnvironmentNames) => { }; function NFTTransfer({ disabled, handleExampleSubmitted }: RequestExampleProps) { - const [assets, setAssets] = useState([]); + const [assets, setAssets] = useState([]); const [transfers, setTransfers] = useState[]>([]); const [fromAddress, setFromAddress] = useState(''); const { zkEvmProvider } = usePassportProvider(); @@ -111,14 +115,14 @@ function NFTTransfer({ disabled, handleExampleSubmitted }: RequestExampleProps) }; const assetsRes = await blockchainData.listNFTsByAccountAddress(payload); - setAssets(assetsRes.result as BlockchainData.NFT[]); + setAssets(assetsRes.result as BlockchainData.NFTWithBalance[]); }; getAssets().catch(console.log); }, [blockchainData, chainName, fromAddress]); const groupedAssets = useMemo( () => assets - .reduce((group: GroupedAsset[], rawAsset: BlockchainData.NFT) => { + .reduce((group: GroupedAsset[], rawAsset: BlockchainData.NFTWithBalance) => { const sameContractAddressAssets = group.find( (g) => g.contract_address.toLowerCase() === rawAsset.contract_address.toLowerCase(), );