@imtbl/sdk 1.7.1 → 1.7.3-alpha.1
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/blockchain_data.d.ts +493 -288
- package/dist/blockchain_data.js +152 -4
- package/dist/browser/checkout/sdk.js +7 -7
- package/dist/browser/checkout/widgets.js +63 -63
- package/dist/checkout.d.ts +11 -0
- package/dist/checkout.js +157 -8
- package/dist/config.js +4 -3
- package/dist/index.browser.js +13 -13
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +177 -13
- package/dist/index.d.ts +489 -273
- package/dist/index.js +177 -13
- package/dist/orderbook.js +4 -3
- package/dist/passport.js +151 -8
- package/dist/x.js +5 -4
- package/package.json +1 -1
package/dist/checkout.d.ts
CHANGED
|
@@ -22397,6 +22397,7 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
|
|
|
22397
22397
|
/**
|
|
22398
22398
|
* A type representing various remotely defined configurations which are
|
|
22399
22399
|
* accessible via the Checkout config and configured based on the Environment.
|
|
22400
|
+
* @property {ConnectConfig} connect
|
|
22400
22401
|
* @property {DexConfig} dex
|
|
22401
22402
|
* @property {OnRampConfig} onramp
|
|
22402
22403
|
* @property {BridgeConfig} bridge
|
|
@@ -22406,6 +22407,8 @@ interface CheckoutModuleConfiguration extends ModuleConfiguration<CheckoutOverri
|
|
|
22406
22407
|
* @property {TelemetryConfig | undefined} telemetry
|
|
22407
22408
|
*/
|
|
22408
22409
|
type RemoteConfiguration = {
|
|
22410
|
+
/** The config used for the Connect. */
|
|
22411
|
+
connect: ConnectConfig;
|
|
22409
22412
|
/** The config used for the DEX. */
|
|
22410
22413
|
dex: DexConfig;
|
|
22411
22414
|
/** The config used for the OnRamp */
|
|
@@ -22457,6 +22460,14 @@ type OnRampConfig = {
|
|
|
22457
22460
|
/** OnRamp config for Transak provider */
|
|
22458
22461
|
[key: string]: OnRampProviderConfig;
|
|
22459
22462
|
};
|
|
22463
|
+
/**
|
|
22464
|
+
* A type representing the configuration for the Connect.
|
|
22465
|
+
* @property {boolean} walletConnect
|
|
22466
|
+
*/
|
|
22467
|
+
type ConnectConfig = {
|
|
22468
|
+
/** A boolean value for enabling/disabling WalletConnect */
|
|
22469
|
+
walletConnect: boolean;
|
|
22470
|
+
};
|
|
22460
22471
|
/**
|
|
22461
22472
|
* A type representing the configuration for the DEX.
|
|
22462
22473
|
* @property {ExchangeOverrides | undefined} overrides
|
package/dist/checkout.js
CHANGED
|
@@ -107,7 +107,7 @@ const storeDetail$1 = (key, value) => {
|
|
|
107
107
|
};
|
|
108
108
|
setItem$1(Store$1.RUNTIME, RUNTIME_DETAILS$1);
|
|
109
109
|
};
|
|
110
|
-
const getDetail$1 = (key) => {
|
|
110
|
+
const getDetail$1$1 = (key) => {
|
|
111
111
|
// Handle the scenario where detail is a falsy value
|
|
112
112
|
if (RUNTIME_DETAILS$1[key] === undefined) {
|
|
113
113
|
return undefined;
|
|
@@ -139,7 +139,7 @@ const flattenProperties$1 = (properties) => {
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
142
|
-
const SDK_VERSION$1 = '1.7.1';
|
|
142
|
+
const SDK_VERSION$1 = '1.7.3-alpha.1';
|
|
143
143
|
const getReferrer$1 = () => {
|
|
144
144
|
if (isNode$1()) {
|
|
145
145
|
return '';
|
|
@@ -182,7 +182,7 @@ const initialise$2 = async () => {
|
|
|
182
182
|
initialised$1 = true;
|
|
183
183
|
try {
|
|
184
184
|
const runtimeDetails = flattenProperties$1(getRuntimeDetails$1());
|
|
185
|
-
const existingRuntimeId = getDetail$1(Detail$1.RUNTIME_ID);
|
|
185
|
+
const existingRuntimeId = getDetail$1$1(Detail$1.RUNTIME_ID);
|
|
186
186
|
const body = {
|
|
187
187
|
version: 1,
|
|
188
188
|
data: {
|
|
@@ -314,6 +314,7 @@ const setPublishableApiKeyFn$1 = (publishableApiKey) => {
|
|
|
314
314
|
storeDetail$1(Detail$1.PUBLISHABLE_API_KEY, publishableApiKey);
|
|
315
315
|
};
|
|
316
316
|
errorBoundary$1(getGlobalisedValue$2('setPublishableApiKey', setPublishableApiKeyFn$1));
|
|
317
|
+
errorBoundary$1(getGlobalisedValue$2('getDetail', getDetail$1$1));
|
|
317
318
|
|
|
318
319
|
var Environment$1;
|
|
319
320
|
(function (Environment) {
|
|
@@ -17446,7 +17447,7 @@ const storeDetail = (key, value) => {
|
|
|
17446
17447
|
};
|
|
17447
17448
|
setItem(Store.RUNTIME, RUNTIME_DETAILS);
|
|
17448
17449
|
};
|
|
17449
|
-
const getDetail = (key) => {
|
|
17450
|
+
const getDetail$1 = (key) => {
|
|
17450
17451
|
// Handle the scenario where detail is a falsy value
|
|
17451
17452
|
if (RUNTIME_DETAILS[key] === undefined) {
|
|
17452
17453
|
return undefined;
|
|
@@ -17478,7 +17479,7 @@ const flattenProperties = (properties) => {
|
|
|
17478
17479
|
};
|
|
17479
17480
|
|
|
17480
17481
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
17481
|
-
const SDK_VERSION = '1.7.1';
|
|
17482
|
+
const SDK_VERSION = '1.7.3-alpha.1';
|
|
17482
17483
|
const getReferrer = () => {
|
|
17483
17484
|
if (isNode()) {
|
|
17484
17485
|
return '';
|
|
@@ -17521,7 +17522,7 @@ const initialise = async () => {
|
|
|
17521
17522
|
initialised = true;
|
|
17522
17523
|
try {
|
|
17523
17524
|
const runtimeDetails = flattenProperties(getRuntimeDetails());
|
|
17524
|
-
const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
|
|
17525
|
+
const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
|
|
17525
17526
|
const body = {
|
|
17526
17527
|
version: 1,
|
|
17527
17528
|
data: {
|
|
@@ -17653,6 +17654,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
|
|
|
17653
17654
|
storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
|
|
17654
17655
|
};
|
|
17655
17656
|
errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
|
|
17657
|
+
errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
|
|
17656
17658
|
|
|
17657
17659
|
var Environment;
|
|
17658
17660
|
(function (Environment) {
|
|
@@ -24946,6 +24948,85 @@ class NftOwnersApi extends BaseAPI {
|
|
|
24946
24948
|
*/
|
|
24947
24949
|
const NftsApiAxiosParamCreator = function (configuration) {
|
|
24948
24950
|
return {
|
|
24951
|
+
/**
|
|
24952
|
+
* Create a mint request to mint a set of NFTs for a given collection
|
|
24953
|
+
* @summary Mint NFTs
|
|
24954
|
+
* @param {string} contractAddress The address of contract
|
|
24955
|
+
* @param {string} chainName The name of chain
|
|
24956
|
+
* @param {CreateMintRequestRequest} createMintRequestRequest the request body
|
|
24957
|
+
* @param {*} [options] Override http request option.
|
|
24958
|
+
* @throws {RequiredError}
|
|
24959
|
+
*/
|
|
24960
|
+
createMintRequest: async (contractAddress, chainName, createMintRequestRequest, options = {}) => {
|
|
24961
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
24962
|
+
assertParamExists('createMintRequest', 'contractAddress', contractAddress);
|
|
24963
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
24964
|
+
assertParamExists('createMintRequest', 'chainName', chainName);
|
|
24965
|
+
// verify required parameter 'createMintRequestRequest' is not null or undefined
|
|
24966
|
+
assertParamExists('createMintRequest', 'createMintRequestRequest', createMintRequestRequest);
|
|
24967
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests`
|
|
24968
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
24969
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)));
|
|
24970
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
24971
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
24972
|
+
let baseOptions;
|
|
24973
|
+
if (configuration) {
|
|
24974
|
+
baseOptions = configuration.baseOptions;
|
|
24975
|
+
}
|
|
24976
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
24977
|
+
const localVarHeaderParameter = {};
|
|
24978
|
+
const localVarQueryParameter = {};
|
|
24979
|
+
// authentication ImmutableApiKey required
|
|
24980
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
|
|
24981
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
24982
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
24983
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
24984
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
24985
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createMintRequestRequest, localVarRequestOptions, configuration);
|
|
24986
|
+
return {
|
|
24987
|
+
url: toPathString(localVarUrlObj),
|
|
24988
|
+
options: localVarRequestOptions,
|
|
24989
|
+
};
|
|
24990
|
+
},
|
|
24991
|
+
/**
|
|
24992
|
+
* Retrieve the status of a mint request identified by its reference_id
|
|
24993
|
+
* @summary Mint NFTs
|
|
24994
|
+
* @param {string} contractAddress The address of contract
|
|
24995
|
+
* @param {string} chainName The name of chain
|
|
24996
|
+
* @param {string} referenceId The ID of the mint request
|
|
24997
|
+
* @param {*} [options] Override http request option.
|
|
24998
|
+
* @throws {RequiredError}
|
|
24999
|
+
*/
|
|
25000
|
+
getMintRequest: async (contractAddress, chainName, referenceId, options = {}) => {
|
|
25001
|
+
// verify required parameter 'contractAddress' is not null or undefined
|
|
25002
|
+
assertParamExists('getMintRequest', 'contractAddress', contractAddress);
|
|
25003
|
+
// verify required parameter 'chainName' is not null or undefined
|
|
25004
|
+
assertParamExists('getMintRequest', 'chainName', chainName);
|
|
25005
|
+
// verify required parameter 'referenceId' is not null or undefined
|
|
25006
|
+
assertParamExists('getMintRequest', 'referenceId', referenceId);
|
|
25007
|
+
const localVarPath = `/v1/chains/{chain_name}/collections/{contract_address}/nfts/mint-requests/{reference_id}`
|
|
25008
|
+
.replace(`{${"contract_address"}}`, encodeURIComponent(String(contractAddress)))
|
|
25009
|
+
.replace(`{${"chain_name"}}`, encodeURIComponent(String(chainName)))
|
|
25010
|
+
.replace(`{${"reference_id"}}`, encodeURIComponent(String(referenceId)));
|
|
25011
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
25012
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
25013
|
+
let baseOptions;
|
|
25014
|
+
if (configuration) {
|
|
25015
|
+
baseOptions = configuration.baseOptions;
|
|
25016
|
+
}
|
|
25017
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
25018
|
+
const localVarHeaderParameter = {};
|
|
25019
|
+
const localVarQueryParameter = {};
|
|
25020
|
+
// authentication ImmutableApiKey required
|
|
25021
|
+
await setApiKeyToObject(localVarHeaderParameter, "x-immutable-api-key", configuration);
|
|
25022
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
25023
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
25024
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
25025
|
+
return {
|
|
25026
|
+
url: toPathString(localVarUrlObj),
|
|
25027
|
+
options: localVarRequestOptions,
|
|
25028
|
+
};
|
|
25029
|
+
},
|
|
24949
25030
|
/**
|
|
24950
25031
|
* Get NFT by token ID
|
|
24951
25032
|
* @summary Get NFT by token ID
|
|
@@ -25131,6 +25212,32 @@ const NftsApiAxiosParamCreator = function (configuration) {
|
|
|
25131
25212
|
const NftsApiFp = function (configuration) {
|
|
25132
25213
|
const localVarAxiosParamCreator = NftsApiAxiosParamCreator(configuration);
|
|
25133
25214
|
return {
|
|
25215
|
+
/**
|
|
25216
|
+
* Create a mint request to mint a set of NFTs for a given collection
|
|
25217
|
+
* @summary Mint NFTs
|
|
25218
|
+
* @param {string} contractAddress The address of contract
|
|
25219
|
+
* @param {string} chainName The name of chain
|
|
25220
|
+
* @param {CreateMintRequestRequest} createMintRequestRequest the request body
|
|
25221
|
+
* @param {*} [options] Override http request option.
|
|
25222
|
+
* @throws {RequiredError}
|
|
25223
|
+
*/
|
|
25224
|
+
async createMintRequest(contractAddress, chainName, createMintRequestRequest, options) {
|
|
25225
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createMintRequest(contractAddress, chainName, createMintRequestRequest, options);
|
|
25226
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
25227
|
+
},
|
|
25228
|
+
/**
|
|
25229
|
+
* Retrieve the status of a mint request identified by its reference_id
|
|
25230
|
+
* @summary Mint NFTs
|
|
25231
|
+
* @param {string} contractAddress The address of contract
|
|
25232
|
+
* @param {string} chainName The name of chain
|
|
25233
|
+
* @param {string} referenceId The ID of the mint request
|
|
25234
|
+
* @param {*} [options] Override http request option.
|
|
25235
|
+
* @throws {RequiredError}
|
|
25236
|
+
*/
|
|
25237
|
+
async getMintRequest(contractAddress, chainName, referenceId, options) {
|
|
25238
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getMintRequest(contractAddress, chainName, referenceId, options);
|
|
25239
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
25240
|
+
},
|
|
25134
25241
|
/**
|
|
25135
25242
|
* Get NFT by token ID
|
|
25136
25243
|
* @summary Get NFT by token ID
|
|
@@ -25198,6 +25305,26 @@ const NftsApiFp = function (configuration) {
|
|
|
25198
25305
|
const NftsApiFactory = function (configuration, basePath, axios) {
|
|
25199
25306
|
const localVarFp = NftsApiFp(configuration);
|
|
25200
25307
|
return {
|
|
25308
|
+
/**
|
|
25309
|
+
* Create a mint request to mint a set of NFTs for a given collection
|
|
25310
|
+
* @summary Mint NFTs
|
|
25311
|
+
* @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
|
|
25312
|
+
* @param {*} [options] Override http request option.
|
|
25313
|
+
* @throws {RequiredError}
|
|
25314
|
+
*/
|
|
25315
|
+
createMintRequest(requestParameters, options) {
|
|
25316
|
+
return localVarFp.createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(axios, basePath));
|
|
25317
|
+
},
|
|
25318
|
+
/**
|
|
25319
|
+
* Retrieve the status of a mint request identified by its reference_id
|
|
25320
|
+
* @summary Mint NFTs
|
|
25321
|
+
* @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
|
|
25322
|
+
* @param {*} [options] Override http request option.
|
|
25323
|
+
* @throws {RequiredError}
|
|
25324
|
+
*/
|
|
25325
|
+
getMintRequest(requestParameters, options) {
|
|
25326
|
+
return localVarFp.getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(axios, basePath));
|
|
25327
|
+
},
|
|
25201
25328
|
/**
|
|
25202
25329
|
* Get NFT by token ID
|
|
25203
25330
|
* @summary Get NFT by token ID
|
|
@@ -25247,6 +25374,28 @@ const NftsApiFactory = function (configuration, basePath, axios) {
|
|
|
25247
25374
|
* @extends {BaseAPI}
|
|
25248
25375
|
*/
|
|
25249
25376
|
class NftsApi extends BaseAPI {
|
|
25377
|
+
/**
|
|
25378
|
+
* Create a mint request to mint a set of NFTs for a given collection
|
|
25379
|
+
* @summary Mint NFTs
|
|
25380
|
+
* @param {NftsApiCreateMintRequestRequest} requestParameters Request parameters.
|
|
25381
|
+
* @param {*} [options] Override http request option.
|
|
25382
|
+
* @throws {RequiredError}
|
|
25383
|
+
* @memberof NftsApi
|
|
25384
|
+
*/
|
|
25385
|
+
createMintRequest(requestParameters, options) {
|
|
25386
|
+
return NftsApiFp(this.configuration).createMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.createMintRequestRequest, options).then((request) => request(this.axios, this.basePath));
|
|
25387
|
+
}
|
|
25388
|
+
/**
|
|
25389
|
+
* Retrieve the status of a mint request identified by its reference_id
|
|
25390
|
+
* @summary Mint NFTs
|
|
25391
|
+
* @param {NftsApiGetMintRequestRequest} requestParameters Request parameters.
|
|
25392
|
+
* @param {*} [options] Override http request option.
|
|
25393
|
+
* @throws {RequiredError}
|
|
25394
|
+
* @memberof NftsApi
|
|
25395
|
+
*/
|
|
25396
|
+
getMintRequest(requestParameters, options) {
|
|
25397
|
+
return NftsApiFp(this.configuration).getMintRequest(requestParameters.contractAddress, requestParameters.chainName, requestParameters.referenceId, options).then((request) => request(this.axios, this.basePath));
|
|
25398
|
+
}
|
|
25250
25399
|
/**
|
|
25251
25400
|
* Get NFT by token ID
|
|
25252
25401
|
* @summary Get NFT by token ID
|
|
@@ -27723,7 +27872,7 @@ class APIError extends Error {
|
|
|
27723
27872
|
|
|
27724
27873
|
/* eslint-disable implicit-arrow-linebreak */
|
|
27725
27874
|
const defaultHeaders = {
|
|
27726
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.1',
|
|
27875
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.7.3-alpha.1',
|
|
27727
27876
|
};
|
|
27728
27877
|
/**
|
|
27729
27878
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -29090,7 +29239,7 @@ const IMMUTABLE_ZKVEM_GAS_OVERRIDES = {
|
|
|
29090
29239
|
maxPriorityFeePerGas: BigNumber$1.from(10e9),
|
|
29091
29240
|
};
|
|
29092
29241
|
|
|
29093
|
-
const SDK_VERSION_MARKER = '1.7.1';
|
|
29242
|
+
const SDK_VERSION_MARKER = '1.7.3-alpha.1';
|
|
29094
29243
|
// This SDK version is replaced by the `yarn build` command ran on the root level
|
|
29095
29244
|
const globalPackageVersion = () => SDK_VERSION_MARKER;
|
|
29096
29245
|
|
package/dist/config.js
CHANGED
|
@@ -96,7 +96,7 @@ const storeDetail = (key, value) => {
|
|
|
96
96
|
};
|
|
97
97
|
setItem(Store.RUNTIME, RUNTIME_DETAILS);
|
|
98
98
|
};
|
|
99
|
-
const getDetail = (key) => {
|
|
99
|
+
const getDetail$1 = (key) => {
|
|
100
100
|
// Handle the scenario where detail is a falsy value
|
|
101
101
|
if (RUNTIME_DETAILS[key] === undefined) {
|
|
102
102
|
return undefined;
|
|
@@ -128,7 +128,7 @@ const flattenProperties = (properties) => {
|
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
131
|
-
const SDK_VERSION = '1.7.1';
|
|
131
|
+
const SDK_VERSION = '1.7.3-alpha.1';
|
|
132
132
|
const getReferrer = () => {
|
|
133
133
|
if (isNode()) {
|
|
134
134
|
return '';
|
|
@@ -171,7 +171,7 @@ const initialise = async () => {
|
|
|
171
171
|
initialised = true;
|
|
172
172
|
try {
|
|
173
173
|
const runtimeDetails = flattenProperties(getRuntimeDetails());
|
|
174
|
-
const existingRuntimeId = getDetail(Detail.RUNTIME_ID);
|
|
174
|
+
const existingRuntimeId = getDetail$1(Detail.RUNTIME_ID);
|
|
175
175
|
const body = {
|
|
176
176
|
version: 1,
|
|
177
177
|
data: {
|
|
@@ -303,6 +303,7 @@ const setPublishableApiKeyFn = (publishableApiKey) => {
|
|
|
303
303
|
storeDetail(Detail.PUBLISHABLE_API_KEY, publishableApiKey);
|
|
304
304
|
};
|
|
305
305
|
const setPublishableApiKey = errorBoundary(getGlobalisedValue('setPublishableApiKey', setPublishableApiKeyFn));
|
|
306
|
+
errorBoundary(getGlobalisedValue('getDetail', getDetail$1));
|
|
306
307
|
|
|
307
308
|
var Environment;
|
|
308
309
|
(function (Environment) {
|