@imtbl/sdk 0.1.8-alpha.1 → 0.1.8-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import globalAxios from 'axios';
2
2
  import { ImmutableX, Config, generateLegacyStarkPrivateKey, createStarkSigner, TransfersApi, OrdersApi, UsersApi, Contracts, TradesApi, ExchangesApi, WithdrawalsApi, MintsApi, DepositsApi, EncodingApi, TokensApi } from '@imtbl/core-sdk';
3
3
  export { createStarkSigner as imxClientCreateStarkSigner, generateLegacyStarkPrivateKey as imxClientGenerateLegacyStarkPrivateKey } from '@imtbl/core-sdk';
4
4
  import { UserManager } from 'oidc-client-ts';
5
- import { ethers, utils, Contract, BigNumber, constants } from 'ethers';
5
+ import { ethers, utils, Contract, BigNumber, constants, ContractFactory } from 'ethers';
6
6
  import { Magic } from 'magic-sdk';
7
7
  import { OpenIdExtension } from '@magic-ext/oidc';
8
8
  import BN from 'bn.js';
@@ -45,17 +45,17 @@ class ImmutableConfiguration {
45
45
  */
46
46
  // Some imports not used depending on template conditions
47
47
  // @ts-ignore
48
- const BASE_PATH = "https://indexer-mr.dev.imtbl.com".replace(/\/+$/, "");
48
+ const BASE_PATH$1 = "https://indexer-mr.dev.imtbl.com".replace(/\/+$/, "");
49
49
  /**
50
50
  *
51
51
  * @export
52
52
  * @class BaseAPI
53
53
  */
54
- class BaseAPI {
54
+ let BaseAPI$1 = class BaseAPI {
55
55
  basePath;
56
56
  axios;
57
57
  configuration;
58
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
58
+ constructor(configuration, basePath = BASE_PATH$1, axios = globalAxios) {
59
59
  this.basePath = basePath;
60
60
  this.axios = axios;
61
61
  if (configuration) {
@@ -63,21 +63,21 @@ class BaseAPI {
63
63
  this.basePath = configuration.basePath || this.basePath;
64
64
  }
65
65
  }
66
- }
66
+ };
67
67
  /**
68
68
  *
69
69
  * @export
70
70
  * @class RequiredError
71
71
  * @extends {Error}
72
72
  */
73
- class RequiredError extends Error {
73
+ let RequiredError$1 = class RequiredError extends Error {
74
74
  field;
75
75
  name = "RequiredError";
76
76
  constructor(field, msg) {
77
77
  super(msg);
78
78
  this.field = field;
79
79
  }
80
- }
80
+ };
81
81
 
82
82
  /* tslint:disable */
83
83
  /* eslint-disable */
@@ -96,24 +96,24 @@ class RequiredError extends Error {
96
96
  *
97
97
  * @export
98
98
  */
99
- const DUMMY_BASE_URL = 'https://example.com';
99
+ const DUMMY_BASE_URL$1 = 'https://example.com';
100
100
  /**
101
101
  *
102
102
  * @throws {RequiredError}
103
103
  * @export
104
104
  */
105
- const assertParamExists = function (functionName, paramName, paramValue) {
105
+ const assertParamExists$1 = function (functionName, paramName, paramValue) {
106
106
  if (paramValue === null || paramValue === undefined) {
107
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
107
+ throw new RequiredError$1(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
108
108
  }
109
109
  };
110
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
110
+ function setFlattenedQueryParams$1(urlSearchParams, parameter, key = "") {
111
111
  if (typeof parameter === "object") {
112
112
  if (Array.isArray(parameter)) {
113
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
113
+ parameter.forEach(item => setFlattenedQueryParams$1(urlSearchParams, item, key));
114
114
  }
115
115
  else {
116
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
116
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams$1(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
117
117
  }
118
118
  }
119
119
  else {
@@ -129,23 +129,23 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
129
129
  *
130
130
  * @export
131
131
  */
132
- const setSearchParams = function (url, ...objects) {
132
+ const setSearchParams$1 = function (url, ...objects) {
133
133
  const searchParams = new URLSearchParams(url.search);
134
- setFlattenedQueryParams(searchParams, objects);
134
+ setFlattenedQueryParams$1(searchParams, objects);
135
135
  url.search = searchParams.toString();
136
136
  };
137
137
  /**
138
138
  *
139
139
  * @export
140
140
  */
141
- const toPathString = function (url) {
141
+ const toPathString$1 = function (url) {
142
142
  return url.pathname + url.search + url.hash;
143
143
  };
144
144
  /**
145
145
  *
146
146
  * @export
147
147
  */
148
- const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
148
+ const createRequestFunction$1 = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
149
149
  return (axios = globalAxios, basePath = BASE_PATH) => {
150
150
  const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
151
151
  return axios.request(axiosRequestArgs);
@@ -181,14 +181,14 @@ const ActivitiesApiAxiosParamCreator = function (configuration) {
181
181
  */
182
182
  getActivity: async (chainName, activityId, options = {}) => {
183
183
  // verify required parameter 'chainName' is not null or undefined
184
- assertParamExists('getActivity', 'chainName', chainName);
184
+ assertParamExists$1('getActivity', 'chainName', chainName);
185
185
  // verify required parameter 'activityId' is not null or undefined
186
- assertParamExists('getActivity', 'activityId', activityId);
186
+ assertParamExists$1('getActivity', 'activityId', activityId);
187
187
  const localVarPath = `/v1/chains/{chain_name}/activities/{activity_id}`
188
188
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
189
189
  .replace(`{${"activity_id"}}`, encodeURIComponent(String(activityId)));
190
190
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
191
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
191
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
192
192
  let baseOptions;
193
193
  if (configuration) {
194
194
  baseOptions = configuration.baseOptions;
@@ -196,11 +196,11 @@ const ActivitiesApiAxiosParamCreator = function (configuration) {
196
196
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
197
197
  const localVarHeaderParameter = {};
198
198
  const localVarQueryParameter = {};
199
- setSearchParams(localVarUrlObj, localVarQueryParameter);
199
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
200
200
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
201
201
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
202
202
  return {
203
- url: toPathString(localVarUrlObj),
203
+ url: toPathString$1(localVarUrlObj),
204
204
  options: localVarRequestOptions,
205
205
  };
206
206
  },
@@ -222,11 +222,11 @@ const ActivitiesApiAxiosParamCreator = function (configuration) {
222
222
  */
223
223
  listActivities: async (chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options = {}) => {
224
224
  // verify required parameter 'chainName' is not null or undefined
225
- assertParamExists('listActivities', 'chainName', chainName);
225
+ assertParamExists$1('listActivities', 'chainName', chainName);
226
226
  const localVarPath = `/v1/chains/{chain_name}/activities`
227
227
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
228
228
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
229
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
229
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
230
230
  let baseOptions;
231
231
  if (configuration) {
232
232
  baseOptions = configuration.baseOptions;
@@ -265,11 +265,11 @@ const ActivitiesApiAxiosParamCreator = function (configuration) {
265
265
  if (pageSize !== undefined) {
266
266
  localVarQueryParameter['page_size'] = pageSize;
267
267
  }
268
- setSearchParams(localVarUrlObj, localVarQueryParameter);
268
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
269
269
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
270
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
271
271
  return {
272
- url: toPathString(localVarUrlObj),
272
+ url: toPathString$1(localVarUrlObj),
273
273
  options: localVarRequestOptions,
274
274
  };
275
275
  },
@@ -292,7 +292,7 @@ const ActivitiesApiFp = function (configuration) {
292
292
  */
293
293
  async getActivity(chainName, activityId, options) {
294
294
  const localVarAxiosArgs = await localVarAxiosParamCreator.getActivity(chainName, activityId, options);
295
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
295
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
296
296
  },
297
297
  /**
298
298
  * List all activities
@@ -312,7 +312,7 @@ const ActivitiesApiFp = function (configuration) {
312
312
  */
313
313
  async listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options) {
314
314
  const localVarAxiosArgs = await localVarAxiosParamCreator.listActivities(chainName, contractAddress, tokenId, accountAddress, activityType, fromIndexedAt, toIndexedAt, transactionHash, pageCursor, pageSize, options);
315
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
315
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
316
316
  },
317
317
  };
318
318
  };
@@ -322,7 +322,7 @@ const ActivitiesApiFp = function (configuration) {
322
322
  * @class ActivitiesApi
323
323
  * @extends {BaseAPI}
324
324
  */
325
- class ActivitiesApi extends BaseAPI {
325
+ class ActivitiesApi extends BaseAPI$1 {
326
326
  /**
327
327
  * Get a single activity by ID
328
328
  * @summary Get a single activity by ID
@@ -377,7 +377,7 @@ const ChainsApiAxiosParamCreator = function (configuration) {
377
377
  listChains: async (pageCursor, pageSize, options = {}) => {
378
378
  const localVarPath = `/v1/chains`;
379
379
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
380
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
381
381
  let baseOptions;
382
382
  if (configuration) {
383
383
  baseOptions = configuration.baseOptions;
@@ -391,11 +391,11 @@ const ChainsApiAxiosParamCreator = function (configuration) {
391
391
  if (pageSize !== undefined) {
392
392
  localVarQueryParameter['page_size'] = pageSize;
393
393
  }
394
- setSearchParams(localVarUrlObj, localVarQueryParameter);
394
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
395
395
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
396
396
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
397
397
  return {
398
- url: toPathString(localVarUrlObj),
398
+ url: toPathString$1(localVarUrlObj),
399
399
  options: localVarRequestOptions,
400
400
  };
401
401
  },
@@ -418,7 +418,7 @@ const ChainsApiFp = function (configuration) {
418
418
  */
419
419
  async listChains(pageCursor, pageSize, options) {
420
420
  const localVarAxiosArgs = await localVarAxiosParamCreator.listChains(pageCursor, pageSize, options);
421
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
421
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
422
422
  },
423
423
  };
424
424
  };
@@ -428,7 +428,7 @@ const ChainsApiFp = function (configuration) {
428
428
  * @class ChainsApi
429
429
  * @extends {BaseAPI}
430
430
  */
431
- class ChainsApi extends BaseAPI {
431
+ class ChainsApi extends BaseAPI$1 {
432
432
  /**
433
433
  * List supported chains
434
434
  * @summary List supported chains
@@ -471,14 +471,14 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
471
471
  */
472
472
  getCollection: async (contractAddress, chainName, options = {}) => {
473
473
  // verify required parameter 'contractAddress' is not null or undefined
474
- assertParamExists('getCollection', 'contractAddress', contractAddress);
474
+ assertParamExists$1('getCollection', 'contractAddress', contractAddress);
475
475
  // verify required parameter 'chainName' is not null or undefined
476
- assertParamExists('getCollection', 'chainName', chainName);
476
+ assertParamExists$1('getCollection', 'chainName', chainName);
477
477
  const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}`
478
478
  .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
479
479
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
480
480
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
481
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
481
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
482
482
  let baseOptions;
483
483
  if (configuration) {
484
484
  baseOptions = configuration.baseOptions;
@@ -486,11 +486,11 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
486
486
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
487
487
  const localVarHeaderParameter = {};
488
488
  const localVarQueryParameter = {};
489
- setSearchParams(localVarUrlObj, localVarQueryParameter);
489
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
490
490
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
491
491
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
492
492
  return {
493
- url: toPathString(localVarUrlObj),
493
+ url: toPathString$1(localVarUrlObj),
494
494
  options: localVarRequestOptions,
495
495
  };
496
496
  },
@@ -505,11 +505,11 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
505
505
  */
506
506
  listCollections: async (chainName, pageCursor, pageSize, options = {}) => {
507
507
  // verify required parameter 'chainName' is not null or undefined
508
- assertParamExists('listCollections', 'chainName', chainName);
508
+ assertParamExists$1('listCollections', 'chainName', chainName);
509
509
  const localVarPath = `/v1/chains/{chain_name}/collections`
510
510
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
511
511
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
512
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
512
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
513
513
  let baseOptions;
514
514
  if (configuration) {
515
515
  baseOptions = configuration.baseOptions;
@@ -523,11 +523,11 @@ const CollectionsApiAxiosParamCreator = function (configuration) {
523
523
  if (pageSize !== undefined) {
524
524
  localVarQueryParameter['page_size'] = pageSize;
525
525
  }
526
- setSearchParams(localVarUrlObj, localVarQueryParameter);
526
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
527
527
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
528
528
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
529
529
  return {
530
- url: toPathString(localVarUrlObj),
530
+ url: toPathString$1(localVarUrlObj),
531
531
  options: localVarRequestOptions,
532
532
  };
533
533
  },
@@ -550,7 +550,7 @@ const CollectionsApiFp = function (configuration) {
550
550
  */
551
551
  async getCollection(contractAddress, chainName, options) {
552
552
  const localVarAxiosArgs = await localVarAxiosParamCreator.getCollection(contractAddress, chainName, options);
553
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
553
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
554
554
  },
555
555
  /**
556
556
  * List all collections
@@ -563,7 +563,7 @@ const CollectionsApiFp = function (configuration) {
563
563
  */
564
564
  async listCollections(chainName, pageCursor, pageSize, options) {
565
565
  const localVarAxiosArgs = await localVarAxiosParamCreator.listCollections(chainName, pageCursor, pageSize, options);
566
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
566
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
567
567
  },
568
568
  };
569
569
  };
@@ -573,7 +573,7 @@ const CollectionsApiFp = function (configuration) {
573
573
  * @class CollectionsApi
574
574
  * @extends {BaseAPI}
575
575
  */
576
- class CollectionsApi extends BaseAPI {
576
+ class CollectionsApi extends BaseAPI$1 {
577
577
  /**
578
578
  * Get collection by contract address
579
579
  * @summary Get collection by contract address
@@ -630,17 +630,17 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
630
630
  */
631
631
  listNFTOwners: async (contractAddress, tokenId, chainName, pageCursor, pageSize, options = {}) => {
632
632
  // verify required parameter 'contractAddress' is not null or undefined
633
- assertParamExists('listNFTOwners', 'contractAddress', contractAddress);
633
+ assertParamExists$1('listNFTOwners', 'contractAddress', contractAddress);
634
634
  // verify required parameter 'tokenId' is not null or undefined
635
- assertParamExists('listNFTOwners', 'tokenId', tokenId);
635
+ assertParamExists$1('listNFTOwners', 'tokenId', tokenId);
636
636
  // verify required parameter 'chainName' is not null or undefined
637
- assertParamExists('listNFTOwners', 'chainName', chainName);
637
+ assertParamExists$1('listNFTOwners', 'chainName', chainName);
638
638
  const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}/owners`
639
639
  .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
640
640
  .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
641
641
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
642
642
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
643
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
643
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
644
644
  let baseOptions;
645
645
  if (configuration) {
646
646
  baseOptions = configuration.baseOptions;
@@ -654,11 +654,11 @@ const NftOwnersApiAxiosParamCreator = function (configuration) {
654
654
  if (pageSize !== undefined) {
655
655
  localVarQueryParameter['page_size'] = pageSize;
656
656
  }
657
- setSearchParams(localVarUrlObj, localVarQueryParameter);
657
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
658
658
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
659
659
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
660
660
  return {
661
- url: toPathString(localVarUrlObj),
661
+ url: toPathString$1(localVarUrlObj),
662
662
  options: localVarRequestOptions,
663
663
  };
664
664
  },
@@ -684,7 +684,7 @@ const NftOwnersApiFp = function (configuration) {
684
684
  */
685
685
  async listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options) {
686
686
  const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTOwners(contractAddress, tokenId, chainName, pageCursor, pageSize, options);
687
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
687
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
688
688
  },
689
689
  };
690
690
  };
@@ -694,7 +694,7 @@ const NftOwnersApiFp = function (configuration) {
694
694
  * @class NftOwnersApi
695
695
  * @extends {BaseAPI}
696
696
  */
697
- class NftOwnersApi extends BaseAPI {
697
+ class NftOwnersApi extends BaseAPI$1 {
698
698
  /**
699
699
  * List NFT owners by token ID
700
700
  * @summary List NFT owners by token ID
@@ -738,17 +738,17 @@ const NftsApiAxiosParamCreator = function (configuration) {
738
738
  */
739
739
  getNFT: async (contractAddress, tokenId, chainName, options = {}) => {
740
740
  // verify required parameter 'contractAddress' is not null or undefined
741
- assertParamExists('getNFT', 'contractAddress', contractAddress);
741
+ assertParamExists$1('getNFT', 'contractAddress', contractAddress);
742
742
  // verify required parameter 'tokenId' is not null or undefined
743
- assertParamExists('getNFT', 'tokenId', tokenId);
743
+ assertParamExists$1('getNFT', 'tokenId', tokenId);
744
744
  // verify required parameter 'chainName' is not null or undefined
745
- assertParamExists('getNFT', 'chainName', chainName);
745
+ assertParamExists$1('getNFT', 'chainName', chainName);
746
746
  const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/{token_id}`
747
747
  .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
748
748
  .replace(`{${"token_id"}}`, encodeURIComponent(String(tokenId)))
749
749
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
750
750
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
751
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
751
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
752
752
  let baseOptions;
753
753
  if (configuration) {
754
754
  baseOptions = configuration.baseOptions;
@@ -756,11 +756,11 @@ const NftsApiAxiosParamCreator = function (configuration) {
756
756
  const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
757
757
  const localVarHeaderParameter = {};
758
758
  const localVarQueryParameter = {};
759
- setSearchParams(localVarUrlObj, localVarQueryParameter);
759
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
760
760
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
761
761
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
762
762
  return {
763
- url: toPathString(localVarUrlObj),
763
+ url: toPathString$1(localVarUrlObj),
764
764
  options: localVarRequestOptions,
765
765
  };
766
766
  },
@@ -776,14 +776,14 @@ const NftsApiAxiosParamCreator = function (configuration) {
776
776
  */
777
777
  listNFTs: async (contractAddress, chainName, pageCursor, pageSize, options = {}) => {
778
778
  // verify required parameter 'contractAddress' is not null or undefined
779
- assertParamExists('listNFTs', 'contractAddress', contractAddress);
779
+ assertParamExists$1('listNFTs', 'contractAddress', contractAddress);
780
780
  // verify required parameter 'chainName' is not null or undefined
781
- assertParamExists('listNFTs', 'chainName', chainName);
781
+ assertParamExists$1('listNFTs', 'chainName', chainName);
782
782
  const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts`
783
783
  .replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
784
784
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
785
785
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
786
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
786
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
787
787
  let baseOptions;
788
788
  if (configuration) {
789
789
  baseOptions = configuration.baseOptions;
@@ -797,11 +797,11 @@ const NftsApiAxiosParamCreator = function (configuration) {
797
797
  if (pageSize !== undefined) {
798
798
  localVarQueryParameter['page_size'] = pageSize;
799
799
  }
800
- setSearchParams(localVarUrlObj, localVarQueryParameter);
800
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
801
801
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
802
802
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
803
803
  return {
804
- url: toPathString(localVarUrlObj),
804
+ url: toPathString$1(localVarUrlObj),
805
805
  options: localVarRequestOptions,
806
806
  };
807
807
  },
@@ -818,14 +818,14 @@ const NftsApiAxiosParamCreator = function (configuration) {
818
818
  */
819
819
  listNFTsByAccountAddress: async (accountAddress, chainName, contractAddress, pageCursor, pageSize, options = {}) => {
820
820
  // verify required parameter 'accountAddress' is not null or undefined
821
- assertParamExists('listNFTsByAccountAddress', 'accountAddress', accountAddress);
821
+ assertParamExists$1('listNFTsByAccountAddress', 'accountAddress', accountAddress);
822
822
  // verify required parameter 'chainName' is not null or undefined
823
- assertParamExists('listNFTsByAccountAddress', 'chainName', chainName);
823
+ assertParamExists$1('listNFTsByAccountAddress', 'chainName', chainName);
824
824
  const localVarPath = `/v1/chains/{chain_name}/accounts/{account_address}/nfts`
825
825
  .replace(`{${"account_address"}}`, encodeURIComponent(String(accountAddress)))
826
826
  .replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
827
827
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
828
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
828
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL$1);
829
829
  let baseOptions;
830
830
  if (configuration) {
831
831
  baseOptions = configuration.baseOptions;
@@ -842,11 +842,11 @@ const NftsApiAxiosParamCreator = function (configuration) {
842
842
  if (pageSize !== undefined) {
843
843
  localVarQueryParameter['page_size'] = pageSize;
844
844
  }
845
- setSearchParams(localVarUrlObj, localVarQueryParameter);
845
+ setSearchParams$1(localVarUrlObj, localVarQueryParameter);
846
846
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
847
847
  localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
848
848
  return {
849
- url: toPathString(localVarUrlObj),
849
+ url: toPathString$1(localVarUrlObj),
850
850
  options: localVarRequestOptions,
851
851
  };
852
852
  },
@@ -870,7 +870,7 @@ const NftsApiFp = function (configuration) {
870
870
  */
871
871
  async getNFT(contractAddress, tokenId, chainName, options) {
872
872
  const localVarAxiosArgs = await localVarAxiosParamCreator.getNFT(contractAddress, tokenId, chainName, options);
873
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
873
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
874
874
  },
875
875
  /**
876
876
  * List NFTs by contract address
@@ -884,7 +884,7 @@ const NftsApiFp = function (configuration) {
884
884
  */
885
885
  async listNFTs(contractAddress, chainName, pageCursor, pageSize, options) {
886
886
  const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTs(contractAddress, chainName, pageCursor, pageSize, options);
887
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
887
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
888
888
  },
889
889
  /**
890
890
  * List NFTs by account address
@@ -899,7 +899,7 @@ const NftsApiFp = function (configuration) {
899
899
  */
900
900
  async listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options) {
901
901
  const localVarAxiosArgs = await localVarAxiosParamCreator.listNFTsByAccountAddress(accountAddress, chainName, contractAddress, pageCursor, pageSize, options);
902
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
902
+ return createRequestFunction$1(localVarAxiosArgs, globalAxios, BASE_PATH$1, configuration);
903
903
  },
904
904
  };
905
905
  };
@@ -909,7 +909,7 @@ const NftsApiFp = function (configuration) {
909
909
  * @class NftsApi
910
910
  * @extends {BaseAPI}
911
911
  */
912
- class NftsApi extends BaseAPI {
912
+ class NftsApi extends BaseAPI$1 {
913
913
  /**
914
914
  * Get NFT by token ID
915
915
  * @summary Get NFT by token ID
@@ -958,7 +958,7 @@ class NftsApi extends BaseAPI {
958
958
  * https://openapi-generator.tech
959
959
  * Do not edit the class manually.
960
960
  */
961
- class Configuration {
961
+ let Configuration$1 = class Configuration {
962
962
  /**
963
963
  * parameter for apiKey security
964
964
  * @param name security name
@@ -1031,7 +1031,7 @@ class Configuration {
1031
1031
  const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
1032
1032
  return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
1033
1033
  }
1034
- }
1034
+ };
1035
1035
 
1036
1036
  /**
1037
1037
  * Custom Error class that is returned from the API when a request fails
@@ -1052,7 +1052,7 @@ class APIError extends Error {
1052
1052
 
1053
1053
  /* eslint-disable implicit-arrow-linebreak */
1054
1054
  const defaultHeaders = {
1055
- sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.8-alpha.1',
1055
+ sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-0.1.8-alpha.2',
1056
1056
  };
1057
1057
  /**
1058
1058
  * createAPIConfiguration to create a custom APIConfiguration
@@ -1067,7 +1067,7 @@ const createAPIConfiguration = ({ basePath, headers: baseHeaders, }) => {
1067
1067
  basePath,
1068
1068
  baseOptions: { headers },
1069
1069
  };
1070
- return new Configuration(configParams);
1070
+ return new Configuration$1(configParams);
1071
1071
  };
1072
1072
  const production$1 = () => createAPIConfiguration({
1073
1073
  basePath: 'https://indexer-mr.dev.imtbl.com/v1', // TODO update before mainnet release
@@ -1288,7 +1288,7 @@ const createImmutableXConfiguration = ({ basePath, chainID, coreContractAddress,
1288
1288
  chainID,
1289
1289
  coreContractAddress,
1290
1290
  registrationContractAddress,
1291
- sdkVersion: 'ts-immutable-sdk-0.1.8-alpha.1',
1291
+ sdkVersion: 'ts-immutable-sdk-0.1.8-alpha.2',
1292
1292
  });
1293
1293
  /**
1294
1294
  * Sets `sdkVersion` at the time of build
@@ -1863,186 +1863,606 @@ function convertToSignableToken(token) {
1863
1863
  }
1864
1864
  }
1865
1865
 
1866
- var PassportErrorType;
1867
- (function (PassportErrorType) {
1868
- PassportErrorType["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
1869
- PassportErrorType["INVALID_CONFIGURATION"] = "INVALID_CONFIGURATION";
1870
- PassportErrorType["WALLET_CONNECTION_ERROR"] = "WALLET_CONNECTION_ERROR";
1871
- PassportErrorType["NOT_LOGGED_IN_ERROR"] = "NOT_LOGGED_IN_ERROR";
1872
- PassportErrorType["SILENT_LOGIN_ERROR"] = "SILENT_LOGIN_ERROR";
1873
- PassportErrorType["REFRESH_TOKEN_ERROR"] = "REFRESH_TOKEN_ERROR";
1874
- PassportErrorType["USER_REGISTRATION_ERROR"] = "USER_REGISTRATION_ERROR";
1875
- PassportErrorType["LOGOUT_ERROR"] = "LOGOUT_ERROR";
1876
- PassportErrorType["TRANSFER_ERROR"] = "TRANSFER_ERROR";
1877
- PassportErrorType["CREATE_ORDER_ERROR"] = "CREATE_ORDER_ERROR";
1878
- PassportErrorType["CANCEL_ORDER_ERROR"] = "CANCEL_ORDER_ERROR";
1879
- PassportErrorType["EXCHANGE_TRANSFER_ERROR"] = "EXCHANGE_TRANSFER_ERROR";
1880
- PassportErrorType["CREATE_TRADE_ERROR"] = "CREATE_TRADE_ERROR";
1881
- PassportErrorType["OPERATION_NOT_SUPPORTED_ERROR"] = "OPERATION_NOT_SUPPORTED_ERROR";
1882
- })(PassportErrorType || (PassportErrorType = {}));
1883
- class PassportError extends Error {
1884
- type;
1885
- constructor(message, type) {
1886
- super(message);
1887
- this.type = type;
1866
+ /* tslint:disable */
1867
+ /* eslint-disable */
1868
+ /**
1869
+ * Swagger Guardian
1870
+ * Guardian API
1871
+ *
1872
+ * The version of the OpenAPI document: 1.0.0
1873
+ * Contact: support@immutable.com
1874
+ *
1875
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1876
+ * https://openapi-generator.tech
1877
+ * Do not edit the class manually.
1878
+ */
1879
+ const BASE_PATH = "http://guardian.sandbox.imtbl.com".replace(/\/+$/, "");
1880
+ /**
1881
+ *
1882
+ * @export
1883
+ * @class BaseAPI
1884
+ */
1885
+ class BaseAPI {
1886
+ basePath;
1887
+ axios;
1888
+ configuration;
1889
+ constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
1890
+ this.basePath = basePath;
1891
+ this.axios = axios;
1892
+ if (configuration) {
1893
+ this.configuration = configuration;
1894
+ this.basePath = configuration.basePath || this.basePath;
1895
+ }
1888
1896
  }
1889
1897
  }
1890
- const withPassportError = async (fn, customErrorType) => {
1891
- try {
1892
- return await fn();
1898
+ /**
1899
+ *
1900
+ * @export
1901
+ * @class RequiredError
1902
+ * @extends {Error}
1903
+ */
1904
+ class RequiredError extends Error {
1905
+ field;
1906
+ constructor(field, msg) {
1907
+ super(msg);
1908
+ this.field = field;
1909
+ this.name = "RequiredError";
1893
1910
  }
1894
- catch (error) {
1895
- const errorMessage = `${customErrorType}: ${error.message}` || 'UnknownError';
1896
- throw new PassportError(errorMessage, customErrorType);
1911
+ }
1912
+
1913
+ /* tslint:disable */
1914
+ /* eslint-disable */
1915
+ /**
1916
+ * Swagger Guardian
1917
+ * Guardian API
1918
+ *
1919
+ * The version of the OpenAPI document: 1.0.0
1920
+ * Contact: support@immutable.com
1921
+ *
1922
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1923
+ * https://openapi-generator.tech
1924
+ * Do not edit the class manually.
1925
+ */
1926
+ /**
1927
+ *
1928
+ * @export
1929
+ */
1930
+ const DUMMY_BASE_URL = 'https://example.com';
1931
+ /**
1932
+ *
1933
+ * @throws {RequiredError}
1934
+ * @export
1935
+ */
1936
+ const assertParamExists = function (functionName, paramName, paramValue) {
1937
+ if (paramValue === null || paramValue === undefined) {
1938
+ throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
1897
1939
  }
1898
1940
  };
1899
-
1900
- const POLL_INTERVAL = 1 * 1000; // every 1 second
1901
- const MAX_RETRIES = 3;
1902
- const wait = (ms) => new Promise((resolve) => {
1903
- setTimeout(() => resolve(), ms);
1904
- });
1905
- const retryWithDelay = async (fn, options) => {
1906
- const { retries = MAX_RETRIES, interval = POLL_INTERVAL, finalErr = Error('Retry failed'), } = options || {};
1907
- try {
1908
- return await fn();
1941
+ /**
1942
+ *
1943
+ * @export
1944
+ */
1945
+ const setBearerAuthToObject = async function (object, configuration) {
1946
+ if (configuration && configuration.accessToken) {
1947
+ const accessToken = typeof configuration.accessToken === 'function'
1948
+ ? await configuration.accessToken()
1949
+ : await configuration.accessToken;
1950
+ object["Authorization"] = "Bearer " + accessToken;
1909
1951
  }
1910
- catch (err) {
1911
- if (retries <= 0) {
1912
- return Promise.reject(finalErr);
1952
+ };
1953
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
1954
+ if (parameter == null)
1955
+ return;
1956
+ if (typeof parameter === "object") {
1957
+ if (Array.isArray(parameter)) {
1958
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
1959
+ }
1960
+ else {
1961
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
1913
1962
  }
1914
- await wait(interval);
1915
- return retryWithDelay(fn, { retries: retries - 1, finalErr });
1916
1963
  }
1917
- };
1918
-
1919
- const getAuthConfiguration = ({ oidcConfiguration, authenticationDomain, }) => {
1920
- const baseConfiguration = {
1921
- authority: authenticationDomain,
1922
- redirect_uri: oidcConfiguration.redirectUri,
1923
- popup_redirect_uri: oidcConfiguration.redirectUri,
1924
- client_id: oidcConfiguration.clientId,
1925
- metadata: {
1926
- authorization_endpoint: `${authenticationDomain}/authorize`,
1927
- token_endpoint: `${authenticationDomain}/oauth/token`,
1928
- userinfo_endpoint: `${authenticationDomain}/userinfo`,
1929
- end_session_endpoint: `${authenticationDomain}/v2/logout`
1930
- + `?returnTo=${encodeURIComponent(oidcConfiguration.logoutRedirectUri)}`
1931
- + `&client_id=${oidcConfiguration.clientId}`,
1932
- },
1933
- mergeClaims: true,
1934
- loadUserInfo: true,
1935
- scope: oidcConfiguration.scope,
1936
- };
1937
- if (oidcConfiguration.audience) {
1938
- baseConfiguration.extraQueryParams = {
1939
- audience: oidcConfiguration.audience,
1940
- };
1964
+ else {
1965
+ if (urlSearchParams.has(key)) {
1966
+ urlSearchParams.append(key, parameter);
1967
+ }
1968
+ else {
1969
+ urlSearchParams.set(key, parameter);
1970
+ }
1941
1971
  }
1942
- return baseConfiguration;
1972
+ }
1973
+ /**
1974
+ *
1975
+ * @export
1976
+ */
1977
+ const setSearchParams = function (url, ...objects) {
1978
+ const searchParams = new URLSearchParams(url.search);
1979
+ setFlattenedQueryParams(searchParams, objects);
1980
+ url.search = searchParams.toString();
1943
1981
  };
1944
- class AuthManager {
1945
- userManager;
1946
- config;
1947
- constructor(config) {
1948
- this.config = config;
1949
- this.userManager = new UserManager(getAuthConfiguration(config));
1950
- }
1951
- static mapOidcUserToDomainModel = (oidcUser) => {
1952
- const passport = oidcUser.profile?.passport;
1953
- return {
1954
- expired: oidcUser.expired,
1955
- idToken: oidcUser.id_token,
1956
- accessToken: oidcUser.access_token,
1957
- refreshToken: oidcUser.refresh_token,
1958
- profile: {
1959
- sub: oidcUser.profile.sub,
1960
- email: oidcUser.profile.email,
1961
- nickname: oidcUser.profile.nickname,
1962
- },
1963
- etherKey: passport?.ether_key || '',
1964
- };
1982
+ /**
1983
+ *
1984
+ * @export
1985
+ */
1986
+ const toPathString = function (url) {
1987
+ return url.pathname + url.search + url.hash;
1988
+ };
1989
+ /**
1990
+ *
1991
+ * @export
1992
+ */
1993
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
1994
+ return (axios = globalAxios, basePath = BASE_PATH) => {
1995
+ const axiosRequestArgs = { ...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url };
1996
+ return axios.request(axiosRequestArgs);
1965
1997
  };
1966
- async login() {
1967
- return withPassportError(async () => {
1968
- const popupWindowFeatures = { width: 410, height: 450 };
1969
- const oidcUser = await this.userManager.signinPopup({
1970
- popupWindowFeatures,
1971
- });
1972
- return AuthManager.mapOidcUserToDomainModel(oidcUser);
1973
- }, PassportErrorType.AUTHENTICATION_ERROR);
1974
- }
1975
- async loginCallback() {
1976
- return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
1977
- }
1978
- async logout() {
1979
- return withPassportError(async () => this.userManager.signoutRedirect(), PassportErrorType.LOGOUT_ERROR);
1980
- }
1981
- async loginSilent() {
1982
- return withPassportError(async () => {
1983
- const existedUser = await this.getUser();
1984
- if (!existedUser) {
1985
- return null;
1986
- }
1987
- const oidcUser = await this.userManager.signinSilent();
1988
- if (!oidcUser) {
1989
- return null;
1998
+ };
1999
+
2000
+ /* tslint:disable */
2001
+ /* eslint-disable */
2002
+ /**
2003
+ * Swagger Guardian
2004
+ * Guardian API
2005
+ *
2006
+ * The version of the OpenAPI document: 1.0.0
2007
+ * Contact: support@immutable.com
2008
+ *
2009
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2010
+ * https://openapi-generator.tech
2011
+ * Do not edit the class manually.
2012
+ */
2013
+ /**
2014
+ * StarkexTransactionsApi - axios parameter creator
2015
+ * @export
2016
+ */
2017
+ const StarkexTransactionsApiAxiosParamCreator = function (configuration) {
2018
+ return {
2019
+ /**
2020
+ * Check if it is a valid transaction by payload hash
2021
+ * @summary Evaluate if it is an valid transaction
2022
+ * @param {string} payloadHash Hash for the payload
2023
+ * @param {*} [options] Override http request option.
2024
+ * @throws {RequiredError}
2025
+ */
2026
+ evaluateStarkexTransaction: async (payloadHash, options = {}) => {
2027
+ // verify required parameter 'payloadHash' is not null or undefined
2028
+ assertParamExists('evaluateStarkexTransaction', 'payloadHash', payloadHash);
2029
+ const localVarPath = `/guardian/v1/starkex/evaluate/{payloadHash}`
2030
+ .replace(`{${"payloadHash"}}`, encodeURIComponent(String(payloadHash)));
2031
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2032
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2033
+ let baseOptions;
2034
+ if (configuration) {
2035
+ baseOptions = configuration.baseOptions;
1990
2036
  }
1991
- return AuthManager.mapOidcUserToDomainModel(oidcUser);
1992
- }, PassportErrorType.SILENT_LOGIN_ERROR);
2037
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2038
+ const localVarHeaderParameter = {};
2039
+ const localVarQueryParameter = {};
2040
+ // authentication BearerAuth required
2041
+ // http bearer authentication required
2042
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
2043
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2044
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2045
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2046
+ return {
2047
+ url: toPathString(localVarUrlObj),
2048
+ options: localVarRequestOptions,
2049
+ };
2050
+ },
2051
+ };
2052
+ };
2053
+ /**
2054
+ * StarkexTransactionsApi - functional programming interface
2055
+ * @export
2056
+ */
2057
+ const StarkexTransactionsApiFp = function (configuration) {
2058
+ const localVarAxiosParamCreator = StarkexTransactionsApiAxiosParamCreator(configuration);
2059
+ return {
2060
+ /**
2061
+ * Check if it is a valid transaction by payload hash
2062
+ * @summary Evaluate if it is an valid transaction
2063
+ * @param {string} payloadHash Hash for the payload
2064
+ * @param {*} [options] Override http request option.
2065
+ * @throws {RequiredError}
2066
+ */
2067
+ async evaluateStarkexTransaction(payloadHash, options) {
2068
+ const localVarAxiosArgs = await localVarAxiosParamCreator.evaluateStarkexTransaction(payloadHash, options);
2069
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2070
+ },
2071
+ };
2072
+ };
2073
+ /**
2074
+ * StarkexTransactionsApi - object-oriented interface
2075
+ * @export
2076
+ * @class StarkexTransactionsApi
2077
+ * @extends {BaseAPI}
2078
+ */
2079
+ class StarkexTransactionsApi extends BaseAPI {
2080
+ /**
2081
+ * Check if it is a valid transaction by payload hash
2082
+ * @summary Evaluate if it is an valid transaction
2083
+ * @param {StarkexTransactionsApiEvaluateStarkexTransactionRequest} requestParameters Request parameters.
2084
+ * @param {*} [options] Override http request option.
2085
+ * @throws {RequiredError}
2086
+ * @memberof StarkexTransactionsApi
2087
+ */
2088
+ evaluateStarkexTransaction(requestParameters, options) {
2089
+ return StarkexTransactionsApiFp(this.configuration).evaluateStarkexTransaction(requestParameters.payloadHash, options).then((request) => request(this.axios, this.basePath));
1993
2090
  }
1994
- async getUser() {
1995
- return withPassportError(async () => {
1996
- const oidcUser = await this.userManager.getUser();
1997
- if (!oidcUser) {
1998
- return null;
2091
+ }
2092
+
2093
+ /* tslint:disable */
2094
+ /* eslint-disable */
2095
+ /**
2096
+ * Swagger Guardian
2097
+ * Guardian API
2098
+ *
2099
+ * The version of the OpenAPI document: 1.0.0
2100
+ * Contact: support@immutable.com
2101
+ *
2102
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2103
+ * https://openapi-generator.tech
2104
+ * Do not edit the class manually.
2105
+ */
2106
+ /**
2107
+ * TransactionsApi - axios parameter creator
2108
+ * @export
2109
+ */
2110
+ const TransactionsApiAxiosParamCreator = function (configuration) {
2111
+ return {
2112
+ /**
2113
+ * Get a transaction by payload hash
2114
+ * @summary Info for a specific transaction
2115
+ * @param {string} transactionID The id of the starkex transaction to retrieve
2116
+ * @param {string} chainType roll up type
2117
+ * @param {number} [chainID] ID of evm chain
2118
+ * @param {*} [options] Override http request option.
2119
+ * @throws {RequiredError}
2120
+ */
2121
+ getTransactionByID: async (transactionID, chainType, chainID, options = {}) => {
2122
+ // verify required parameter 'transactionID' is not null or undefined
2123
+ assertParamExists('getTransactionByID', 'transactionID', transactionID);
2124
+ // verify required parameter 'chainType' is not null or undefined
2125
+ assertParamExists('getTransactionByID', 'chainType', chainType);
2126
+ const localVarPath = `/guardian/v1/transactions/{transactionID}`
2127
+ .replace(`{${"transactionID"}}`, encodeURIComponent(String(transactionID)));
2128
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2129
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2130
+ let baseOptions;
2131
+ if (configuration) {
2132
+ baseOptions = configuration.baseOptions;
1999
2133
  }
2000
- return AuthManager.mapOidcUserToDomainModel(oidcUser);
2001
- }, PassportErrorType.NOT_LOGGED_IN_ERROR);
2002
- }
2003
- async requestRefreshTokenAfterRegistration() {
2004
- return withPassportError(async () => {
2005
- const updatedUser = await retryWithDelay(async () => {
2006
- const user = await this.userManager.signinSilent();
2007
- const passportMetadata = user?.profile?.passport;
2008
- const metadataExists = !!passportMetadata?.ether_key
2009
- && !!passportMetadata?.stark_key
2010
- && !!passportMetadata?.user_admin_key;
2011
- if (metadataExists) {
2012
- return user;
2013
- }
2014
- return Promise.reject(new Error('user wallet addresses not exist'));
2015
- });
2016
- if (!updatedUser) {
2017
- return null;
2134
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2135
+ const localVarHeaderParameter = {};
2136
+ const localVarQueryParameter = {};
2137
+ // authentication BearerAuth required
2138
+ // http bearer authentication required
2139
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
2140
+ if (chainType !== undefined) {
2141
+ localVarQueryParameter['chainType'] = chainType;
2018
2142
  }
2019
- return AuthManager.mapOidcUserToDomainModel(updatedUser);
2020
- }, PassportErrorType.REFRESH_TOKEN_ERROR);
2143
+ if (chainID !== undefined) {
2144
+ localVarQueryParameter['chainID'] = chainID;
2145
+ }
2146
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2147
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2148
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2149
+ return {
2150
+ url: toPathString(localVarUrlObj),
2151
+ options: localVarRequestOptions,
2152
+ };
2153
+ },
2154
+ };
2155
+ };
2156
+ /**
2157
+ * TransactionsApi - functional programming interface
2158
+ * @export
2159
+ */
2160
+ const TransactionsApiFp = function (configuration) {
2161
+ const localVarAxiosParamCreator = TransactionsApiAxiosParamCreator(configuration);
2162
+ return {
2163
+ /**
2164
+ * Get a transaction by payload hash
2165
+ * @summary Info for a specific transaction
2166
+ * @param {string} transactionID The id of the starkex transaction to retrieve
2167
+ * @param {string} chainType roll up type
2168
+ * @param {number} [chainID] ID of evm chain
2169
+ * @param {*} [options] Override http request option.
2170
+ * @throws {RequiredError}
2171
+ */
2172
+ async getTransactionByID(transactionID, chainType, chainID, options) {
2173
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getTransactionByID(transactionID, chainType, chainID, options);
2174
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
2175
+ },
2176
+ };
2177
+ };
2178
+ /**
2179
+ * TransactionsApi - object-oriented interface
2180
+ * @export
2181
+ * @class TransactionsApi
2182
+ * @extends {BaseAPI}
2183
+ */
2184
+ class TransactionsApi extends BaseAPI {
2185
+ /**
2186
+ * Get a transaction by payload hash
2187
+ * @summary Info for a specific transaction
2188
+ * @param {TransactionsApiGetTransactionByIDRequest} requestParameters Request parameters.
2189
+ * @param {*} [options] Override http request option.
2190
+ * @throws {RequiredError}
2191
+ * @memberof TransactionsApi
2192
+ */
2193
+ getTransactionByID(requestParameters, options) {
2194
+ return TransactionsApiFp(this.configuration).getTransactionByID(requestParameters.transactionID, requestParameters.chainType, requestParameters.chainID, options).then((request) => request(this.axios, this.basePath));
2021
2195
  }
2022
2196
  }
2023
2197
 
2024
- class MagicAdapter {
2025
- magicClient;
2026
- config;
2027
- constructor(config) {
2028
- this.config = config;
2029
- this.magicClient = new Magic(config.magicPublishableApiKey, {
2030
- network: config.network,
2031
- extensions: [new OpenIdExtension()],
2032
- });
2033
- }
2034
- async login(idToken) {
2035
- return withPassportError(async () => {
2036
- await this.magicClient.openid.loginWithOIDC({
2037
- jwt: idToken,
2038
- providerId: this.config.magicProviderId,
2039
- });
2040
- return new ethers.providers.Web3Provider(this.magicClient
2041
- .rpcProvider);
2042
- }, PassportErrorType.WALLET_CONNECTION_ERROR);
2198
+ /* tslint:disable */
2199
+ /* eslint-disable */
2200
+ /**
2201
+ * Swagger Guardian
2202
+ * Guardian API
2203
+ *
2204
+ * The version of the OpenAPI document: 1.0.0
2205
+ * Contact: support@immutable.com
2206
+ *
2207
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2208
+ * https://openapi-generator.tech
2209
+ * Do not edit the class manually.
2210
+ */
2211
+ class Configuration {
2212
+ /**
2213
+ * parameter for apiKey security
2214
+ * @param name security name
2215
+ * @memberof Configuration
2216
+ */
2217
+ apiKey;
2218
+ /**
2219
+ * parameter for basic security
2220
+ *
2221
+ * @type {string}
2222
+ * @memberof Configuration
2223
+ */
2224
+ username;
2225
+ /**
2226
+ * parameter for basic security
2227
+ *
2228
+ * @type {string}
2229
+ * @memberof Configuration
2230
+ */
2231
+ password;
2232
+ /**
2233
+ * parameter for oauth2 security
2234
+ * @param name security name
2235
+ * @param scopes oauth2 scope
2236
+ * @memberof Configuration
2237
+ */
2238
+ accessToken;
2239
+ /**
2240
+ * override base path
2241
+ *
2242
+ * @type {string}
2243
+ * @memberof Configuration
2244
+ */
2245
+ basePath;
2246
+ /**
2247
+ * base options for axios calls
2248
+ *
2249
+ * @type {any}
2250
+ * @memberof Configuration
2251
+ */
2252
+ baseOptions;
2253
+ /**
2254
+ * The FormData constructor that will be used to create multipart form data
2255
+ * requests. You can inject this here so that execution environments that
2256
+ * do not support the FormData class can still run the generated client.
2257
+ *
2258
+ * @type {new () => FormData}
2259
+ */
2260
+ formDataCtor;
2261
+ constructor(param = {}) {
2262
+ this.apiKey = param.apiKey;
2263
+ this.username = param.username;
2264
+ this.password = param.password;
2265
+ this.accessToken = param.accessToken;
2266
+ this.basePath = param.basePath;
2267
+ this.baseOptions = param.baseOptions;
2268
+ this.formDataCtor = param.formDataCtor;
2043
2269
  }
2044
- }
2045
-
2270
+ /**
2271
+ * Check if the given MIME is a JSON MIME.
2272
+ * JSON MIME examples:
2273
+ * application/json
2274
+ * application/json; charset=UTF8
2275
+ * APPLICATION/JSON
2276
+ * application/vnd.company+json
2277
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
2278
+ * @return True if the given MIME is JSON, false otherwise.
2279
+ */
2280
+ isJsonMime(mime) {
2281
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
2282
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
2283
+ }
2284
+ }
2285
+
2286
+ var PassportErrorType;
2287
+ (function (PassportErrorType) {
2288
+ PassportErrorType["AUTHENTICATION_ERROR"] = "AUTHENTICATION_ERROR";
2289
+ PassportErrorType["INVALID_CONFIGURATION"] = "INVALID_CONFIGURATION";
2290
+ PassportErrorType["WALLET_CONNECTION_ERROR"] = "WALLET_CONNECTION_ERROR";
2291
+ PassportErrorType["NOT_LOGGED_IN_ERROR"] = "NOT_LOGGED_IN_ERROR";
2292
+ PassportErrorType["SILENT_LOGIN_ERROR"] = "SILENT_LOGIN_ERROR";
2293
+ PassportErrorType["REFRESH_TOKEN_ERROR"] = "REFRESH_TOKEN_ERROR";
2294
+ PassportErrorType["USER_REGISTRATION_ERROR"] = "USER_REGISTRATION_ERROR";
2295
+ PassportErrorType["LOGOUT_ERROR"] = "LOGOUT_ERROR";
2296
+ PassportErrorType["TRANSFER_ERROR"] = "TRANSFER_ERROR";
2297
+ PassportErrorType["CREATE_ORDER_ERROR"] = "CREATE_ORDER_ERROR";
2298
+ PassportErrorType["CANCEL_ORDER_ERROR"] = "CANCEL_ORDER_ERROR";
2299
+ PassportErrorType["EXCHANGE_TRANSFER_ERROR"] = "EXCHANGE_TRANSFER_ERROR";
2300
+ PassportErrorType["CREATE_TRADE_ERROR"] = "CREATE_TRADE_ERROR";
2301
+ PassportErrorType["OPERATION_NOT_SUPPORTED_ERROR"] = "OPERATION_NOT_SUPPORTED_ERROR";
2302
+ })(PassportErrorType || (PassportErrorType = {}));
2303
+ class PassportError extends Error {
2304
+ type;
2305
+ constructor(message, type) {
2306
+ super(message);
2307
+ this.type = type;
2308
+ }
2309
+ }
2310
+ const withPassportError = async (fn, customErrorType) => {
2311
+ try {
2312
+ return await fn();
2313
+ }
2314
+ catch (error) {
2315
+ const errorMessage = `${customErrorType}: ${error.message}` || 'UnknownError';
2316
+ throw new PassportError(errorMessage, customErrorType);
2317
+ }
2318
+ };
2319
+
2320
+ const POLL_INTERVAL = 1 * 1000; // every 1 second
2321
+ const MAX_RETRIES = 3;
2322
+ const wait = (ms) => new Promise((resolve) => {
2323
+ setTimeout(() => resolve(), ms);
2324
+ });
2325
+ const retryWithDelay = async (fn, options) => {
2326
+ const { retries = MAX_RETRIES, interval = POLL_INTERVAL, finalErr = Error('Retry failed'), } = options || {};
2327
+ try {
2328
+ return await fn();
2329
+ }
2330
+ catch (err) {
2331
+ if (retries <= 0) {
2332
+ return Promise.reject(finalErr);
2333
+ }
2334
+ await wait(interval);
2335
+ return retryWithDelay(fn, { retries: retries - 1, finalErr });
2336
+ }
2337
+ };
2338
+
2339
+ const getAuthConfiguration = ({ oidcConfiguration, authenticationDomain, }) => {
2340
+ const baseConfiguration = {
2341
+ authority: authenticationDomain,
2342
+ redirect_uri: oidcConfiguration.redirectUri,
2343
+ popup_redirect_uri: oidcConfiguration.redirectUri,
2344
+ client_id: oidcConfiguration.clientId,
2345
+ metadata: {
2346
+ authorization_endpoint: `${authenticationDomain}/authorize`,
2347
+ token_endpoint: `${authenticationDomain}/oauth/token`,
2348
+ userinfo_endpoint: `${authenticationDomain}/userinfo`,
2349
+ end_session_endpoint: `${authenticationDomain}/v2/logout`
2350
+ + `?returnTo=${encodeURIComponent(oidcConfiguration.logoutRedirectUri)}`
2351
+ + `&client_id=${oidcConfiguration.clientId}`,
2352
+ },
2353
+ mergeClaims: true,
2354
+ loadUserInfo: true,
2355
+ scope: oidcConfiguration.scope,
2356
+ };
2357
+ if (oidcConfiguration.audience) {
2358
+ baseConfiguration.extraQueryParams = {
2359
+ audience: oidcConfiguration.audience,
2360
+ };
2361
+ }
2362
+ return baseConfiguration;
2363
+ };
2364
+ class AuthManager {
2365
+ userManager;
2366
+ config;
2367
+ constructor(config) {
2368
+ this.config = config;
2369
+ this.userManager = new UserManager(getAuthConfiguration(config));
2370
+ }
2371
+ static mapOidcUserToDomainModel = (oidcUser) => {
2372
+ const passport = oidcUser.profile?.passport;
2373
+ return {
2374
+ expired: oidcUser.expired,
2375
+ idToken: oidcUser.id_token,
2376
+ accessToken: oidcUser.access_token,
2377
+ refreshToken: oidcUser.refresh_token,
2378
+ profile: {
2379
+ sub: oidcUser.profile.sub,
2380
+ email: oidcUser.profile.email,
2381
+ nickname: oidcUser.profile.nickname,
2382
+ },
2383
+ etherKey: passport?.ether_key || '',
2384
+ };
2385
+ };
2386
+ async login() {
2387
+ return withPassportError(async () => {
2388
+ const popupWindowFeatures = { width: 410, height: 450 };
2389
+ const oidcUser = await this.userManager.signinPopup({
2390
+ popupWindowFeatures,
2391
+ });
2392
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
2393
+ }, PassportErrorType.AUTHENTICATION_ERROR);
2394
+ }
2395
+ async loginCallback() {
2396
+ return withPassportError(async () => this.userManager.signinPopupCallback(), PassportErrorType.AUTHENTICATION_ERROR);
2397
+ }
2398
+ async logout() {
2399
+ return withPassportError(async () => this.userManager.signoutRedirect(), PassportErrorType.LOGOUT_ERROR);
2400
+ }
2401
+ async loginSilent() {
2402
+ return withPassportError(async () => {
2403
+ const existedUser = await this.getUser();
2404
+ if (!existedUser) {
2405
+ return null;
2406
+ }
2407
+ const oidcUser = await this.userManager.signinSilent();
2408
+ if (!oidcUser) {
2409
+ return null;
2410
+ }
2411
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
2412
+ }, PassportErrorType.SILENT_LOGIN_ERROR);
2413
+ }
2414
+ async getUser() {
2415
+ return withPassportError(async () => {
2416
+ const oidcUser = await this.userManager.getUser();
2417
+ if (!oidcUser) {
2418
+ return null;
2419
+ }
2420
+ return AuthManager.mapOidcUserToDomainModel(oidcUser);
2421
+ }, PassportErrorType.NOT_LOGGED_IN_ERROR);
2422
+ }
2423
+ async requestRefreshTokenAfterRegistration() {
2424
+ return withPassportError(async () => {
2425
+ const updatedUser = await retryWithDelay(async () => {
2426
+ const user = await this.userManager.signinSilent();
2427
+ const passportMetadata = user?.profile?.passport;
2428
+ const metadataExists = !!passportMetadata?.ether_key
2429
+ && !!passportMetadata?.stark_key
2430
+ && !!passportMetadata?.user_admin_key;
2431
+ if (metadataExists) {
2432
+ return user;
2433
+ }
2434
+ return Promise.reject(new Error('user wallet addresses not exist'));
2435
+ });
2436
+ if (!updatedUser) {
2437
+ return null;
2438
+ }
2439
+ return AuthManager.mapOidcUserToDomainModel(updatedUser);
2440
+ }, PassportErrorType.REFRESH_TOKEN_ERROR);
2441
+ }
2442
+ }
2443
+
2444
+ class MagicAdapter {
2445
+ magicClient;
2446
+ config;
2447
+ constructor(config) {
2448
+ this.config = config;
2449
+ this.magicClient = new Magic(config.magicPublishableApiKey, {
2450
+ network: config.network,
2451
+ extensions: [new OpenIdExtension()],
2452
+ });
2453
+ }
2454
+ async login(idToken) {
2455
+ return withPassportError(async () => {
2456
+ await this.magicClient.openid.loginWithOIDC({
2457
+ jwt: idToken,
2458
+ providerId: this.config.magicProviderId,
2459
+ });
2460
+ return new ethers.providers.Web3Provider(this.magicClient
2461
+ .rpcProvider);
2462
+ }, PassportErrorType.WALLET_CONNECTION_ERROR);
2463
+ }
2464
+ }
2465
+
2046
2466
  var ReceiveMessage;
2047
2467
  (function (ReceiveMessage) {
2048
2468
  ReceiveMessage["CONFIRMATION_WINDOW_READY"] = "confirmation_window_ready";
@@ -2142,10 +2562,78 @@ class ConfirmationScreen {
2142
2562
  }, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
2143
2563
  });
2144
2564
  }
2565
+ startGuardianTransaction(transactionId, popupOptions) {
2566
+ return new Promise((resolve, reject) => {
2567
+ const messageHandler = ({ data, origin }) => {
2568
+ if (origin !== this.config.passportDomain
2569
+ || data.eventType !== PASSPORT_EVENT_TYPE) {
2570
+ return;
2571
+ }
2572
+ switch (data.messageType) {
2573
+ case ReceiveMessage.CONFIRMATION_WINDOW_READY: {
2574
+ break;
2575
+ }
2576
+ case ReceiveMessage.TRANSACTION_CONFIRMED: {
2577
+ resolve({ confirmed: true });
2578
+ break;
2579
+ }
2580
+ case ReceiveMessage.TRANSACTION_ERROR: {
2581
+ reject(new Error('Transaction error'));
2582
+ break;
2583
+ }
2584
+ default:
2585
+ reject(new Error('Unsupported message type'));
2586
+ }
2587
+ };
2588
+ window.addEventListener('message', messageHandler);
2589
+ const confirmationWindow = openPopupCenter({
2590
+ // eslint-disable-next-line max-len
2591
+ url: `${this.config.passportDomain}/transaction-confirmation/transaction.html?transactionId=${transactionId}&chainType=starkex`,
2592
+ title: CONFIRMATION_WINDOW_TITLE,
2593
+ width: popupOptions?.width || CONFIRMATION_WINDOW_WIDTH,
2594
+ height: popupOptions?.height || CONFIRMATION_WINDOW_HEIGHT,
2595
+ });
2596
+ // https://stackoverflow.com/questions/9388380/capture-the-close-event-of-popup-window-in-javascript/48240128#48240128
2597
+ const timer = setInterval(() => {
2598
+ if (confirmationWindow.closed) {
2599
+ clearInterval(timer);
2600
+ window.removeEventListener('message', messageHandler);
2601
+ resolve({ confirmed: false });
2602
+ }
2603
+ }, CONFIRMATION_WINDOW_CLOSED_POLLING_DURATION);
2604
+ });
2605
+ }
2145
2606
  }
2146
2607
 
2147
2608
  const ERC721$1 = 'ERC721';
2148
- async function transfer$1({ request, transfersApi, starkSigner, user, confirmationScreen, }) {
2609
+ const transferWithGuardian = async ({ accessToken, imxPublicApiDomain, payloadHash, confirmationScreen, }) => {
2610
+ const transactionAPI = new TransactionsApi(new Configuration({
2611
+ accessToken,
2612
+ basePath: imxPublicApiDomain,
2613
+ }));
2614
+ const starkExTransactionApi = new StarkexTransactionsApi(new Configuration({
2615
+ accessToken,
2616
+ basePath: imxPublicApiDomain,
2617
+ }));
2618
+ const transactionRes = await retryWithDelay(async () => transactionAPI.getTransactionByID({
2619
+ transactionID: payloadHash,
2620
+ chainType: 'starkex',
2621
+ }));
2622
+ if (!transactionRes.data.id) {
2623
+ throw new Error("Transaction doesn't exists");
2624
+ }
2625
+ const evaluateStarkexRes = await starkExTransactionApi.evaluateStarkexTransaction({
2626
+ payloadHash,
2627
+ });
2628
+ const { confirmationRequired } = evaluateStarkexRes.data;
2629
+ if (confirmationRequired) {
2630
+ const confirmationResult = await confirmationScreen.startGuardianTransaction(payloadHash);
2631
+ if (!confirmationResult.confirmed) {
2632
+ throw new Error('Transaction rejected by user');
2633
+ }
2634
+ }
2635
+ };
2636
+ async function transfer$1({ request, transfersApi, starkSigner, user, imxPublicApiDomain, confirmationScreen, }) {
2149
2637
  return withPassportError(async () => {
2150
2638
  const transferAmount = request.type === ERC721$1 ? '1' : request.amount;
2151
2639
  const getSignableTransferRequest = {
@@ -2154,16 +2642,18 @@ async function transfer$1({ request, transfersApi, starkSigner, user, confirmati
2154
2642
  amount: transferAmount,
2155
2643
  receiver: request.receiver,
2156
2644
  };
2645
+ const headers = {
2646
+ Authorization: `Bearer ${user.accessToken}`,
2647
+ };
2157
2648
  const signableResult = await transfersApi.getSignableTransferV1({
2158
2649
  getSignableTransferRequest,
2650
+ }, { headers });
2651
+ await transferWithGuardian({
2652
+ imxPublicApiDomain,
2653
+ accessToken: user.accessToken,
2654
+ payloadHash: signableResult.data.payload_hash,
2655
+ confirmationScreen,
2159
2656
  });
2160
- const confirmationResult = await confirmationScreen.startTransaction(user.accessToken, {
2161
- transactionType: TransactionTypes.createTransfer,
2162
- transactionData: getSignableTransferRequest,
2163
- });
2164
- if (!confirmationResult.confirmed) {
2165
- throw new Error('Transaction rejected by user');
2166
- }
2167
2657
  const signableResultData = signableResult.data;
2168
2658
  const { payload_hash: payloadHash } = signableResultData;
2169
2659
  const starkSignature = await starkSigner.signMessage(payloadHash);
@@ -2182,10 +2672,6 @@ async function transfer$1({ request, transfersApi, starkSigner, user, confirmati
2182
2672
  const createTransferRequest = {
2183
2673
  createTransferRequest: transferSigningParams,
2184
2674
  };
2185
- const headers = {
2186
- // eslint-disable-next-line @typescript-eslint/naming-convention
2187
- Authorization: `Bearer ${user.accessToken}`,
2188
- };
2189
2675
  const { data: responseData } = await transfersApi.createTransferV1(createTransferRequest, { headers });
2190
2676
  return {
2191
2677
  sent_signature: responseData.sent_signature,
@@ -2441,10 +2927,12 @@ class PassportImxProvider {
2441
2927
  starkSigner;
2442
2928
  immutableXClient;
2443
2929
  confirmationScreen;
2444
- constructor({ user, starkSigner, immutableXClient, confirmationScreen, }) {
2930
+ imxPublicApiDomain;
2931
+ constructor({ user, starkSigner, immutableXClient, imxPublicApiDomain, confirmationScreen, }) {
2445
2932
  this.user = user;
2446
2933
  this.starkSigner = starkSigner;
2447
2934
  this.immutableXClient = immutableXClient;
2935
+ this.imxPublicApiDomain = imxPublicApiDomain;
2448
2936
  this.confirmationScreen = confirmationScreen;
2449
2937
  }
2450
2938
  async transfer(request) {
@@ -2454,6 +2942,7 @@ class PassportImxProvider {
2454
2942
  starkSigner: this.starkSigner,
2455
2943
  transfersApi: this.immutableXClient.transfersApi,
2456
2944
  confirmationScreen: this.confirmationScreen,
2945
+ imxPublicApiDomain: this.imxPublicApiDomain,
2457
2946
  });
2458
2947
  }
2459
2948
  // TODO: Remove once implemented
@@ -2556,6 +3045,7 @@ class PassportConfiguration {
2556
3045
  network;
2557
3046
  authenticationDomain;
2558
3047
  passportDomain;
3048
+ imxPublicApiDomain;
2559
3049
  magicPublishableApiKey;
2560
3050
  magicProviderId;
2561
3051
  oidcConfiguration;
@@ -2575,10 +3065,12 @@ class PassportConfiguration {
2575
3065
  'magicPublishableApiKey',
2576
3066
  'magicProviderId',
2577
3067
  'passportDomain',
3068
+ 'imxPublicApiDomain',
2578
3069
  ], 'overrides');
2579
3070
  this.network = overrides.network;
2580
3071
  this.authenticationDomain = overrides.authenticationDomain;
2581
3072
  this.passportDomain = overrides.passportDomain;
3073
+ this.imxPublicApiDomain = overrides.imxPublicApiDomain;
2582
3074
  this.magicPublishableApiKey = overrides.magicPublishableApiKey;
2583
3075
  this.magicProviderId = overrides.magicProviderId;
2584
3076
  }
@@ -2590,6 +3082,7 @@ class PassportConfiguration {
2590
3082
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
2591
3083
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
2592
3084
  this.passportDomain = 'https://passport.immutable.com';
3085
+ this.imxPublicApiDomain = 'https://api.immutable.com';
2593
3086
  break;
2594
3087
  }
2595
3088
  case Environment.SANDBOX:
@@ -2599,6 +3092,7 @@ class PassportConfiguration {
2599
3092
  this.magicPublishableApiKey = 'pk_live_10F423798A540ED7';
2600
3093
  this.magicProviderId = 'fSMzaRQ4O7p4fttl7pCyGVtJS_G70P8SNsLXtPPGHo0=';
2601
3094
  this.passportDomain = 'https://passport.sandbox.immutable.com';
3095
+ this.imxPublicApiDomain = 'https://api.sandbox.immutable.com';
2602
3096
  break;
2603
3097
  }
2604
3098
  }
@@ -2668,6 +3162,7 @@ class Passport {
2668
3162
  user: updatedUser,
2669
3163
  starkSigner,
2670
3164
  immutableXClient: this.immutableXClient,
3165
+ imxPublicApiDomain: this.config.imxPublicApiDomain,
2671
3166
  confirmationScreen: this.confirmationScreen,
2672
3167
  });
2673
3168
  }
@@ -2676,6 +3171,7 @@ class Passport {
2676
3171
  user: userWithEtherKey,
2677
3172
  starkSigner,
2678
3173
  immutableXClient: this.immutableXClient,
3174
+ imxPublicApiDomain: this.config.imxPublicApiDomain,
2679
3175
  confirmationScreen: this.confirmationScreen,
2680
3176
  });
2681
3177
  }
@@ -3616,7 +4112,7 @@ class ERC721 {
3616
4112
  /* Autogenerated file. Do not edit manually. */
3617
4113
  /* tslint:disable */
3618
4114
  /* eslint-disable */
3619
- const _abi = [
4115
+ const _abi$2 = [
3620
4116
  {
3621
4117
  inputs: [
3622
4118
  {
@@ -4505,12 +5001,12 @@ const _abi = [
4505
5001
  },
4506
5002
  ];
4507
5003
  class ImmutableERC721Base__factory {
4508
- static abi = _abi;
5004
+ static abi = _abi$2;
4509
5005
  static createInterface() {
4510
- return new utils.Interface(_abi);
5006
+ return new utils.Interface(_abi$2);
4511
5007
  }
4512
5008
  static connect(address, signerOrProvider) {
4513
- return new Contract(address, _abi, signerOrProvider);
5009
+ return new Contract(address, _abi$2, signerOrProvider);
4514
5010
  }
4515
5011
  }
4516
5012
 
@@ -6697,10 +7193,1514 @@ function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
6697
7193
  attemptToSetProvider();
6698
7194
  }
6699
7195
 
6700
- // only for infrastructure. will be removed once wrapped functions are created
6701
- const erc20 = 1;
6702
-
6703
- // only for infrastructure. will be removed once wrapped functions are created
6704
- const erc721permissionedmintable = 1;
7196
+ /* Autogenerated file. Do not edit manually. */
7197
+ /* tslint:disable */
7198
+ /* eslint-disable */
7199
+ const _abi$1 = [
7200
+ {
7201
+ inputs: [
7202
+ {
7203
+ internalType: "string",
7204
+ name: "name_",
7205
+ type: "string",
7206
+ },
7207
+ {
7208
+ internalType: "string",
7209
+ name: "symbol_",
7210
+ type: "string",
7211
+ },
7212
+ ],
7213
+ stateMutability: "nonpayable",
7214
+ type: "constructor",
7215
+ },
7216
+ {
7217
+ anonymous: false,
7218
+ inputs: [
7219
+ {
7220
+ indexed: true,
7221
+ internalType: "address",
7222
+ name: "owner",
7223
+ type: "address",
7224
+ },
7225
+ {
7226
+ indexed: true,
7227
+ internalType: "address",
7228
+ name: "spender",
7229
+ type: "address",
7230
+ },
7231
+ {
7232
+ indexed: false,
7233
+ internalType: "uint256",
7234
+ name: "value",
7235
+ type: "uint256",
7236
+ },
7237
+ ],
7238
+ name: "Approval",
7239
+ type: "event",
7240
+ },
7241
+ {
7242
+ anonymous: false,
7243
+ inputs: [
7244
+ {
7245
+ indexed: true,
7246
+ internalType: "address",
7247
+ name: "from",
7248
+ type: "address",
7249
+ },
7250
+ {
7251
+ indexed: true,
7252
+ internalType: "address",
7253
+ name: "to",
7254
+ type: "address",
7255
+ },
7256
+ {
7257
+ indexed: false,
7258
+ internalType: "uint256",
7259
+ name: "value",
7260
+ type: "uint256",
7261
+ },
7262
+ ],
7263
+ name: "Transfer",
7264
+ type: "event",
7265
+ },
7266
+ {
7267
+ inputs: [
7268
+ {
7269
+ internalType: "address",
7270
+ name: "owner",
7271
+ type: "address",
7272
+ },
7273
+ {
7274
+ internalType: "address",
7275
+ name: "spender",
7276
+ type: "address",
7277
+ },
7278
+ ],
7279
+ name: "allowance",
7280
+ outputs: [
7281
+ {
7282
+ internalType: "uint256",
7283
+ name: "",
7284
+ type: "uint256",
7285
+ },
7286
+ ],
7287
+ stateMutability: "view",
7288
+ type: "function",
7289
+ },
7290
+ {
7291
+ inputs: [
7292
+ {
7293
+ internalType: "address",
7294
+ name: "spender",
7295
+ type: "address",
7296
+ },
7297
+ {
7298
+ internalType: "uint256",
7299
+ name: "amount",
7300
+ type: "uint256",
7301
+ },
7302
+ ],
7303
+ name: "approve",
7304
+ outputs: [
7305
+ {
7306
+ internalType: "bool",
7307
+ name: "",
7308
+ type: "bool",
7309
+ },
7310
+ ],
7311
+ stateMutability: "nonpayable",
7312
+ type: "function",
7313
+ },
7314
+ {
7315
+ inputs: [
7316
+ {
7317
+ internalType: "address",
7318
+ name: "account",
7319
+ type: "address",
7320
+ },
7321
+ ],
7322
+ name: "balanceOf",
7323
+ outputs: [
7324
+ {
7325
+ internalType: "uint256",
7326
+ name: "",
7327
+ type: "uint256",
7328
+ },
7329
+ ],
7330
+ stateMutability: "view",
7331
+ type: "function",
7332
+ },
7333
+ {
7334
+ inputs: [],
7335
+ name: "decimals",
7336
+ outputs: [
7337
+ {
7338
+ internalType: "uint8",
7339
+ name: "",
7340
+ type: "uint8",
7341
+ },
7342
+ ],
7343
+ stateMutability: "view",
7344
+ type: "function",
7345
+ },
7346
+ {
7347
+ inputs: [
7348
+ {
7349
+ internalType: "address",
7350
+ name: "spender",
7351
+ type: "address",
7352
+ },
7353
+ {
7354
+ internalType: "uint256",
7355
+ name: "subtractedValue",
7356
+ type: "uint256",
7357
+ },
7358
+ ],
7359
+ name: "decreaseAllowance",
7360
+ outputs: [
7361
+ {
7362
+ internalType: "bool",
7363
+ name: "",
7364
+ type: "bool",
7365
+ },
7366
+ ],
7367
+ stateMutability: "nonpayable",
7368
+ type: "function",
7369
+ },
7370
+ {
7371
+ inputs: [
7372
+ {
7373
+ internalType: "address",
7374
+ name: "spender",
7375
+ type: "address",
7376
+ },
7377
+ {
7378
+ internalType: "uint256",
7379
+ name: "addedValue",
7380
+ type: "uint256",
7381
+ },
7382
+ ],
7383
+ name: "increaseAllowance",
7384
+ outputs: [
7385
+ {
7386
+ internalType: "bool",
7387
+ name: "",
7388
+ type: "bool",
7389
+ },
7390
+ ],
7391
+ stateMutability: "nonpayable",
7392
+ type: "function",
7393
+ },
7394
+ {
7395
+ inputs: [],
7396
+ name: "name",
7397
+ outputs: [
7398
+ {
7399
+ internalType: "string",
7400
+ name: "",
7401
+ type: "string",
7402
+ },
7403
+ ],
7404
+ stateMutability: "view",
7405
+ type: "function",
7406
+ },
7407
+ {
7408
+ inputs: [],
7409
+ name: "symbol",
7410
+ outputs: [
7411
+ {
7412
+ internalType: "string",
7413
+ name: "",
7414
+ type: "string",
7415
+ },
7416
+ ],
7417
+ stateMutability: "view",
7418
+ type: "function",
7419
+ },
7420
+ {
7421
+ inputs: [],
7422
+ name: "totalSupply",
7423
+ outputs: [
7424
+ {
7425
+ internalType: "uint256",
7426
+ name: "",
7427
+ type: "uint256",
7428
+ },
7429
+ ],
7430
+ stateMutability: "view",
7431
+ type: "function",
7432
+ },
7433
+ {
7434
+ inputs: [
7435
+ {
7436
+ internalType: "address",
7437
+ name: "to",
7438
+ type: "address",
7439
+ },
7440
+ {
7441
+ internalType: "uint256",
7442
+ name: "amount",
7443
+ type: "uint256",
7444
+ },
7445
+ ],
7446
+ name: "transfer",
7447
+ outputs: [
7448
+ {
7449
+ internalType: "bool",
7450
+ name: "",
7451
+ type: "bool",
7452
+ },
7453
+ ],
7454
+ stateMutability: "nonpayable",
7455
+ type: "function",
7456
+ },
7457
+ {
7458
+ inputs: [
7459
+ {
7460
+ internalType: "address",
7461
+ name: "from",
7462
+ type: "address",
7463
+ },
7464
+ {
7465
+ internalType: "address",
7466
+ name: "to",
7467
+ type: "address",
7468
+ },
7469
+ {
7470
+ internalType: "uint256",
7471
+ name: "amount",
7472
+ type: "uint256",
7473
+ },
7474
+ ],
7475
+ name: "transferFrom",
7476
+ outputs: [
7477
+ {
7478
+ internalType: "bool",
7479
+ name: "",
7480
+ type: "bool",
7481
+ },
7482
+ ],
7483
+ stateMutability: "nonpayable",
7484
+ type: "function",
7485
+ },
7486
+ ];
7487
+ const _bytecode$1 = "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212204188b273199f085e1921ec1a1fa55abdee2e425960bda675a51fac85acd9972064736f6c63430008110033";
7488
+ const isSuperArgs$1 = (xs) => xs.length > 1;
7489
+ class ERC20__factory extends ContractFactory {
7490
+ constructor(...args) {
7491
+ if (isSuperArgs$1(args)) {
7492
+ super(...args);
7493
+ }
7494
+ else {
7495
+ super(_abi$1, _bytecode$1, args[0]);
7496
+ }
7497
+ }
7498
+ deploy(name_, symbol_, overrides) {
7499
+ return super.deploy(name_, symbol_, overrides || {});
7500
+ }
7501
+ getDeployTransaction(name_, symbol_, overrides) {
7502
+ return super.getDeployTransaction(name_, symbol_, overrides || {});
7503
+ }
7504
+ attach(address) {
7505
+ return super.attach(address);
7506
+ }
7507
+ connect(signer) {
7508
+ return super.connect(signer);
7509
+ }
7510
+ static bytecode = _bytecode$1;
7511
+ static abi = _abi$1;
7512
+ static createInterface() {
7513
+ return new utils.Interface(_abi$1);
7514
+ }
7515
+ static connect(address, signerOrProvider) {
7516
+ return new Contract(address, _abi$1, signerOrProvider);
7517
+ }
7518
+ }
7519
+
7520
+ /* Autogenerated file. Do not edit manually. */
7521
+ /* tslint:disable */
7522
+ /* eslint-disable */
7523
+ const _abi = [
7524
+ {
7525
+ inputs: [
7526
+ {
7527
+ internalType: "address",
7528
+ name: "owner_",
7529
+ type: "address",
7530
+ },
7531
+ {
7532
+ internalType: "string",
7533
+ name: "name_",
7534
+ type: "string",
7535
+ },
7536
+ {
7537
+ internalType: "string",
7538
+ name: "symbol_",
7539
+ type: "string",
7540
+ },
7541
+ {
7542
+ internalType: "string",
7543
+ name: "baseURI_",
7544
+ type: "string",
7545
+ },
7546
+ {
7547
+ internalType: "string",
7548
+ name: "contractURI_",
7549
+ type: "string",
7550
+ },
7551
+ {
7552
+ internalType: "address",
7553
+ name: "_receiver",
7554
+ type: "address",
7555
+ },
7556
+ {
7557
+ internalType: "uint96",
7558
+ name: "_feeNumerator",
7559
+ type: "uint96",
7560
+ },
7561
+ ],
7562
+ stateMutability: "nonpayable",
7563
+ type: "constructor",
7564
+ },
7565
+ {
7566
+ inputs: [
7567
+ {
7568
+ internalType: "address",
7569
+ name: "target",
7570
+ type: "address",
7571
+ },
7572
+ ],
7573
+ name: "ApproveTargetNotInAllowlist",
7574
+ type: "error",
7575
+ },
7576
+ {
7577
+ inputs: [
7578
+ {
7579
+ internalType: "address",
7580
+ name: "caller",
7581
+ type: "address",
7582
+ },
7583
+ ],
7584
+ name: "CallerNotInAllowlist",
7585
+ type: "error",
7586
+ },
7587
+ {
7588
+ anonymous: false,
7589
+ inputs: [
7590
+ {
7591
+ indexed: true,
7592
+ internalType: "address",
7593
+ name: "owner",
7594
+ type: "address",
7595
+ },
7596
+ {
7597
+ indexed: true,
7598
+ internalType: "address",
7599
+ name: "approved",
7600
+ type: "address",
7601
+ },
7602
+ {
7603
+ indexed: true,
7604
+ internalType: "uint256",
7605
+ name: "tokenId",
7606
+ type: "uint256",
7607
+ },
7608
+ ],
7609
+ name: "Approval",
7610
+ type: "event",
7611
+ },
7612
+ {
7613
+ anonymous: false,
7614
+ inputs: [
7615
+ {
7616
+ indexed: true,
7617
+ internalType: "address",
7618
+ name: "owner",
7619
+ type: "address",
7620
+ },
7621
+ {
7622
+ indexed: true,
7623
+ internalType: "address",
7624
+ name: "operator",
7625
+ type: "address",
7626
+ },
7627
+ {
7628
+ indexed: false,
7629
+ internalType: "bool",
7630
+ name: "approved",
7631
+ type: "bool",
7632
+ },
7633
+ ],
7634
+ name: "ApprovalForAll",
7635
+ type: "event",
7636
+ },
7637
+ {
7638
+ anonymous: false,
7639
+ inputs: [
7640
+ {
7641
+ indexed: true,
7642
+ internalType: "bytes32",
7643
+ name: "role",
7644
+ type: "bytes32",
7645
+ },
7646
+ {
7647
+ indexed: true,
7648
+ internalType: "bytes32",
7649
+ name: "previousAdminRole",
7650
+ type: "bytes32",
7651
+ },
7652
+ {
7653
+ indexed: true,
7654
+ internalType: "bytes32",
7655
+ name: "newAdminRole",
7656
+ type: "bytes32",
7657
+ },
7658
+ ],
7659
+ name: "RoleAdminChanged",
7660
+ type: "event",
7661
+ },
7662
+ {
7663
+ anonymous: false,
7664
+ inputs: [
7665
+ {
7666
+ indexed: true,
7667
+ internalType: "bytes32",
7668
+ name: "role",
7669
+ type: "bytes32",
7670
+ },
7671
+ {
7672
+ indexed: true,
7673
+ internalType: "address",
7674
+ name: "account",
7675
+ type: "address",
7676
+ },
7677
+ {
7678
+ indexed: true,
7679
+ internalType: "address",
7680
+ name: "sender",
7681
+ type: "address",
7682
+ },
7683
+ ],
7684
+ name: "RoleGranted",
7685
+ type: "event",
7686
+ },
7687
+ {
7688
+ anonymous: false,
7689
+ inputs: [
7690
+ {
7691
+ indexed: true,
7692
+ internalType: "bytes32",
7693
+ name: "role",
7694
+ type: "bytes32",
7695
+ },
7696
+ {
7697
+ indexed: true,
7698
+ internalType: "address",
7699
+ name: "account",
7700
+ type: "address",
7701
+ },
7702
+ {
7703
+ indexed: true,
7704
+ internalType: "address",
7705
+ name: "sender",
7706
+ type: "address",
7707
+ },
7708
+ ],
7709
+ name: "RoleRevoked",
7710
+ type: "event",
7711
+ },
7712
+ {
7713
+ anonymous: false,
7714
+ inputs: [
7715
+ {
7716
+ indexed: false,
7717
+ internalType: "address",
7718
+ name: "oldRegistry",
7719
+ type: "address",
7720
+ },
7721
+ {
7722
+ indexed: false,
7723
+ internalType: "address",
7724
+ name: "newRegistry",
7725
+ type: "address",
7726
+ },
7727
+ ],
7728
+ name: "RoyaltytAllowlistRegistryUpdated",
7729
+ type: "event",
7730
+ },
7731
+ {
7732
+ anonymous: false,
7733
+ inputs: [
7734
+ {
7735
+ indexed: true,
7736
+ internalType: "address",
7737
+ name: "from",
7738
+ type: "address",
7739
+ },
7740
+ {
7741
+ indexed: true,
7742
+ internalType: "address",
7743
+ name: "to",
7744
+ type: "address",
7745
+ },
7746
+ {
7747
+ indexed: true,
7748
+ internalType: "uint256",
7749
+ name: "tokenId",
7750
+ type: "uint256",
7751
+ },
7752
+ ],
7753
+ name: "Transfer",
7754
+ type: "event",
7755
+ },
7756
+ {
7757
+ inputs: [],
7758
+ name: "DEFAULT_ADMIN_ROLE",
7759
+ outputs: [
7760
+ {
7761
+ internalType: "bytes32",
7762
+ name: "",
7763
+ type: "bytes32",
7764
+ },
7765
+ ],
7766
+ stateMutability: "view",
7767
+ type: "function",
7768
+ },
7769
+ {
7770
+ inputs: [],
7771
+ name: "MINTER_ROLE",
7772
+ outputs: [
7773
+ {
7774
+ internalType: "bytes32",
7775
+ name: "",
7776
+ type: "bytes32",
7777
+ },
7778
+ ],
7779
+ stateMutability: "view",
7780
+ type: "function",
7781
+ },
7782
+ {
7783
+ inputs: [
7784
+ {
7785
+ internalType: "address",
7786
+ name: "to",
7787
+ type: "address",
7788
+ },
7789
+ {
7790
+ internalType: "uint256",
7791
+ name: "tokenId",
7792
+ type: "uint256",
7793
+ },
7794
+ ],
7795
+ name: "approve",
7796
+ outputs: [],
7797
+ stateMutability: "nonpayable",
7798
+ type: "function",
7799
+ },
7800
+ {
7801
+ inputs: [
7802
+ {
7803
+ internalType: "address",
7804
+ name: "owner",
7805
+ type: "address",
7806
+ },
7807
+ ],
7808
+ name: "balanceOf",
7809
+ outputs: [
7810
+ {
7811
+ internalType: "uint256",
7812
+ name: "",
7813
+ type: "uint256",
7814
+ },
7815
+ ],
7816
+ stateMutability: "view",
7817
+ type: "function",
7818
+ },
7819
+ {
7820
+ inputs: [],
7821
+ name: "baseURI",
7822
+ outputs: [
7823
+ {
7824
+ internalType: "string",
7825
+ name: "",
7826
+ type: "string",
7827
+ },
7828
+ ],
7829
+ stateMutability: "view",
7830
+ type: "function",
7831
+ },
7832
+ {
7833
+ inputs: [
7834
+ {
7835
+ internalType: "uint256",
7836
+ name: "tokenId",
7837
+ type: "uint256",
7838
+ },
7839
+ ],
7840
+ name: "burn",
7841
+ outputs: [],
7842
+ stateMutability: "nonpayable",
7843
+ type: "function",
7844
+ },
7845
+ {
7846
+ inputs: [],
7847
+ name: "contractURI",
7848
+ outputs: [
7849
+ {
7850
+ internalType: "string",
7851
+ name: "",
7852
+ type: "string",
7853
+ },
7854
+ ],
7855
+ stateMutability: "view",
7856
+ type: "function",
7857
+ },
7858
+ {
7859
+ inputs: [],
7860
+ name: "getAdmins",
7861
+ outputs: [
7862
+ {
7863
+ internalType: "address[]",
7864
+ name: "",
7865
+ type: "address[]",
7866
+ },
7867
+ ],
7868
+ stateMutability: "view",
7869
+ type: "function",
7870
+ },
7871
+ {
7872
+ inputs: [
7873
+ {
7874
+ internalType: "uint256",
7875
+ name: "tokenId",
7876
+ type: "uint256",
7877
+ },
7878
+ ],
7879
+ name: "getApproved",
7880
+ outputs: [
7881
+ {
7882
+ internalType: "address",
7883
+ name: "",
7884
+ type: "address",
7885
+ },
7886
+ ],
7887
+ stateMutability: "view",
7888
+ type: "function",
7889
+ },
7890
+ {
7891
+ inputs: [
7892
+ {
7893
+ internalType: "bytes32",
7894
+ name: "role",
7895
+ type: "bytes32",
7896
+ },
7897
+ ],
7898
+ name: "getRoleAdmin",
7899
+ outputs: [
7900
+ {
7901
+ internalType: "bytes32",
7902
+ name: "",
7903
+ type: "bytes32",
7904
+ },
7905
+ ],
7906
+ stateMutability: "view",
7907
+ type: "function",
7908
+ },
7909
+ {
7910
+ inputs: [
7911
+ {
7912
+ internalType: "bytes32",
7913
+ name: "role",
7914
+ type: "bytes32",
7915
+ },
7916
+ {
7917
+ internalType: "uint256",
7918
+ name: "index",
7919
+ type: "uint256",
7920
+ },
7921
+ ],
7922
+ name: "getRoleMember",
7923
+ outputs: [
7924
+ {
7925
+ internalType: "address",
7926
+ name: "",
7927
+ type: "address",
7928
+ },
7929
+ ],
7930
+ stateMutability: "view",
7931
+ type: "function",
7932
+ },
7933
+ {
7934
+ inputs: [
7935
+ {
7936
+ internalType: "bytes32",
7937
+ name: "role",
7938
+ type: "bytes32",
7939
+ },
7940
+ ],
7941
+ name: "getRoleMemberCount",
7942
+ outputs: [
7943
+ {
7944
+ internalType: "uint256",
7945
+ name: "",
7946
+ type: "uint256",
7947
+ },
7948
+ ],
7949
+ stateMutability: "view",
7950
+ type: "function",
7951
+ },
7952
+ {
7953
+ inputs: [
7954
+ {
7955
+ internalType: "address",
7956
+ name: "user",
7957
+ type: "address",
7958
+ },
7959
+ ],
7960
+ name: "grantMinterRole",
7961
+ outputs: [],
7962
+ stateMutability: "nonpayable",
7963
+ type: "function",
7964
+ },
7965
+ {
7966
+ inputs: [
7967
+ {
7968
+ internalType: "bytes32",
7969
+ name: "role",
7970
+ type: "bytes32",
7971
+ },
7972
+ {
7973
+ internalType: "address",
7974
+ name: "account",
7975
+ type: "address",
7976
+ },
7977
+ ],
7978
+ name: "grantRole",
7979
+ outputs: [],
7980
+ stateMutability: "nonpayable",
7981
+ type: "function",
7982
+ },
7983
+ {
7984
+ inputs: [
7985
+ {
7986
+ internalType: "bytes32",
7987
+ name: "role",
7988
+ type: "bytes32",
7989
+ },
7990
+ {
7991
+ internalType: "address",
7992
+ name: "account",
7993
+ type: "address",
7994
+ },
7995
+ ],
7996
+ name: "hasRole",
7997
+ outputs: [
7998
+ {
7999
+ internalType: "bool",
8000
+ name: "",
8001
+ type: "bool",
8002
+ },
8003
+ ],
8004
+ stateMutability: "view",
8005
+ type: "function",
8006
+ },
8007
+ {
8008
+ inputs: [
8009
+ {
8010
+ internalType: "address",
8011
+ name: "owner",
8012
+ type: "address",
8013
+ },
8014
+ {
8015
+ internalType: "address",
8016
+ name: "operator",
8017
+ type: "address",
8018
+ },
8019
+ ],
8020
+ name: "isApprovedForAll",
8021
+ outputs: [
8022
+ {
8023
+ internalType: "bool",
8024
+ name: "",
8025
+ type: "bool",
8026
+ },
8027
+ ],
8028
+ stateMutability: "view",
8029
+ type: "function",
8030
+ },
8031
+ {
8032
+ inputs: [
8033
+ {
8034
+ internalType: "address",
8035
+ name: "to",
8036
+ type: "address",
8037
+ },
8038
+ {
8039
+ internalType: "uint256",
8040
+ name: "amount",
8041
+ type: "uint256",
8042
+ },
8043
+ ],
8044
+ name: "mint",
8045
+ outputs: [],
8046
+ stateMutability: "nonpayable",
8047
+ type: "function",
8048
+ },
8049
+ {
8050
+ inputs: [],
8051
+ name: "name",
8052
+ outputs: [
8053
+ {
8054
+ internalType: "string",
8055
+ name: "",
8056
+ type: "string",
8057
+ },
8058
+ ],
8059
+ stateMutability: "view",
8060
+ type: "function",
8061
+ },
8062
+ {
8063
+ inputs: [
8064
+ {
8065
+ internalType: "uint256",
8066
+ name: "tokenId",
8067
+ type: "uint256",
8068
+ },
8069
+ ],
8070
+ name: "ownerOf",
8071
+ outputs: [
8072
+ {
8073
+ internalType: "address",
8074
+ name: "",
8075
+ type: "address",
8076
+ },
8077
+ ],
8078
+ stateMutability: "view",
8079
+ type: "function",
8080
+ },
8081
+ {
8082
+ inputs: [
8083
+ {
8084
+ internalType: "bytes32",
8085
+ name: "role",
8086
+ type: "bytes32",
8087
+ },
8088
+ {
8089
+ internalType: "address",
8090
+ name: "account",
8091
+ type: "address",
8092
+ },
8093
+ ],
8094
+ name: "renounceRole",
8095
+ outputs: [],
8096
+ stateMutability: "nonpayable",
8097
+ type: "function",
8098
+ },
8099
+ {
8100
+ inputs: [
8101
+ {
8102
+ internalType: "address",
8103
+ name: "user",
8104
+ type: "address",
8105
+ },
8106
+ ],
8107
+ name: "revokeMinterRole",
8108
+ outputs: [],
8109
+ stateMutability: "nonpayable",
8110
+ type: "function",
8111
+ },
8112
+ {
8113
+ inputs: [
8114
+ {
8115
+ internalType: "bytes32",
8116
+ name: "role",
8117
+ type: "bytes32",
8118
+ },
8119
+ {
8120
+ internalType: "address",
8121
+ name: "account",
8122
+ type: "address",
8123
+ },
8124
+ ],
8125
+ name: "revokeRole",
8126
+ outputs: [],
8127
+ stateMutability: "nonpayable",
8128
+ type: "function",
8129
+ },
8130
+ {
8131
+ inputs: [],
8132
+ name: "royaltyAllowlist",
8133
+ outputs: [
8134
+ {
8135
+ internalType: "contract IRoyaltyAllowlist",
8136
+ name: "",
8137
+ type: "address",
8138
+ },
8139
+ ],
8140
+ stateMutability: "view",
8141
+ type: "function",
8142
+ },
8143
+ {
8144
+ inputs: [
8145
+ {
8146
+ internalType: "uint256",
8147
+ name: "_tokenId",
8148
+ type: "uint256",
8149
+ },
8150
+ {
8151
+ internalType: "uint256",
8152
+ name: "_salePrice",
8153
+ type: "uint256",
8154
+ },
8155
+ ],
8156
+ name: "royaltyInfo",
8157
+ outputs: [
8158
+ {
8159
+ internalType: "address",
8160
+ name: "",
8161
+ type: "address",
8162
+ },
8163
+ {
8164
+ internalType: "uint256",
8165
+ name: "",
8166
+ type: "uint256",
8167
+ },
8168
+ ],
8169
+ stateMutability: "view",
8170
+ type: "function",
8171
+ },
8172
+ {
8173
+ inputs: [
8174
+ {
8175
+ internalType: "address",
8176
+ name: "from",
8177
+ type: "address",
8178
+ },
8179
+ {
8180
+ internalType: "address",
8181
+ name: "to",
8182
+ type: "address",
8183
+ },
8184
+ {
8185
+ internalType: "uint256",
8186
+ name: "tokenId",
8187
+ type: "uint256",
8188
+ },
8189
+ ],
8190
+ name: "safeTransferFrom",
8191
+ outputs: [],
8192
+ stateMutability: "nonpayable",
8193
+ type: "function",
8194
+ },
8195
+ {
8196
+ inputs: [
8197
+ {
8198
+ internalType: "address",
8199
+ name: "from",
8200
+ type: "address",
8201
+ },
8202
+ {
8203
+ internalType: "address",
8204
+ name: "to",
8205
+ type: "address",
8206
+ },
8207
+ {
8208
+ internalType: "uint256",
8209
+ name: "tokenId",
8210
+ type: "uint256",
8211
+ },
8212
+ {
8213
+ internalType: "bytes",
8214
+ name: "data",
8215
+ type: "bytes",
8216
+ },
8217
+ ],
8218
+ name: "safeTransferFrom",
8219
+ outputs: [],
8220
+ stateMutability: "nonpayable",
8221
+ type: "function",
8222
+ },
8223
+ {
8224
+ inputs: [
8225
+ {
8226
+ internalType: "address",
8227
+ name: "operator",
8228
+ type: "address",
8229
+ },
8230
+ {
8231
+ internalType: "bool",
8232
+ name: "approved",
8233
+ type: "bool",
8234
+ },
8235
+ ],
8236
+ name: "setApprovalForAll",
8237
+ outputs: [],
8238
+ stateMutability: "nonpayable",
8239
+ type: "function",
8240
+ },
8241
+ {
8242
+ inputs: [
8243
+ {
8244
+ internalType: "string",
8245
+ name: "baseURI_",
8246
+ type: "string",
8247
+ },
8248
+ ],
8249
+ name: "setBaseURI",
8250
+ outputs: [],
8251
+ stateMutability: "nonpayable",
8252
+ type: "function",
8253
+ },
8254
+ {
8255
+ inputs: [
8256
+ {
8257
+ internalType: "string",
8258
+ name: "_contractURI",
8259
+ type: "string",
8260
+ },
8261
+ ],
8262
+ name: "setContractURI",
8263
+ outputs: [],
8264
+ stateMutability: "nonpayable",
8265
+ type: "function",
8266
+ },
8267
+ {
8268
+ inputs: [
8269
+ {
8270
+ internalType: "address",
8271
+ name: "_royaltyAllowlist",
8272
+ type: "address",
8273
+ },
8274
+ ],
8275
+ name: "setRoyaltyAllowlistRegistry",
8276
+ outputs: [],
8277
+ stateMutability: "nonpayable",
8278
+ type: "function",
8279
+ },
8280
+ {
8281
+ inputs: [
8282
+ {
8283
+ internalType: "bytes4",
8284
+ name: "interfaceId",
8285
+ type: "bytes4",
8286
+ },
8287
+ ],
8288
+ name: "supportsInterface",
8289
+ outputs: [
8290
+ {
8291
+ internalType: "bool",
8292
+ name: "",
8293
+ type: "bool",
8294
+ },
8295
+ ],
8296
+ stateMutability: "view",
8297
+ type: "function",
8298
+ },
8299
+ {
8300
+ inputs: [],
8301
+ name: "symbol",
8302
+ outputs: [
8303
+ {
8304
+ internalType: "string",
8305
+ name: "",
8306
+ type: "string",
8307
+ },
8308
+ ],
8309
+ stateMutability: "view",
8310
+ type: "function",
8311
+ },
8312
+ {
8313
+ inputs: [
8314
+ {
8315
+ internalType: "uint256",
8316
+ name: "index",
8317
+ type: "uint256",
8318
+ },
8319
+ ],
8320
+ name: "tokenByIndex",
8321
+ outputs: [
8322
+ {
8323
+ internalType: "uint256",
8324
+ name: "",
8325
+ type: "uint256",
8326
+ },
8327
+ ],
8328
+ stateMutability: "view",
8329
+ type: "function",
8330
+ },
8331
+ {
8332
+ inputs: [
8333
+ {
8334
+ internalType: "address",
8335
+ name: "owner",
8336
+ type: "address",
8337
+ },
8338
+ {
8339
+ internalType: "uint256",
8340
+ name: "index",
8341
+ type: "uint256",
8342
+ },
8343
+ ],
8344
+ name: "tokenOfOwnerByIndex",
8345
+ outputs: [
8346
+ {
8347
+ internalType: "uint256",
8348
+ name: "",
8349
+ type: "uint256",
8350
+ },
8351
+ ],
8352
+ stateMutability: "view",
8353
+ type: "function",
8354
+ },
8355
+ {
8356
+ inputs: [
8357
+ {
8358
+ internalType: "uint256",
8359
+ name: "tokenId",
8360
+ type: "uint256",
8361
+ },
8362
+ ],
8363
+ name: "tokenURI",
8364
+ outputs: [
8365
+ {
8366
+ internalType: "string",
8367
+ name: "",
8368
+ type: "string",
8369
+ },
8370
+ ],
8371
+ stateMutability: "view",
8372
+ type: "function",
8373
+ },
8374
+ {
8375
+ inputs: [],
8376
+ name: "totalSupply",
8377
+ outputs: [
8378
+ {
8379
+ internalType: "uint256",
8380
+ name: "",
8381
+ type: "uint256",
8382
+ },
8383
+ ],
8384
+ stateMutability: "view",
8385
+ type: "function",
8386
+ },
8387
+ {
8388
+ inputs: [
8389
+ {
8390
+ internalType: "address",
8391
+ name: "from",
8392
+ type: "address",
8393
+ },
8394
+ {
8395
+ internalType: "address",
8396
+ name: "to",
8397
+ type: "address",
8398
+ },
8399
+ {
8400
+ internalType: "uint256",
8401
+ name: "tokenId",
8402
+ type: "uint256",
8403
+ },
8404
+ ],
8405
+ name: "transferFrom",
8406
+ outputs: [],
8407
+ stateMutability: "nonpayable",
8408
+ type: "function",
8409
+ },
8410
+ ];
8411
+ const _bytecode = "0x60806040523480156200001157600080fd5b50604051620060d4380380620060d4833981810160405281019062000037919062000762565b868686868686868585816000908162000051919062000adc565b50806001908162000063919062000adc565b505050620000788282620000dc60201b60201c565b6200008d6000801b886200027f60201b60201c565b83601090816200009e919062000adc565b5082600f9081620000b0919062000adc565b50620000c86011620002c760201b620015f11760201c565b505050505050505050505050505062000cde565b620000ec620002dd60201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200014d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001449062000c4a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620001bf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001b69062000cbc565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600d60008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b620002968282620002e760201b620016071760201c565b620002c28160076000858152602001908152602001600020620003d960201b620016e81790919060201c565b505050565b6001816000016000828254019250508190555050565b6000612710905090565b620002f982826200041160201b60201c565b620003d55760016006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200037a6200047c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600062000409836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200048460201b60201c565b905092915050565b60006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b6000620004988383620004fe60201b60201c565b620004f3578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050620004f8565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620005628262000535565b9050919050565b620005748162000555565b81146200058057600080fd5b50565b600081519050620005948162000569565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620005ef82620005a4565b810181811067ffffffffffffffff82111715620006115762000610620005b5565b5b80604052505050565b60006200062662000521565b9050620006348282620005e4565b919050565b600067ffffffffffffffff821115620006575762000656620005b5565b5b6200066282620005a4565b9050602081019050919050565b60005b838110156200068f57808201518184015260208101905062000672565b60008484015250505050565b6000620006b2620006ac8462000639565b6200061a565b905082815260208101848484011115620006d157620006d06200059f565b5b620006de8482856200066f565b509392505050565b600082601f830112620006fe57620006fd6200059a565b5b8151620007108482602086016200069b565b91505092915050565b60006bffffffffffffffffffffffff82169050919050565b6200073c8162000719565b81146200074857600080fd5b50565b6000815190506200075c8162000731565b92915050565b600080600080600080600060e0888a0312156200078457620007836200052b565b5b6000620007948a828b0162000583565b975050602088015167ffffffffffffffff811115620007b857620007b762000530565b5b620007c68a828b01620006e6565b965050604088015167ffffffffffffffff811115620007ea57620007e962000530565b5b620007f88a828b01620006e6565b955050606088015167ffffffffffffffff8111156200081c576200081b62000530565b5b6200082a8a828b01620006e6565b945050608088015167ffffffffffffffff8111156200084e576200084d62000530565b5b6200085c8a828b01620006e6565b93505060a06200086f8a828b0162000583565b92505060c0620008828a828b016200074b565b91505092959891949750929550565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620008e457607f821691505b602082108103620008fa57620008f96200089c565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620009647fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000925565b62000970868362000925565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620009bd620009b7620009b18462000988565b62000992565b62000988565b9050919050565b6000819050919050565b620009d9836200099c565b620009f1620009e882620009c4565b84845462000932565b825550505050565b600090565b62000a08620009f9565b62000a15818484620009ce565b505050565b5b8181101562000a3d5762000a31600082620009fe565b60018101905062000a1b565b5050565b601f82111562000a8c5762000a568162000900565b62000a618462000915565b8101602085101562000a71578190505b62000a8962000a808562000915565b83018262000a1a565b50505b505050565b600082821c905092915050565b600062000ab16000198460080262000a91565b1980831691505092915050565b600062000acc838362000a9e565b9150826002028217905092915050565b62000ae78262000891565b67ffffffffffffffff81111562000b035762000b02620005b5565b5b62000b0f8254620008cb565b62000b1c82828562000a41565b600060209050601f83116001811462000b54576000841562000b3f578287015190505b62000b4b858262000abe565b86555062000bbb565b601f19841662000b648662000900565b60005b8281101562000b8e5784890151825560018201915060208501945060208101905062000b67565b8683101562000bae578489015162000baa601f89168262000a9e565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000c32602a8362000bc3565b915062000c3f8262000bd4565b604082019050919050565b6000602082019050818103600083015262000c658162000c23565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000ca460198362000bc3565b915062000cb18262000c6c565b602082019050919050565b6000602082019050818103600083015262000cd78162000c95565b9050919050565b6153e68062000cee6000396000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c80636352211e1161013057806395d89b41116100b8578063ca15c8731161007c578063ca15c87314610697578063d5391393146106c7578063d547741f146106e5578063e8a3d48514610701578063e985e9c51461071f57610227565b806395d89b41146105f3578063a217fddf14610611578063a22cb4651461062f578063b88d4fde1461064b578063c87b56dd1461066757610227565b80636c0360eb116100ff5780636c0360eb1461052957806370a08231146105475780639010d07c1461057757806391d14854146105a7578063938e3d7b146105d757610227565b80636352211e146104a35780636588962a146104d357806369e2f0fb146104ef5780636b3a06321461050b57610227565b80632f745c59116101b357806340c10f191161018257806340c10f191461040357806342842e0e1461041f57806342966c681461043b5780634f6ccce71461045757806355f804b31461048757610227565b80632f745c591461037d57806331ae450b146103ad57806336568abe146103cb5780633dd1eb61146103e757610227565b806318160ddd116101fa57806318160ddd146102c657806323b872dd146102e4578063248a9ca3146103005780632a55205a146103305780632f2ff15d1461036157610227565b806301ffc9a71461022c57806306fdde031461025c578063081812fc1461027a578063095ea7b3146102aa575b600080fd5b61024660048036038101906102419190613a2e565b61074f565b6040516102539190613a76565b60405180910390f35b610264610761565b6040516102719190613b21565b60405180910390f35b610294600480360381019061028f9190613b79565b6107f3565b6040516102a19190613be7565b60405180910390f35b6102c460048036038101906102bf9190613c2e565b610839565b005b6102ce610847565b6040516102db9190613c7d565b60405180910390f35b6102fe60048036038101906102f99190613c98565b610854565b005b61031a60048036038101906103159190613d21565b6108b4565b6040516103279190613d5d565b60405180910390f35b61034a60048036038101906103459190613d78565b6108d4565b604051610358929190613db8565b60405180910390f35b61037b60048036038101906103769190613de1565b610abe565b005b61039760048036038101906103929190613c2e565b610adf565b6040516103a49190613c7d565b60405180910390f35b6103b5610b84565b6040516103c29190613edf565b60405180910390f35b6103e560048036038101906103e09190613de1565b610c64565b005b61040160048036038101906103fc9190613f01565b610ce7565b005b61041d60048036038101906104189190613c2e565b610d22565b005b61043960048036038101906104349190613c98565b610d7a565b005b61045560048036038101906104509190613b79565b610d9a565b005b610471600480360381019061046c9190613b79565b610df6565b60405161047e9190613c7d565b60405180910390f35b6104a1600480360381019061049c9190614063565b610e67565b005b6104bd60048036038101906104b89190613b79565b610e88565b6040516104ca9190613be7565b60405180910390f35b6104ed60048036038101906104e89190613f01565b610f0e565b005b61050960048036038101906105049190613f01565b611094565b005b6105136110cf565b604051610520919061410b565b60405180910390f35b6105316110f5565b60405161053e9190613b21565b60405180910390f35b610561600480360381019061055c9190613f01565b611183565b60405161056e9190613c7d565b60405180910390f35b610591600480360381019061058c9190614126565b61123a565b60405161059e9190613be7565b60405180910390f35b6105c160048036038101906105bc9190613de1565b611269565b6040516105ce9190613a76565b60405180910390f35b6105f160048036038101906105ec9190614063565b6112d4565b005b6105fb6112f5565b6040516106089190613b21565b60405180910390f35b610619611387565b6040516106269190613d5d565b60405180910390f35b61064960048036038101906106449190614192565b61138e565b005b61066560048036038101906106609190614273565b61139c565b005b610681600480360381019061067c9190613b79565b6113fe565b60405161068e9190613b21565b60405180910390f35b6106b160048036038101906106ac9190613d21565b611466565b6040516106be9190613c7d565b60405180910390f35b6106cf61148a565b6040516106dc9190613d5d565b60405180910390f35b6106ff60048036038101906106fa9190613de1565b6114ae565b005b6107096114cf565b6040516107169190613b21565b60405180910390f35b610739600480360381019061073491906142f6565b61155d565b6040516107469190613a76565b60405180910390f35b600061075a82611718565b9050919050565b60606000805461077090614365565b80601f016020809104026020016040519081016040528092919081815260200182805461079c90614365565b80156107e95780601f106107be576101008083540402835291602001916107e9565b820191906000526020600020905b8154815290600101906020018083116107cc57829003601f168201915b5050505050905090565b60006107fe82611792565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b61084382826117dd565b5050565b6000600b80549050905090565b61086561085f6117f4565b826117fc565b6108a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089b90614408565b60405180910390fd5b6108af838383611891565b505050565b600060066000838152602001908152602001600020600101549050919050565b6000806000600e60008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff1603610a6957600d6040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000610a736118a1565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686610a9f9190614457565b610aa991906144c8565b90508160000151819350935050509250929050565b610ac7826108b4565b610ad0816118ab565b610ada83836118bf565b505050565b6000610aea83611183565b8210610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061456b565b60405180910390fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60606000610b946000801b611466565b905060008167ffffffffffffffff811115610bb257610bb1613f38565b5b604051908082528060200260200182016040528015610be05781602001602082028036833780820191505090505b50905060005b82811015610c5b57610bfb6000801b8261123a565b828281518110610c0e57610c0d61458b565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080610c53906145ba565b915050610be6565b50809250505090565b610c6c6117f4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610cd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd090614674565b60405180910390fd5b610ce382826118f3565b5050565b6000801b610cf4816118ab565b610d1e7f4d494e5445525f524f4c4500000000000000000000000000000000000000000083610abe565b5050565b7f4d494e5445525f524f4c45000000000000000000000000000000000000000000610d4c816118ab565b60005b82811015610d7457610d6084611927565b508080610d6c906145ba565b915050610d4f565b50505050565b610d958383836040518060200160405280600081525061139c565b505050565b610dab610da56117f4565b826117fc565b610dea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de190614408565b60405180910390fd5b610df381611953565b50565b6000610e00610847565b8210610e41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3890614706565b60405180910390fd5b600b8281548110610e5557610e5461458b565b5b90600052602060002001549050919050565b6000801b610e74816118ab565b8160109081610e8391906148c8565b505050565b600080610e9483611aa1565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efc906149e6565b60405180910390fd5b80915050919050565b6000801b610f1b816118ab565b8173ffffffffffffffffffffffffffffffffffffffff166301ffc9a77f05a3b809000000000000000000000000000000000000000000000000000000006040518263ffffffff1660e01b8152600401610f749190614a15565b602060405180830381865afa158015610f91573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb59190614a45565b610ff4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610feb90614ae4565b60405180910390fd5b7f4a1d010d926ae0d4294a4afe61ae81bb378335fbf671e099a7138b5afeefdf84600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611047929190614b04565b60405180910390a181600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000801b6110a1816118ab565b6110cb7f4d494e5445525f524f4c45000000000000000000000000000000000000000000836114ae565b5050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6010805461110290614365565b80601f016020809104026020016040519081016040528092919081815260200182805461112e90614365565b801561117b5780601f106111505761010080835404028352916020019161117b565b820191906000526020600020905b81548152906001019060200180831161115e57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036111f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ea90614b9f565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006112618260076000868152602001908152602001600020611ade90919063ffffffff16565b905092915050565b60006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b6112e1816118ab565b81600f90816112f091906148c8565b505050565b60606001805461130490614365565b80601f016020809104026020016040519081016040528092919081815260200182805461133090614365565b801561137d5780601f106113525761010080835404028352916020019161137d565b820191906000526020600020905b81548152906001019060200180831161136057829003601f168201915b5050505050905090565b6000801b81565b6113988282611af8565b5050565b6113ad6113a76117f4565b836117fc565b6113ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e390614408565b60405180910390fd5b6113f884848484611b0f565b50505050565b606061140982611792565b6000611413611b6b565b90506000815111611433576040518060200160405280600081525061145e565b8061143d84611bfd565b60405160200161144e929190614bfb565b6040516020818303038152906040525b915050919050565b600061148360076000848152602001908152602001600020611ccb565b9050919050565b7f4d494e5445525f524f4c4500000000000000000000000000000000000000000081565b6114b7826108b4565b6114c0816118ab565b6114ca83836118f3565b505050565b600f80546114dc90614365565b80601f016020809104026020016040519081016040528092919081815260200182805461150890614365565b80156115555780601f1061152a57610100808354040283529160200191611555565b820191906000526020600020905b81548152906001019060200180831161153857829003601f168201915b505050505081565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6001816000016000828254019250508190555050565b6116118282611269565b6116e45760016006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506116896117f4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6000611710836000018373ffffffffffffffffffffffffffffffffffffffff1660001b611ce0565b905092915050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061178b575061178a82611d50565b5b9050919050565b61179b81611dca565b6117da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d1906149e6565b60405180910390fd5b50565b6117e682611e0b565b6117f08282611f64565b5050565b600033905090565b60008061180883610e88565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061184a5750611849818561155d565b5b8061188857508373ffffffffffffffffffffffffffffffffffffffff16611870846107f3565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b61189c83838361207b565b505050565b6000612710905090565b6118bc816118b76117f4565b612093565b50565b6118c98282611607565b6118ee81600760008581526020019081526020016000206116e890919063ffffffff16565b505050565b6118fd8282612118565b61192281600760008581526020019081526020016000206121fa90919063ffffffff16565b505050565b600080611934601161222a565b90506119408382612238565b61194a60116115f1565b80915050919050565b600061195e82610e88565b905061196e816000846001612455565b61197782610e88565b90506004600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611a9d816000846001612467565b5050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000611aed836000018361246d565b60001c905092915050565b611b0182611e0b565b611b0b8282612498565b5050565b611b1a848484611891565b611b26848484846124ae565b611b65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5c90614c91565b60405180910390fd5b50505050565b606060108054611b7a90614365565b80601f0160208091040260200160405190810160405280929190818152602001828054611ba690614365565b8015611bf35780601f10611bc857610100808354040283529160200191611bf3565b820191906000526020600020905b815481529060010190602001808311611bd657829003601f168201915b5050505050905090565b606060006001611c0c84612635565b01905060008167ffffffffffffffff811115611c2b57611c2a613f38565b5b6040519080825280601f01601f191660200182016040528015611c5d5781602001600182028036833780820191505090505b509050600082602001820190505b600115611cc0578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8581611cb457611cb3614499565b5b04945060008503611c6b575b819350505050919050565b6000611cd982600001612788565b9050919050565b6000611cec8383612799565b611d45578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611d4a565b600090505b92915050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611dc35750611dc2826127bc565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16611dec83611aa1565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611f605760008173ffffffffffffffffffffffffffffffffffffffff163b1480611f1f5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166305a3b809826040518263ffffffff1660e01b8152600401611edd9190613be7565b602060405180830381865afa158015611efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1e9190614a45565b5b611f6157806040517f8371ab02000000000000000000000000000000000000000000000000000000008152600401611f579190613be7565b60405180910390fd5b5b50565b6000611f6f82610e88565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611fdf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd690614d23565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16611ffe6117f4565b73ffffffffffffffffffffffffffffffffffffffff16148061202d575061202c816120276117f4565b61155d565b5b61206c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206390614db5565b60405180910390fd5b61207683836127ce565b505050565b612083612887565b61208e8383836129f3565b505050565b61209d8282611269565b612114576120aa81612cec565b6120b88360001c6020612d19565b6040516020016120c9929190614e6d565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161210b9190613b21565b60405180910390fd5b5050565b6121228282611269565b156121f65760006006600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061219b6117f4565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6000612222836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612f55565b905092915050565b600081600001549050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036122a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229e90614ef3565b60405180910390fd5b6122b081611dca565b156122f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122e790614f5f565b60405180910390fd5b6122fe600083836001612455565b61230781611dca565b15612347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233e90614f5f565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612451600083836001612467565b5050565b61246184848484613069565b50505050565b50505050565b60008260000182815481106124855761248461458b565b5b9060005260206000200154905092915050565b6124aa6124a36117f4565b83836131c7565b5050565b60006124cf8473ffffffffffffffffffffffffffffffffffffffff16613333565b15612628578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026124f86117f4565b8786866040518563ffffffff1660e01b815260040161251a9493929190614fd4565b6020604051808303816000875af192505050801561255657506040513d601f19601f820116820180604052508101906125539190615035565b60015b6125d8573d8060008114612586576040519150601f19603f3d011682016040523d82523d6000602084013e61258b565b606091505b5060008151036125d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125c790614c91565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061262d565b600190505b949350505050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612693577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000838161268957612688614499565b5b0492506040810190505b6d04ee2d6d415b85acef810000000083106126d0576d04ee2d6d415b85acef810000000083816126c6576126c5614499565b5b0492506020810190505b662386f26fc1000083106126ff57662386f26fc1000083816126f5576126f4614499565b5b0492506010810190505b6305f5e1008310612728576305f5e100838161271e5761271d614499565b5b0492506008810190505b612710831061274d57612710838161274357612742614499565b5b0492506004810190505b60648310612770576064838161276657612765614499565b5b0492506002810190505b600a831061277f576001810190505b80915050919050565b600081600001805490509050919050565b600080836001016000848152602001908152602001600020541415905092915050565b60006127c782613356565b9050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661284183610e88565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146129f0573273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806129af5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166305a3b809336040518263ffffffff1660e01b815260040161296d9190613be7565b602060405180830381865afa15801561298a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ae9190614a45565b5b6129f157336040517f937db65f0000000000000000000000000000000000000000000000000000000081526004016129e79190613be7565b60405180910390fd5b5b565b8273ffffffffffffffffffffffffffffffffffffffff16612a1382610e88565b73ffffffffffffffffffffffffffffffffffffffff1614612a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a60906150d4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf90615166565b60405180910390fd5b612ae58383836001612455565b8273ffffffffffffffffffffffffffffffffffffffff16612b0582610e88565b73ffffffffffffffffffffffffffffffffffffffff1614612b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b52906150d4565b60405180910390fd5b6004600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612ce78383836001612467565b505050565b6060612d128273ffffffffffffffffffffffffffffffffffffffff16601460ff16612d19565b9050919050565b606060006002836002612d2c9190614457565b612d369190615186565b67ffffffffffffffff811115612d4f57612d4e613f38565b5b6040519080825280601f01601f191660200182016040528015612d815781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612db957612db861458b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612e1d57612e1c61458b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002612e5d9190614457565b612e679190615186565b90505b6001811115612f07577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110612ea957612ea861458b565b5b1a60f81b828281518110612ec057612ebf61458b565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080612f00906151ba565b9050612e6a565b5060008414612f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f429061522f565b60405180910390fd5b8091505092915050565b6000808360010160008481526020019081526020016000205490506000811461305d576000600182612f87919061524f565b9050600060018660000180549050612f9f919061524f565b905081811461300e576000866000018281548110612fc057612fbf61458b565b5b9060005260206000200154905080876000018481548110612fe457612fe361458b565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b8560000180548061302257613021615283565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613063565b60009150505b92915050565b613075848484846133d0565b60018111156130b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b090615324565b60405180910390fd5b6000829050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603613100576130fb816134f6565b61313f565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161461313e5761313d858261353f565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036131815761317c816136ac565b6131c0565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146131bf576131be848261377d565b5b5b5050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613235576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161322c90615390565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516133269190613a76565b60405180910390a3505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806133c957506133c8826137fc565b5b9050919050565b60018111156134f057600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146134645780600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461345c919061524f565b925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146134ef5780600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546134e79190615186565b925050819055505b5b50505050565b600b80549050600c600083815260200190815260200160002081905550600b81908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161354c84611183565b613556919061524f565b90506000600a600084815260200190815260200160002054905081811461363b576000600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008481526020019081526020016000208190555081600a600083815260200190815260200160002081905550505b600a600084815260200190815260200160002060009055600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b60006001600b805490506136c0919061524f565b90506000600c60008481526020019081526020016000205490506000600b83815481106136f0576136ef61458b565b5b9060005260206000200154905080600b83815481106137125761371161458b565b5b906000526020600020018190555081600c600083815260200190815260200160002081905550600c600085815260200190815260200160002060009055600b80548061376157613760615283565b5b6001900381819060005260206000200160009055905550505050565b600061378883611183565b905081600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000208190555080600a600084815260200190815260200160002081905550505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061386f575061386e82613876565b5b9050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061394157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80613951575061395082613958565b5b9050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a0b816139d6565b8114613a1657600080fd5b50565b600081359050613a2881613a02565b92915050565b600060208284031215613a4457613a436139cc565b5b6000613a5284828501613a19565b91505092915050565b60008115159050919050565b613a7081613a5b565b82525050565b6000602082019050613a8b6000830184613a67565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613acb578082015181840152602081019050613ab0565b60008484015250505050565b6000601f19601f8301169050919050565b6000613af382613a91565b613afd8185613a9c565b9350613b0d818560208601613aad565b613b1681613ad7565b840191505092915050565b60006020820190508181036000830152613b3b8184613ae8565b905092915050565b6000819050919050565b613b5681613b43565b8114613b6157600080fd5b50565b600081359050613b7381613b4d565b92915050565b600060208284031215613b8f57613b8e6139cc565b5b6000613b9d84828501613b64565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613bd182613ba6565b9050919050565b613be181613bc6565b82525050565b6000602082019050613bfc6000830184613bd8565b92915050565b613c0b81613bc6565b8114613c1657600080fd5b50565b600081359050613c2881613c02565b92915050565b60008060408385031215613c4557613c446139cc565b5b6000613c5385828601613c19565b9250506020613c6485828601613b64565b9150509250929050565b613c7781613b43565b82525050565b6000602082019050613c926000830184613c6e565b92915050565b600080600060608486031215613cb157613cb06139cc565b5b6000613cbf86828701613c19565b9350506020613cd086828701613c19565b9250506040613ce186828701613b64565b9150509250925092565b6000819050919050565b613cfe81613ceb565b8114613d0957600080fd5b50565b600081359050613d1b81613cf5565b92915050565b600060208284031215613d3757613d366139cc565b5b6000613d4584828501613d0c565b91505092915050565b613d5781613ceb565b82525050565b6000602082019050613d726000830184613d4e565b92915050565b60008060408385031215613d8f57613d8e6139cc565b5b6000613d9d85828601613b64565b9250506020613dae85828601613b64565b9150509250929050565b6000604082019050613dcd6000830185613bd8565b613dda6020830184613c6e565b9392505050565b60008060408385031215613df857613df76139cc565b5b6000613e0685828601613d0c565b9250506020613e1785828601613c19565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613e5681613bc6565b82525050565b6000613e688383613e4d565b60208301905092915050565b6000602082019050919050565b6000613e8c82613e21565b613e968185613e2c565b9350613ea183613e3d565b8060005b83811015613ed2578151613eb98882613e5c565b9750613ec483613e74565b925050600181019050613ea5565b5085935050505092915050565b60006020820190508181036000830152613ef98184613e81565b905092915050565b600060208284031215613f1757613f166139cc565b5b6000613f2584828501613c19565b91505092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613f7082613ad7565b810181811067ffffffffffffffff82111715613f8f57613f8e613f38565b5b80604052505050565b6000613fa26139c2565b9050613fae8282613f67565b919050565b600067ffffffffffffffff821115613fce57613fcd613f38565b5b613fd782613ad7565b9050602081019050919050565b82818337600083830152505050565b600061400661400184613fb3565b613f98565b90508281526020810184848401111561402257614021613f33565b5b61402d848285613fe4565b509392505050565b600082601f83011261404a57614049613f2e565b5b813561405a848260208601613ff3565b91505092915050565b600060208284031215614079576140786139cc565b5b600082013567ffffffffffffffff811115614097576140966139d1565b5b6140a384828501614035565b91505092915050565b6000819050919050565b60006140d16140cc6140c784613ba6565b6140ac565b613ba6565b9050919050565b60006140e3826140b6565b9050919050565b60006140f5826140d8565b9050919050565b614105816140ea565b82525050565b600060208201905061412060008301846140fc565b92915050565b6000806040838503121561413d5761413c6139cc565b5b600061414b85828601613d0c565b925050602061415c85828601613b64565b9150509250929050565b61416f81613a5b565b811461417a57600080fd5b50565b60008135905061418c81614166565b92915050565b600080604083850312156141a9576141a86139cc565b5b60006141b785828601613c19565b92505060206141c88582860161417d565b9150509250929050565b600067ffffffffffffffff8211156141ed576141ec613f38565b5b6141f682613ad7565b9050602081019050919050565b6000614216614211846141d2565b613f98565b90508281526020810184848401111561423257614231613f33565b5b61423d848285613fe4565b509392505050565b600082601f83011261425a57614259613f2e565b5b813561426a848260208601614203565b91505092915050565b6000806000806080858703121561428d5761428c6139cc565b5b600061429b87828801613c19565b94505060206142ac87828801613c19565b93505060406142bd87828801613b64565b925050606085013567ffffffffffffffff8111156142de576142dd6139d1565b5b6142ea87828801614245565b91505092959194509250565b6000806040838503121561430d5761430c6139cc565b5b600061431b85828601613c19565b925050602061432c85828601613c19565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061437d57607f821691505b6020821081036143905761438f614336565b5b50919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b60006143f2602d83613a9c565b91506143fd82614396565b604082019050919050565b60006020820190508181036000830152614421816143e5565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061446282613b43565b915061446d83613b43565b925082820261447b81613b43565b9150828204841483151761449257614491614428565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006144d382613b43565b91506144de83613b43565b9250826144ee576144ed614499565b5b828204905092915050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b6000614555602b83613a9c565b9150614560826144f9565b604082019050919050565b6000602082019050818103600083015261458481614548565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006145c582613b43565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145f7576145f6614428565b5b600182019050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b600061465e602f83613a9c565b915061466982614602565b604082019050919050565b6000602082019050818103600083015261468d81614651565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b60006146f0602c83613a9c565b91506146fb82614694565b604082019050919050565b6000602082019050818103600083015261471f816146e3565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026147887fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261474b565b614792868361474b565b95508019841693508086168417925050509392505050565b60006147c56147c06147bb84613b43565b6140ac565b613b43565b9050919050565b6000819050919050565b6147df836147aa565b6147f36147eb826147cc565b848454614758565b825550505050565b600090565b6148086147fb565b6148138184846147d6565b505050565b5b818110156148375761482c600082614800565b600181019050614819565b5050565b601f82111561487c5761484d81614726565b6148568461473b565b81016020851015614865578190505b6148796148718561473b565b830182614818565b50505b505050565b600082821c905092915050565b600061489f60001984600802614881565b1980831691505092915050565b60006148b8838361488e565b9150826002028217905092915050565b6148d182613a91565b67ffffffffffffffff8111156148ea576148e9613f38565b5b6148f48254614365565b6148ff82828561483b565b600060209050601f8311600181146149325760008415614920578287015190505b61492a85826148ac565b865550614992565b601f19841661494086614726565b60005b8281101561496857848901518255600182019150602085019450602081019050614943565b868310156149855784890151614981601f89168261488e565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b60006149d0601883613a9c565b91506149db8261499a565b602082019050919050565b600060208201905081810360008301526149ff816149c3565b9050919050565b614a0f816139d6565b82525050565b6000602082019050614a2a6000830184614a06565b92915050565b600081519050614a3f81614166565b92915050565b600060208284031215614a5b57614a5a6139cc565b5b6000614a6984828501614a30565b91505092915050565b7f636f6e747261637420646f6573206e6f7420696d706c656d656e742049526f7960008201527f616c7479416c6c6f776c69737400000000000000000000000000000000000000602082015250565b6000614ace602d83613a9c565b9150614ad982614a72565b604082019050919050565b60006020820190508181036000830152614afd81614ac1565b9050919050565b6000604082019050614b196000830185613bd8565b614b266020830184613bd8565b9392505050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000614b89602983613a9c565b9150614b9482614b2d565b604082019050919050565b60006020820190508181036000830152614bb881614b7c565b9050919050565b600081905092915050565b6000614bd582613a91565b614bdf8185614bbf565b9350614bef818560208601613aad565b80840191505092915050565b6000614c078285614bca565b9150614c138284614bca565b91508190509392505050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000614c7b603283613a9c565b9150614c8682614c1f565b604082019050919050565b60006020820190508181036000830152614caa81614c6e565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000614d0d602183613a9c565b9150614d1882614cb1565b604082019050919050565b60006020820190508181036000830152614d3c81614d00565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b6000614d9f603d83613a9c565b9150614daa82614d43565b604082019050919050565b60006020820190508181036000830152614dce81614d92565b9050919050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000614e0b601783614bbf565b9150614e1682614dd5565b601782019050919050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000614e57601183614bbf565b9150614e6282614e21565b601182019050919050565b6000614e7882614dfe565b9150614e848285614bca565b9150614e8f82614e4a565b9150614e9b8284614bca565b91508190509392505050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000614edd602083613a9c565b9150614ee882614ea7565b602082019050919050565b60006020820190508181036000830152614f0c81614ed0565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000614f49601c83613a9c565b9150614f5482614f13565b602082019050919050565b60006020820190508181036000830152614f7881614f3c565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614fa682614f7f565b614fb08185614f8a565b9350614fc0818560208601613aad565b614fc981613ad7565b840191505092915050565b6000608082019050614fe96000830187613bd8565b614ff66020830186613bd8565b6150036040830185613c6e565b81810360608301526150158184614f9b565b905095945050505050565b60008151905061502f81613a02565b92915050565b60006020828403121561504b5761504a6139cc565b5b600061505984828501615020565b91505092915050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b60006150be602583613a9c565b91506150c982615062565b604082019050919050565b600060208201905081810360008301526150ed816150b1565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000615150602483613a9c565b915061515b826150f4565b604082019050919050565b6000602082019050818103600083015261517f81615143565b9050919050565b600061519182613b43565b915061519c83613b43565b92508282019050808211156151b4576151b3614428565b5b92915050565b60006151c582613b43565b9150600082036151d8576151d7614428565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000615219602083613a9c565b9150615224826151e3565b602082019050919050565b600060208201905081810360008301526152488161520c565b9050919050565b600061525a82613b43565b915061526583613b43565b925082820390508181111561527d5761527c614428565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f455243373231456e756d657261626c653a20636f6e736563757469766520747260008201527f616e7366657273206e6f7420737570706f727465640000000000000000000000602082015250565b600061530e603583613a9c565b9150615319826152b2565b604082019050919050565b6000602082019050818103600083015261533d81615301565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061537a601983613a9c565b915061538582615344565b602082019050919050565b600060208201905081810360008301526153a98161536d565b905091905056fea2646970667358221220f2de678fa1f1a3fc28d8056ba46769331f91c7536f9259f07a82f3f97942823964736f6c63430008110033";
8412
+ const isSuperArgs = (xs) => xs.length > 1;
8413
+ class ImmutableERC721PermissionedMintable__factory extends ContractFactory {
8414
+ constructor(...args) {
8415
+ if (isSuperArgs(args)) {
8416
+ super(...args);
8417
+ }
8418
+ else {
8419
+ super(_abi, _bytecode, args[0]);
8420
+ }
8421
+ }
8422
+ deploy(owner_, name_, symbol_, baseURI_, contractURI_, _receiver, _feeNumerator, overrides) {
8423
+ return super.deploy(owner_, name_, symbol_, baseURI_, contractURI_, _receiver, _feeNumerator, overrides || {});
8424
+ }
8425
+ getDeployTransaction(owner_, name_, symbol_, baseURI_, contractURI_, _receiver, _feeNumerator, overrides) {
8426
+ return super.getDeployTransaction(owner_, name_, symbol_, baseURI_, contractURI_, _receiver, _feeNumerator, overrides || {});
8427
+ }
8428
+ attach(address) {
8429
+ return super.attach(address);
8430
+ }
8431
+ connect(signer) {
8432
+ return super.connect(signer);
8433
+ }
8434
+ static bytecode = _bytecode;
8435
+ static abi = _abi;
8436
+ static createInterface() {
8437
+ return new utils.Interface(_abi);
8438
+ }
8439
+ static connect(address, signerOrProvider) {
8440
+ return new Contract(address, _abi, signerOrProvider);
8441
+ }
8442
+ }
8443
+
8444
+ class ERC20 {
8445
+ contract;
8446
+ constructor(contractAddress) {
8447
+ const factory = new ERC20__factory();
8448
+ this.contract = factory.attach(contractAddress);
8449
+ }
8450
+ /**
8451
+ * @returns a promise that resolves with a populated transaction
8452
+ */
8453
+ async totalSupply(overrides) {
8454
+ return this.contract.populateTransaction.totalSupply(overrides);
8455
+ }
8456
+ /**
8457
+ * @returns a promise that resolves with a populated transaction
8458
+ */
8459
+ async balanceOf(account, overrides) {
8460
+ return this.contract.populateTransaction.balanceOf(account, overrides);
8461
+ }
8462
+ /**
8463
+ * @returns a promise that resolves with a populated transaction
8464
+ */
8465
+ async transfer(to, amount, overrides) {
8466
+ return this.contract.populateTransaction.transfer(to, amount, overrides);
8467
+ }
8468
+ /**
8469
+ * @returns a promise that resolves with a populated transaction
8470
+ */
8471
+ async allowance(owner, spender, overrides) {
8472
+ return this.contract.populateTransaction.allowance(owner, spender, overrides);
8473
+ }
8474
+ /**
8475
+ * @returns a promise that resolves with a populated transaction
8476
+ */
8477
+ async approve(spender, amount, overrides) {
8478
+ return this.contract.populateTransaction.approve(spender, amount, overrides);
8479
+ }
8480
+ /**
8481
+ * @returns a promise that resolves with a populated transaction
8482
+ */
8483
+ async transferFrom(from, to, amount, overrides) {
8484
+ return this.contract.populateTransaction.transferFrom(from, to, amount, overrides);
8485
+ }
8486
+ }
8487
+
8488
+ class ERC721PermissionedMintable {
8489
+ contract;
8490
+ constructor(contractAddress) {
8491
+ const factory = new ImmutableERC721PermissionedMintable__factory();
8492
+ this.contract = factory.attach(contractAddress);
8493
+ }
8494
+ /**
8495
+ * @returns a promise that resolves with a populated transaction
8496
+ */
8497
+ async DEFAULT_ADMIN_ROLE(overrides) {
8498
+ return await this.contract.populateTransaction.DEFAULT_ADMIN_ROLE(overrides);
8499
+ }
8500
+ /**
8501
+ * @returns a promise that resolves with a populated transaction
8502
+ */
8503
+ async MINTER_ROLE(overrides) {
8504
+ return await this.contract.populateTransaction.MINTER_ROLE(overrides);
8505
+ }
8506
+ /**
8507
+ * @returns a promise that resolves with a populated transaction
8508
+ */
8509
+ async approve(to, tokenId, overrides) {
8510
+ return await this.contract.populateTransaction.approve(to, tokenId, overrides);
8511
+ }
8512
+ /**
8513
+ * @returns a promise that resolves with a populated transaction
8514
+ */
8515
+ async balanceOf(owner, overrides) {
8516
+ return await this.contract.populateTransaction.balanceOf(owner, overrides);
8517
+ }
8518
+ /**
8519
+ * @returns a promise that resolves with a populated transaction
8520
+ */
8521
+ async baseURI(overrides) {
8522
+ return await this.contract.populateTransaction.baseURI(overrides);
8523
+ }
8524
+ /**
8525
+ * @returns a promise that resolves with a populated transaction
8526
+ */
8527
+ async burn(tokenId, overrides) {
8528
+ return await this.contract.populateTransaction.burn(tokenId, overrides);
8529
+ }
8530
+ /**
8531
+ * @returns a promise that resolves with a populated transaction
8532
+ */
8533
+ async contractURI(overrides) {
8534
+ return await this.contract.populateTransaction.contractURI(overrides);
8535
+ }
8536
+ /**
8537
+ * @returns a promise that resolves with a populated transaction
8538
+ */
8539
+ async getAdmins(overrides) {
8540
+ return await this.contract.populateTransaction.getAdmins(overrides);
8541
+ }
8542
+ /**
8543
+ * @returns a promise that resolves with a populated transaction
8544
+ */
8545
+ async getApproved(tokenId, overrides) {
8546
+ return await this.contract.populateTransaction.getApproved(tokenId, overrides);
8547
+ }
8548
+ /**
8549
+ * @returns a promise that resolves with a populated transaction
8550
+ */
8551
+ async getRoleAdmin(role, overrides) {
8552
+ return await this.contract.populateTransaction.getRoleAdmin(role, overrides);
8553
+ }
8554
+ /**
8555
+ * @returns a promise that resolves with a populated transaction
8556
+ */
8557
+ async getRoleMember(role, index, overrides) {
8558
+ return await this.contract.populateTransaction.getRoleMember(role, index, overrides);
8559
+ }
8560
+ /**
8561
+ * @returns a promise that resolves with a populated transaction
8562
+ */
8563
+ async getRoleMemberCount(role, overrides) {
8564
+ return await this.contract.populateTransaction.getRoleMemberCount(role, overrides);
8565
+ }
8566
+ /**
8567
+ * @returns a promise that resolves with a populated transaction
8568
+ */
8569
+ async grantMinterRole(user, overrides) {
8570
+ return await this.contract.populateTransaction.grantMinterRole(user, overrides);
8571
+ }
8572
+ /**
8573
+ * @returns a promise that resolves with a populated transaction
8574
+ */
8575
+ async grantRole(role, account, overrides) {
8576
+ return await this.contract.populateTransaction.grantRole(role, account, overrides);
8577
+ }
8578
+ /**
8579
+ * @returns a promise that resolves with a populated transaction
8580
+ */
8581
+ async hasRole(role, account, overrides) {
8582
+ return await this.contract.populateTransaction.hasRole(role, account, overrides);
8583
+ }
8584
+ /**
8585
+ * @returns a promise that resolves with a populated transaction
8586
+ */
8587
+ async isApprovedForAll(owner, operator, overrides) {
8588
+ return await this.contract.populateTransaction.isApprovedForAll(owner, operator, overrides);
8589
+ }
8590
+ /**
8591
+ * @returns a promise that resolves with a populated transaction
8592
+ */
8593
+ async mint(to, amount, overrides) {
8594
+ return await this.contract.populateTransaction.mint(to, amount, overrides);
8595
+ }
8596
+ /**
8597
+ * @returns a promise that resolves with a populated transaction
8598
+ */
8599
+ async name(overrides) {
8600
+ return await this.contract.populateTransaction.name(overrides);
8601
+ }
8602
+ /**
8603
+ * @returns a promise that resolves with a populated transaction
8604
+ */
8605
+ async ownerOf(tokenId, overrides) {
8606
+ return await this.contract.populateTransaction.ownerOf(tokenId, overrides);
8607
+ }
8608
+ /**
8609
+ * @returns a promise that resolves with a populated transaction
8610
+ */
8611
+ async renounceRole(role, account, overrides) {
8612
+ return await this.contract.populateTransaction.renounceRole(role, account, overrides);
8613
+ }
8614
+ /**
8615
+ * @returns a promise that resolves with a populated transaction
8616
+ */
8617
+ async revokeMinterRole(user, overrides) {
8618
+ return await this.contract.populateTransaction.revokeMinterRole(user, overrides);
8619
+ }
8620
+ /**
8621
+ * @returns a promise that resolves with a populated transaction
8622
+ */
8623
+ async revokeRole(role, account, overrides) {
8624
+ return await this.contract.populateTransaction.revokeRole(role, account, overrides);
8625
+ }
8626
+ /**
8627
+ * @returns a promise that resolves with a populated transaction
8628
+ */
8629
+ async royaltyAllowlist(overrides) {
8630
+ return await this.contract.populateTransaction.royaltyAllowlist(overrides);
8631
+ }
8632
+ /**
8633
+ * @returns a promise that resolves with a populated transaction
8634
+ */
8635
+ async royaltyInfo(_tokenId, _salePrice, overrides) {
8636
+ return await this.contract.populateTransaction.royaltyInfo(_tokenId, _salePrice, overrides);
8637
+ }
8638
+ /**
8639
+ * @returns a promise that resolves with a populated transaction
8640
+ */
8641
+ async 'safeTransferFrom(address,address,uint256)'(from, to, tokenId, overrides) {
8642
+ return await this.contract.populateTransaction['safeTransferFrom(address,address,uint256)'](from, to, tokenId, overrides);
8643
+ }
8644
+ /**
8645
+ * @returns a promise that resolves with a populated transaction
8646
+ */
8647
+ async 'safeTransferFrom(address,address,uint256,bytes)'(from, to, tokenId, data, overrides) {
8648
+ return await this.contract.populateTransaction['safeTransferFrom(address,address,uint256,bytes)'](from, to, tokenId, data, overrides);
8649
+ }
8650
+ /**
8651
+ * @returns a promise that resolves with a populated transaction
8652
+ */
8653
+ async setApprovalForAll(operator, approved, overrides) {
8654
+ return await this.contract.populateTransaction.setApprovalForAll(operator, approved, overrides);
8655
+ }
8656
+ /**
8657
+ * @returns a promise that resolves with a populated transaction
8658
+ */
8659
+ async setBaseURI(baseURI_, overrides) {
8660
+ return await this.contract.populateTransaction.setBaseURI(baseURI_, overrides);
8661
+ }
8662
+ /**
8663
+ * @returns a promise that resolves with a populated transaction
8664
+ */
8665
+ async setContractURI(_contractURI, overrides) {
8666
+ return await this.contract.populateTransaction.setContractURI(_contractURI, overrides);
8667
+ }
8668
+ /**
8669
+ * @returns a promise that resolves with a populated transaction
8670
+ */
8671
+ async setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides) {
8672
+ return await this.contract.populateTransaction.setRoyaltyAllowlistRegistry(_royaltyAllowlist, overrides);
8673
+ }
8674
+ /**
8675
+ * @returns a promise that resolves with a populated transaction
8676
+ */
8677
+ async symbol(overrides) {
8678
+ return await this.contract.populateTransaction.symbol(overrides);
8679
+ }
8680
+ /**
8681
+ * @returns a promise that resolves with a populated transaction
8682
+ */
8683
+ async tokenByIndex(index, overrides) {
8684
+ return await this.contract.populateTransaction.tokenByIndex(index, overrides);
8685
+ }
8686
+ /**
8687
+ * @returns a promise that resolves with a populated transaction
8688
+ */
8689
+ async tokenOfOwnerByIndex(owner, index, overrides) {
8690
+ return await this.contract.populateTransaction.tokenOfOwnerByIndex(owner, index, overrides);
8691
+ }
8692
+ /**
8693
+ * @returns a promise that resolves with a populated transaction
8694
+ */
8695
+ async tokenURI(tokenId, overrides) {
8696
+ return await this.contract.populateTransaction.tokenURI(tokenId, overrides);
8697
+ }
8698
+ /**
8699
+ * @returns a promise that resolves with a populated transaction
8700
+ */
8701
+ async totalSupply(overrides) {
8702
+ return await this.contract.populateTransaction.totalSupply(overrides);
8703
+ }
8704
+ }
6705
8705
 
6706
- export { APIError, BlockchainData, $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $baec09ddc3013323$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, Environment, $d087956fd1002f80$export$fa517eee6594d26c as ExampleReact, GenericIMXProvider, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $045213b18e9f1f94$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, Orderbook, Passport, PassportError, ProviderConfiguration, $430e3eda76fa4d5f$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme, erc20, erc721permissionedmintable, module };
8706
+ export { APIError, BlockchainData, $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $98cbcca465beec95$export$90db5fe1be5993c1 as BuyEventType, $f22931ca9e2f35b6$export$d13582032b79b401 as BuyReact, $baec09ddc3013323$export$c06e1e7429de6283 as ChainId, $a8cb37a3fc8eb863$export$1f60ba4ec72508a0 as Checkout, $a8bc256d81a5e2c1$export$e3dc0620abde7f5a as CheckoutErrorType, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $d176a05e966364ba$export$3bfad4d03ada24c4 as ConnectionProviders, ERC20, ERC721PermissionedMintable, Environment, $d087956fd1002f80$export$fa517eee6594d26c as ExampleReact, GenericIMXProvider, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, ImmutableConfiguration, ImmutableXClient, MetaMaskIMXProvider, $045213b18e9f1f94$export$95be4ae94445245a as Network, $a47e48dd2c04791b$export$1f05a55fe0680cc7 as NetworkFilterTypes, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, Orderbook, Passport, PassportError, ProviderConfiguration, $430e3eda76fa4d5f$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $08d5ddc39acd6833$export$fd9b17d87f4121d2 as TokenFilterTypes, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $4f91c5f280efe242$export$a75605c67ea83a5a as WalletFilterTypes, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme, module };