@imtbl/sdk 1.38.0-alpha.1 → 1.38.0
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.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.js +4 -4
- package/dist/config.js +1 -1
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +15 -612
- package/dist/index.d.ts +7 -139
- package/dist/index.js +16 -611
- package/dist/orderbook.js +1 -1
- package/dist/passport.js +4 -4
- package/dist/x.js +3 -3
- package/package.json +1 -9
- package/dist/minting_backend.d.ts +0 -3528
- package/dist/minting_backend.js +0 -6600
- package/dist/webhook.d.ts +0 -11
- package/dist/webhook.js +0 -388
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Pool } from 'pg';
|
|
3
|
-
|
|
4
2
|
declare enum Environment {
|
|
5
3
|
PRODUCTION = "production",
|
|
6
4
|
SANDBOX = "sandbox"
|
|
@@ -7843,7 +7841,7 @@ interface MintUser$1 {
|
|
|
7843
7841
|
* @export
|
|
7844
7842
|
* @interface MintRequest
|
|
7845
7843
|
*/
|
|
7846
|
-
interface MintRequest$
|
|
7844
|
+
interface MintRequest$1 {
|
|
7847
7845
|
/**
|
|
7848
7846
|
* Signature from authorised minter
|
|
7849
7847
|
* @type {string}
|
|
@@ -10822,7 +10820,7 @@ interface MintsApiMintTokensRequest$1 {
|
|
|
10822
10820
|
* @type {Array<MintRequest>}
|
|
10823
10821
|
* @memberof MintsApiMintTokens
|
|
10824
10822
|
*/
|
|
10825
|
-
readonly mintTokensRequestV2: Array<MintRequest$
|
|
10823
|
+
readonly mintTokensRequestV2: Array<MintRequest$1>;
|
|
10826
10824
|
}
|
|
10827
10825
|
/**
|
|
10828
10826
|
* MintsApi - object-oriented interface
|
|
@@ -21028,7 +21026,7 @@ type UnsignedTransferRequest = TokenAmount & {
|
|
|
21028
21026
|
/**
|
|
21029
21027
|
* Parameter required to Mint tokens
|
|
21030
21028
|
*/
|
|
21031
|
-
type UnsignedMintRequest = Omit<MintRequest$
|
|
21029
|
+
type UnsignedMintRequest = Omit<MintRequest$1, 'auth_signature'>;
|
|
21032
21030
|
/**
|
|
21033
21031
|
* Parameter required to create a Transfer
|
|
21034
21032
|
*/
|
|
@@ -21186,7 +21184,7 @@ interface MetadataSchemaRequest extends MetadataSchemaRequest$1 {
|
|
|
21186
21184
|
}
|
|
21187
21185
|
interface MintFee extends MintFee$1 {
|
|
21188
21186
|
}
|
|
21189
|
-
interface MintRequest
|
|
21187
|
+
interface MintRequest extends MintRequest$1 {
|
|
21190
21188
|
}
|
|
21191
21189
|
interface MintTokenDataV2 extends MintTokenDataV2$1 {
|
|
21192
21190
|
}
|
|
@@ -29162,6 +29160,7 @@ declare const x_d_MetadataRefreshesApi: typeof MetadataRefreshesApi;
|
|
|
29162
29160
|
type x_d_MetadataSchemaRequest = MetadataSchemaRequest;
|
|
29163
29161
|
declare const x_d_MetadataSchemaRequestTypeEnum: typeof MetadataSchemaRequestTypeEnum;
|
|
29164
29162
|
type x_d_MintFee = MintFee;
|
|
29163
|
+
type x_d_MintRequest = MintRequest;
|
|
29165
29164
|
type x_d_MintTokenDataV2 = MintTokenDataV2;
|
|
29166
29165
|
type x_d_MintTokensResponse = MintTokensResponse;
|
|
29167
29166
|
type x_d_MintUser = MintUser;
|
|
@@ -29304,7 +29303,7 @@ declare namespace x_d {
|
|
|
29304
29303
|
x_d_MetadataSchemaRequest as MetadataSchemaRequest,
|
|
29305
29304
|
x_d_MetadataSchemaRequestTypeEnum as MetadataSchemaRequestTypeEnum,
|
|
29306
29305
|
x_d_MintFee as MintFee,
|
|
29307
|
-
|
|
29306
|
+
x_d_MintRequest as MintRequest,
|
|
29308
29307
|
x_d_MintTokenDataV2 as MintTokenDataV2,
|
|
29309
29308
|
x_d_MintTokensResponse as MintTokensResponse,
|
|
29310
29309
|
x_d_MintUser as MintUser,
|
|
@@ -29368,135 +29367,4 @@ declare namespace x_d {
|
|
|
29368
29367
|
};
|
|
29369
29368
|
}
|
|
29370
29369
|
|
|
29371
|
-
|
|
29372
|
-
zkevmMintRequestUpdated: (event: any) => Promise<void>;
|
|
29373
|
-
others?: ((event: any) => Promise<void>) | undefined;
|
|
29374
|
-
}) => Promise<void>;
|
|
29375
|
-
|
|
29376
|
-
declare const webhook_d_init: typeof init;
|
|
29377
|
-
declare namespace webhook_d {
|
|
29378
|
-
export {
|
|
29379
|
-
webhook_d_init as init,
|
|
29380
|
-
};
|
|
29381
|
-
}
|
|
29382
|
-
|
|
29383
|
-
type CreateMintRequest = {
|
|
29384
|
-
contract_address: string;
|
|
29385
|
-
asset_id: string;
|
|
29386
|
-
metadata: any;
|
|
29387
|
-
owner_address: string;
|
|
29388
|
-
};
|
|
29389
|
-
type MintRequest = {
|
|
29390
|
-
id: string;
|
|
29391
|
-
contract_address: string;
|
|
29392
|
-
wallet_address: string;
|
|
29393
|
-
asset_id: string;
|
|
29394
|
-
metadata: any;
|
|
29395
|
-
owner_address: string;
|
|
29396
|
-
tried_count: number;
|
|
29397
|
-
};
|
|
29398
|
-
type SubmittedMintRequest = {
|
|
29399
|
-
tokenId: string | null;
|
|
29400
|
-
status: string;
|
|
29401
|
-
assetId: string;
|
|
29402
|
-
contractAddress: string;
|
|
29403
|
-
ownerAddress: string;
|
|
29404
|
-
metadataId: string;
|
|
29405
|
-
imtblZkevmMintRequestUpdatedId: string;
|
|
29406
|
-
error: any | null;
|
|
29407
|
-
};
|
|
29408
|
-
interface MintingPersistence {
|
|
29409
|
-
recordMint: (request: CreateMintRequest) => Promise<void>;
|
|
29410
|
-
getNextBatchForSubmission: (limit: number) => Promise<MintRequest[]>;
|
|
29411
|
-
updateMintingStatusToSubmitted: (ids: string[]) => Promise<void>;
|
|
29412
|
-
updateMintingStatusToSubmissionFailed: (ids: string[]) => Promise<void>;
|
|
29413
|
-
syncMintingStatus: (submittedMintRequest: SubmittedMintRequest) => Promise<void>;
|
|
29414
|
-
markAsConflict: (assetIds: string[], contractAddress: string) => Promise<void>;
|
|
29415
|
-
resetMintingStatus: (ids: string[]) => Promise<void>;
|
|
29416
|
-
markForRetry: (ids: string[]) => Promise<void>;
|
|
29417
|
-
getMintingRequest: (contractAddress: string, referenceId: string) => Promise<MintRequest | null>;
|
|
29418
|
-
}
|
|
29419
|
-
|
|
29420
|
-
declare const mintingPersistence$1: (client: Pool) => MintingPersistence;
|
|
29421
|
-
|
|
29422
|
-
declare const mintingPersistence: (client: any) => MintingPersistence;
|
|
29423
|
-
|
|
29424
|
-
interface Logger {
|
|
29425
|
-
info: (message: string) => void;
|
|
29426
|
-
error: (message: any) => void;
|
|
29427
|
-
}
|
|
29428
|
-
|
|
29429
|
-
declare const recordMint: (mintingPersistence: MintingPersistence, mintRequest: CreateMintRequest) => Promise<void>;
|
|
29430
|
-
declare const submitMintingRequests: (mintingPersistence: MintingPersistence, blockchainDataSDKClient: BlockchainData, { defaultBatchSize, chainName, maxNumberOfTries, }: {
|
|
29431
|
-
defaultBatchSize?: number | undefined;
|
|
29432
|
-
chainName?: string | undefined;
|
|
29433
|
-
maxNumberOfTries?: number | undefined;
|
|
29434
|
-
}, logger?: Logger) => Promise<never>;
|
|
29435
|
-
type MintRequestEvent = {
|
|
29436
|
-
event_name: string;
|
|
29437
|
-
chain: string;
|
|
29438
|
-
event_id: string;
|
|
29439
|
-
data: {
|
|
29440
|
-
chain: {
|
|
29441
|
-
id: string;
|
|
29442
|
-
name: string;
|
|
29443
|
-
};
|
|
29444
|
-
contract_address: string;
|
|
29445
|
-
owner_address: string;
|
|
29446
|
-
reference_id: string;
|
|
29447
|
-
metadata_id: string;
|
|
29448
|
-
token_id: string | null;
|
|
29449
|
-
status: string;
|
|
29450
|
-
transaction_hash: string | null;
|
|
29451
|
-
activity_id: string | null;
|
|
29452
|
-
error: {
|
|
29453
|
-
code: string;
|
|
29454
|
-
message: string;
|
|
29455
|
-
} | null;
|
|
29456
|
-
created_at: string;
|
|
29457
|
-
updated_at: string;
|
|
29458
|
-
};
|
|
29459
|
-
};
|
|
29460
|
-
declare const processMint: (mintingPersistence: MintingPersistence, event: MintRequestEvent, logger?: Logger) => Promise<void>;
|
|
29461
|
-
|
|
29462
|
-
interface MintingBackendModuleConfiguration extends ModuleConfiguration<undefined> {
|
|
29463
|
-
persistence: MintingPersistence;
|
|
29464
|
-
logger?: Logger;
|
|
29465
|
-
}
|
|
29466
|
-
declare class MintingBackendModule {
|
|
29467
|
-
private readonly baseConfig;
|
|
29468
|
-
private readonly persistence;
|
|
29469
|
-
private readonly blockchainDataClient;
|
|
29470
|
-
private readonly logger;
|
|
29471
|
-
constructor(config: MintingBackendModuleConfiguration);
|
|
29472
|
-
recordMint(mintRequest: CreateMintRequest): Promise<void>;
|
|
29473
|
-
submitMintingRequests(config: {
|
|
29474
|
-
defaultBatchSize?: number;
|
|
29475
|
-
chainName?: string;
|
|
29476
|
-
maxNumberOfTries?: number;
|
|
29477
|
-
}): Promise<void>;
|
|
29478
|
-
processMint(body: string | Record<string, unknown>, otherHandlers?: {
|
|
29479
|
-
zkevmMintRequestUpdated: (event: MintRequestEvent) => Promise<void>;
|
|
29480
|
-
others: (..._args: any) => Promise<void>;
|
|
29481
|
-
}): Promise<void>;
|
|
29482
|
-
}
|
|
29483
|
-
|
|
29484
|
-
type minting_backend_d_MintingBackendModule = MintingBackendModule;
|
|
29485
|
-
declare const minting_backend_d_MintingBackendModule: typeof MintingBackendModule;
|
|
29486
|
-
type minting_backend_d_MintingBackendModuleConfiguration = MintingBackendModuleConfiguration;
|
|
29487
|
-
declare const minting_backend_d_processMint: typeof processMint;
|
|
29488
|
-
declare const minting_backend_d_recordMint: typeof recordMint;
|
|
29489
|
-
declare const minting_backend_d_submitMintingRequests: typeof submitMintingRequests;
|
|
29490
|
-
declare namespace minting_backend_d {
|
|
29491
|
-
export {
|
|
29492
|
-
minting_backend_d_MintingBackendModule as MintingBackendModule,
|
|
29493
|
-
minting_backend_d_MintingBackendModuleConfiguration as MintingBackendModuleConfiguration,
|
|
29494
|
-
mintingPersistence$1 as mintingPersistencePg,
|
|
29495
|
-
mintingPersistence as mintingPersistencePrismaSqlite,
|
|
29496
|
-
minting_backend_d_processMint as processMint,
|
|
29497
|
-
minting_backend_d_recordMint as recordMint,
|
|
29498
|
-
minting_backend_d_submitMintingRequests as submitMintingRequests,
|
|
29499
|
-
};
|
|
29500
|
-
}
|
|
29501
|
-
|
|
29502
|
-
export { blockchain_data_d as blockchainData, checkout_d as checkout, config_d as config, minting_backend_d as mintingBackend, orderbook_d as orderbook, passport_d as passport, webhook_d as webhook, x_d as x };
|
|
29370
|
+
export { blockchain_data_d as blockchainData, checkout_d as checkout, config_d as config, orderbook_d as orderbook, passport_d as passport, x_d as x };
|