@imtbl/sdk 1.40.3-alpha.2 → 1.40.3

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.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$2 {
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$2>;
10823
+ readonly mintTokensRequestV2: Array<MintRequest$1>;
10826
10824
  }
10827
10825
  /**
10828
10826
  * MintsApi - object-oriented interface
@@ -13318,7 +13316,7 @@ interface BlockchainMetadata$1 {
13318
13316
  * @export
13319
13317
  * @interface Chain
13320
13318
  */
13321
- interface Chain$3 {
13319
+ interface Chain$2 {
13322
13320
  /**
13323
13321
  * The id of chain
13324
13322
  * @type {string}
@@ -13362,7 +13360,7 @@ interface Activity$1 {
13362
13360
  * @type {Chain}
13363
13361
  * @memberof Activity
13364
13362
  */
13365
- 'chain': Chain$3;
13363
+ 'chain': Chain$2;
13366
13364
  /**
13367
13365
  *
13368
13366
  * @type {ActivityType}
@@ -13460,7 +13458,7 @@ interface ChainWithDetailsAllOf$1 {
13460
13458
  * @type ChainWithDetails
13461
13459
  * @export
13462
13460
  */
13463
- type ChainWithDetails$1 = Chain$3 & ChainWithDetailsAllOf$1;
13461
+ type ChainWithDetails$1 = Chain$2 & ChainWithDetailsAllOf$1;
13464
13462
 
13465
13463
  /**
13466
13464
  * Immutable zkEVM API
@@ -13507,7 +13505,7 @@ interface Collection$1 {
13507
13505
  * @type {Chain}
13508
13506
  * @memberof Collection
13509
13507
  */
13510
- 'chain': Chain$3;
13508
+ 'chain': Chain$2;
13511
13509
  /**
13512
13510
  * The name of the collection
13513
13511
  * @type {string}
@@ -13961,7 +13959,7 @@ interface Metadata$1 {
13961
13959
  * @type {Chain}
13962
13960
  * @memberof Metadata
13963
13961
  */
13964
- 'chain': Chain$3;
13962
+ 'chain': Chain$2;
13965
13963
  /**
13966
13964
  * The contract address of the metadata
13967
13965
  * @type {string}
@@ -14121,7 +14119,7 @@ interface GetMintRequestResult$1 {
14121
14119
  * @type {Chain}
14122
14120
  * @memberof GetMintRequestResult
14123
14121
  */
14124
- 'chain': Chain$3;
14122
+ 'chain': Chain$2;
14125
14123
  /**
14126
14124
  * The address of the contract
14127
14125
  * @type {string}
@@ -14213,7 +14211,7 @@ interface NFT$1 {
14213
14211
  * @type {Chain}
14214
14212
  * @memberof NFT
14215
14213
  */
14216
- 'chain': Chain$3;
14214
+ 'chain': Chain$2;
14217
14215
  /**
14218
14216
  * An `uint256` token id as string
14219
14217
  * @type {string}
@@ -14355,7 +14353,7 @@ interface Token$1 {
14355
14353
  * @type {Chain}
14356
14354
  * @memberof Token
14357
14355
  */
14358
- 'chain': Chain$3;
14356
+ 'chain': Chain$2;
14359
14357
  /**
14360
14358
  * The address of token contract
14361
14359
  * @type {string}
@@ -14646,7 +14644,7 @@ interface NFTOwner$1 {
14646
14644
  * @type {Chain}
14647
14645
  * @memberof NFTOwner
14648
14646
  */
14649
- 'chain': Chain$3;
14647
+ 'chain': Chain$2;
14650
14648
  /**
14651
14649
  * The address of NFT contract
14652
14650
  * @type {string}
@@ -14880,7 +14878,7 @@ interface RefreshCollectionMetadataResult$1 {
14880
14878
  * @type {Chain}
14881
14879
  * @memberof RefreshCollectionMetadataResult
14882
14880
  */
14883
- 'chain': Chain$3;
14881
+ 'chain': Chain$2;
14884
14882
  /**
14885
14883
  *
14886
14884
  * @type {CollectionMetadata}
@@ -16950,7 +16948,7 @@ interface BlockchainMetadata {
16950
16948
  * @export
16951
16949
  * @interface Chain
16952
16950
  */
16953
- interface Chain$2 {
16951
+ interface Chain$1 {
16954
16952
  /**
16955
16953
  * The id of chain
16956
16954
  * @type {string}
@@ -16994,7 +16992,7 @@ interface Activity {
16994
16992
  * @type {Chain}
16995
16993
  * @memberof Activity
16996
16994
  */
16997
- 'chain': Chain$2;
16995
+ 'chain': Chain$1;
16998
16996
  /**
16999
16997
  *
17000
16998
  * @type {ActivityType}
@@ -17092,7 +17090,7 @@ interface ChainWithDetailsAllOf {
17092
17090
  * @type ChainWithDetails
17093
17091
  * @export
17094
17092
  */
17095
- type ChainWithDetails = Chain$2 & ChainWithDetailsAllOf;
17093
+ type ChainWithDetails = Chain$1 & ChainWithDetailsAllOf;
17096
17094
 
17097
17095
  /**
17098
17096
  * Immutable zkEVM API
@@ -17138,7 +17136,7 @@ interface Collection {
17138
17136
  * @type {Chain}
17139
17137
  * @memberof Collection
17140
17138
  */
17141
- 'chain': Chain$2;
17139
+ 'chain': Chain$1;
17142
17140
  /**
17143
17141
  * The name of the collection
17144
17142
  * @type {string}
@@ -17724,7 +17722,7 @@ interface Metadata {
17724
17722
  * @type {Chain}
17725
17723
  * @memberof Metadata
17726
17724
  */
17727
- 'chain': Chain$2;
17725
+ 'chain': Chain$1;
17728
17726
  /**
17729
17727
  * The contract address of the metadata
17730
17728
  * @type {string}
@@ -17883,7 +17881,7 @@ interface GetMintRequestResult {
17883
17881
  * @type {Chain}
17884
17882
  * @memberof GetMintRequestResult
17885
17883
  */
17886
- 'chain': Chain$2;
17884
+ 'chain': Chain$1;
17887
17885
  /**
17888
17886
  * The address of the contract
17889
17887
  * @type {string}
@@ -17969,7 +17967,7 @@ interface NFT {
17969
17967
  * @type {Chain}
17970
17968
  * @memberof NFT
17971
17969
  */
17972
- 'chain': Chain$2;
17970
+ 'chain': Chain$1;
17973
17971
  /**
17974
17972
  * An `uint256` token id as string
17975
17973
  * @type {string}
@@ -18111,7 +18109,7 @@ interface Token {
18111
18109
  * @type {Chain}
18112
18110
  * @memberof Token
18113
18111
  */
18114
- 'chain': Chain$2;
18112
+ 'chain': Chain$1;
18115
18113
  /**
18116
18114
  * The address of token contract
18117
18115
  * @type {string}
@@ -18373,7 +18371,7 @@ interface NFTWithOwner {
18373
18371
  * @type {Chain}
18374
18372
  * @memberof NFTWithOwner
18375
18373
  */
18376
- 'chain': Chain$2;
18374
+ 'chain': Chain$1;
18377
18375
  /**
18378
18376
  * The address of NFT contract
18379
18377
  * @type {string}
@@ -18564,7 +18562,7 @@ interface NFTOwner {
18564
18562
  * @type {Chain}
18565
18563
  * @memberof NFTOwner
18566
18564
  */
18567
- 'chain': Chain$2;
18565
+ 'chain': Chain$1;
18568
18566
  /**
18569
18567
  * The address of NFT contract
18570
18568
  * @type {string}
@@ -18659,7 +18657,7 @@ interface NFTWithBalance {
18659
18657
  * @type {Chain}
18660
18658
  * @memberof NFTWithBalance
18661
18659
  */
18662
- 'chain': Chain$2;
18660
+ 'chain': Chain$1;
18663
18661
  /**
18664
18662
  * An `uint256` token id as string
18665
18663
  * @type {string}
@@ -18946,7 +18944,7 @@ interface RefreshCollectionMetadataResult {
18946
18944
  * @type {Chain}
18947
18945
  * @memberof RefreshCollectionMetadataResult
18948
18946
  */
18949
- 'chain': Chain$2;
18947
+ 'chain': Chain$1;
18950
18948
  /**
18951
18949
  *
18952
18950
  * @type {CollectionMetadata}
@@ -20178,7 +20176,7 @@ declare namespace index_d {
20178
20176
  index_d_BasicAPIError as BasicAPIError,
20179
20177
  index_d_BlockchainMetadata as BlockchainMetadata,
20180
20178
  index_d_Burn as Burn,
20181
- Chain$2 as Chain,
20179
+ Chain$1 as Chain,
20182
20180
  index_d_ChainWithDetails as ChainWithDetails,
20183
20181
  index_d_ChainWithDetailsAllOf as ChainWithDetailsAllOf,
20184
20182
  index_d_Collection as Collection,
@@ -21035,7 +21033,7 @@ type UnsignedTransferRequest = TokenAmount & {
21035
21033
  /**
21036
21034
  * Parameter required to Mint tokens
21037
21035
  */
21038
- type UnsignedMintRequest = Omit<MintRequest$2, 'auth_signature'>;
21036
+ type UnsignedMintRequest = Omit<MintRequest$1, 'auth_signature'>;
21039
21037
  /**
21040
21038
  * Parameter required to create a Transfer
21041
21039
  */
@@ -21470,7 +21468,7 @@ interface MintFee extends MintFee$1 {
21470
21468
  }
21471
21469
  interface MintResultDetails extends MintResultDetails$1 {
21472
21470
  }
21473
- interface MintRequest$1 extends MintRequest$2 {
21471
+ interface MintRequest extends MintRequest$1 {
21474
21472
  }
21475
21473
  interface MintTokenDataV2 extends MintTokenDataV2$1 {
21476
21474
  }
@@ -27501,7 +27499,7 @@ type CreateListingRequestBody = {
27501
27499
  /**
27502
27500
  * The chain details
27503
27501
  */
27504
- type Chain$1 = {
27502
+ type Chain = {
27505
27503
  /**
27506
27504
  * The id of chain
27507
27505
  */
@@ -27610,7 +27608,7 @@ type Order$1 = {
27610
27608
  account_address: string;
27611
27609
  buy: Array<Item>;
27612
27610
  fees: Array<Fee$2>;
27613
- chain: Chain$1;
27611
+ chain: Chain;
27614
27612
  /**
27615
27613
  * Time the Order is created
27616
27614
  */
@@ -27721,7 +27719,7 @@ type Trade$1 = {
27721
27719
  buy: Array<Item>;
27722
27720
  buyer_address: string;
27723
27721
  buyer_fees: Array<Fee$2>;
27724
- chain: Chain$1;
27722
+ chain: Chain;
27725
27723
  order_id: string;
27726
27724
  blockchain_metadata: TradeBlockchainMetadata;
27727
27725
  /**
@@ -31859,6 +31857,7 @@ declare const x_d_MetadataRefreshesApi: typeof MetadataRefreshesApi;
31859
31857
  type x_d_MetadataSchemaRequest = MetadataSchemaRequest;
31860
31858
  declare const x_d_MetadataSchemaRequestTypeEnum: typeof MetadataSchemaRequestTypeEnum;
31861
31859
  type x_d_MintFee = MintFee;
31860
+ type x_d_MintRequest = MintRequest;
31862
31861
  type x_d_MintResultDetails = MintResultDetails;
31863
31862
  type x_d_MintTokenDataV2 = MintTokenDataV2;
31864
31863
  type x_d_MintTokensResponse = MintTokensResponse;
@@ -32008,7 +32007,7 @@ declare namespace x_d {
32008
32007
  x_d_MetadataSchemaRequest as MetadataSchemaRequest,
32009
32008
  x_d_MetadataSchemaRequestTypeEnum as MetadataSchemaRequestTypeEnum,
32010
32009
  x_d_MintFee as MintFee,
32011
- MintRequest$1 as MintRequest,
32010
+ x_d_MintRequest as MintRequest,
32012
32011
  x_d_MintResultDetails as MintResultDetails,
32013
32012
  x_d_MintTokenDataV2 as MintTokenDataV2,
32014
32013
  x_d_MintTokensResponse as MintTokensResponse,
@@ -32077,503 +32076,4 @@ declare namespace x_d {
32077
32076
  };
32078
32077
  }
32079
32078
 
32080
- interface BlockChainMetadata {
32081
- log_index: string;
32082
- block_number: string;
32083
- transaction_hash: string;
32084
- transaction_index: string;
32085
- }
32086
- interface Chain {
32087
- id: string;
32088
- name: string;
32089
- }
32090
- interface ZkevmActivityMint {
32091
- event_name: 'imtbl_zkevm_activity_mint';
32092
- event_id: string;
32093
- chain: string;
32094
- data: {
32095
- id: string;
32096
- chain: Chain;
32097
- details: {
32098
- to: string;
32099
- asset: {
32100
- token_id: string;
32101
- contract_type: string;
32102
- contract_address: string;
32103
- };
32104
- amount: string;
32105
- };
32106
- indexed_at: string;
32107
- activity_type: string;
32108
- blockchain_metadata: BlockChainMetadata;
32109
- };
32110
- }
32111
- interface ZkevmActivityBurn {
32112
- event_name: 'imtbl_zkevm_activity_burn';
32113
- event_id: string;
32114
- chain: string;
32115
- data: {
32116
- id: string;
32117
- chain: Chain;
32118
- details: {
32119
- from: string;
32120
- asset: {
32121
- token_id: string;
32122
- contract_type: string;
32123
- contract_address: string;
32124
- };
32125
- amount: string;
32126
- };
32127
- indexed_at: string;
32128
- activity_type: string;
32129
- blockchain_metadata: BlockChainMetadata;
32130
- };
32131
- }
32132
- interface ZkevmActivityTransfer {
32133
- event_name: 'imtbl_zkevm_activity_transfer';
32134
- event_id: string;
32135
- chain: string;
32136
- data: {
32137
- id: string;
32138
- chain: Chain;
32139
- details: {
32140
- to: string;
32141
- from: string;
32142
- asset: {
32143
- token_id: string;
32144
- contract_type: string;
32145
- contract_address: string;
32146
- };
32147
- amount: string;
32148
- };
32149
- indexed_at: string;
32150
- activity_type: string;
32151
- blockchain_metadata: BlockChainMetadata;
32152
- };
32153
- }
32154
- interface ZkevmActivitySale {
32155
- event_name: 'imtbl_zkevm_activity_sale';
32156
- event_id: string;
32157
- chain: string;
32158
- data: {
32159
- id: string;
32160
- chain: Chain;
32161
- details: {
32162
- to: string;
32163
- from: string;
32164
- asset: {
32165
- amount: string;
32166
- token_id: string;
32167
- contract_type: string;
32168
- contract_address: string;
32169
- }[];
32170
- payment: {
32171
- fees: {
32172
- amount: string;
32173
- fee_type: string;
32174
- recipient: string;
32175
- }[];
32176
- token: {
32177
- symbol: string;
32178
- contract_type: string;
32179
- contract_address: string;
32180
- };
32181
- price_excluding_fees: string;
32182
- price_including_fees: string;
32183
- };
32184
- order_id: string;
32185
- };
32186
- indexed_at: string;
32187
- activity_type: string;
32188
- blockchain_metadata: BlockChainMetadata;
32189
- };
32190
- }
32191
- interface ZkevmActivityDeposit {
32192
- event_name: 'imtbl_zkevm_activity_deposit';
32193
- event_id: string;
32194
- chain: string;
32195
- data: {
32196
- id: string;
32197
- chain: Chain;
32198
- details: {
32199
- amount: string;
32200
- asset: {
32201
- contract_type: string;
32202
- contract_address: string;
32203
- };
32204
- to: string;
32205
- };
32206
- indexed_at: string;
32207
- activity_type: string;
32208
- blockchain_metadata: BlockChainMetadata;
32209
- };
32210
- }
32211
- interface ZkevmActivityWithdrawal {
32212
- event_name: 'imtbl_zkevm_activity_withdrawal';
32213
- event_id: string;
32214
- chain: string;
32215
- data: {
32216
- id: string;
32217
- chain: Chain;
32218
- details: {
32219
- amount: string;
32220
- asset: {
32221
- contract_type: string;
32222
- contract_address: string;
32223
- };
32224
- from: string;
32225
- };
32226
- indexed_at: string;
32227
- activity_type: string;
32228
- blockchain_metadata: BlockChainMetadata;
32229
- };
32230
- }
32231
- interface ZkevmCollectionUpdated {
32232
- event_name: 'imtbl_zkevm_collection_updated';
32233
- event_id: string;
32234
- chain: string;
32235
- data: {
32236
- chain: Chain;
32237
- contract_address: string;
32238
- indexed_at: string;
32239
- updated_at: string;
32240
- contract_type: string;
32241
- symbol: string | null;
32242
- name: string | null;
32243
- image: string | null;
32244
- contract_uri: string | null;
32245
- description: string | null;
32246
- external_link: string | null;
32247
- metadata_synced_at: string | null;
32248
- decimals: string | null;
32249
- root_contract_address: string | null;
32250
- };
32251
- }
32252
- interface ZkevmNftUpdated {
32253
- event_name: 'imtbl_zkevm_nft_updated';
32254
- event_id: string;
32255
- chain: string;
32256
- data: {
32257
- chain: Chain;
32258
- contract_address: string;
32259
- indexed_at: string;
32260
- metadata_synced_at: string | null;
32261
- token_id: string;
32262
- metadata_id: string | null;
32263
- };
32264
- }
32265
- interface ZkevmMintRequestUpdated {
32266
- event_name: 'imtbl_zkevm_mint_request_updated';
32267
- event_id: string;
32268
- chain: string;
32269
- data: {
32270
- chain: Chain;
32271
- contract_address: string;
32272
- owner_address: string;
32273
- reference_id: string;
32274
- metadata_id: string;
32275
- token_id: string | null;
32276
- status: string;
32277
- transaction_hash: string | null;
32278
- activity_id: string | null;
32279
- error: {
32280
- code: string;
32281
- message: string;
32282
- } | null;
32283
- created_at: string;
32284
- updated_at: string;
32285
- amount?: number;
32286
- };
32287
- }
32288
- interface ZkevmMetadataUpdated {
32289
- event_name: 'imtbl_zkevm_metadata_updated';
32290
- event_id: string;
32291
- chain: string;
32292
- data: {
32293
- id: string;
32294
- chain: Chain;
32295
- contract_address: string;
32296
- image: string | null;
32297
- external_url: string | null;
32298
- description: string | null;
32299
- name: string | null;
32300
- attributes: {
32301
- trait_type: string;
32302
- value: string;
32303
- }[];
32304
- animation_url: string | null;
32305
- youtube_url: string | null;
32306
- created_at: string;
32307
- updated_at: string;
32308
- };
32309
- }
32310
- interface ZkevmTokenUpdated {
32311
- event_name: 'imtbl_zkevm_token_updated';
32312
- event_id: string;
32313
- chain: string;
32314
- data: {
32315
- chain: Chain;
32316
- contract_address: string;
32317
- indexed_at: string;
32318
- updated_at: string;
32319
- contract_type: string;
32320
- symbol: string;
32321
- name: string;
32322
- image: string | null;
32323
- contract_uri: string | null;
32324
- description: string | null;
32325
- external_link: string | null;
32326
- metadata_synced_at: string | null;
32327
- decimals: number;
32328
- root_contract_address: string | null;
32329
- };
32330
- }
32331
- interface ZkevmOrderUpdated {
32332
- event_name: 'imtbl_zkevm_order_updated';
32333
- event_id: string;
32334
- chain: string;
32335
- data: {
32336
- id: string;
32337
- buy: {
32338
- item_type: string;
32339
- end_amount: string;
32340
- start_amount: string;
32341
- contract_address: string;
32342
- }[];
32343
- hash: string;
32344
- salt: string;
32345
- sell: {
32346
- token_id: string;
32347
- item_type: string;
32348
- end_amount: string;
32349
- start_amount: string;
32350
- contract_address: string;
32351
- }[];
32352
- status: string;
32353
- fill_status: {
32354
- denominator: string;
32355
- numerator: string;
32356
- };
32357
- chain_id: string;
32358
- end_time: number;
32359
- signature: string;
32360
- buyer_fees: {
32361
- amount: string;
32362
- fee_type: string;
32363
- recipient: string;
32364
- }[];
32365
- created_at: number;
32366
- start_time: number;
32367
- updated_at: number;
32368
- protocol_data: {
32369
- counter: string;
32370
- order_type: string;
32371
- zone_address: string;
32372
- seaport_address: string;
32373
- seaport_version: string;
32374
- };
32375
- account_address: string;
32376
- };
32377
- }
32378
- interface ZkevmTradeCreated {
32379
- event_name: 'imtbl_zkevm_trade_created';
32380
- event_id: string;
32381
- chain: string;
32382
- data: {
32383
- id: string;
32384
- tx_hash: string;
32385
- chain_id: string;
32386
- order_id: string;
32387
- buy_items: {
32388
- amount: string;
32389
- item_type: string;
32390
- contract_address: string;
32391
- }[];
32392
- buyer_fees: {
32393
- amount: string;
32394
- fee_type: string;
32395
- recipient: string;
32396
- }[];
32397
- sell_items: {
32398
- amount: string;
32399
- token_id: string;
32400
- item_type: string;
32401
- contract_address: string;
32402
- }[];
32403
- block_number: string;
32404
- buyer_address: string;
32405
- seller_address: string;
32406
- tx_index_in_block: string;
32407
- log_index_in_block: string;
32408
- };
32409
- }
32410
-
32411
- type WebhookHandlers = {
32412
- zkevmMintRequestUpdated?: (event: ZkevmMintRequestUpdated) => Promise<void>;
32413
- zkEvmActivityMint?: (event: ZkevmActivityMint) => Promise<void>;
32414
- zkEvmActivityBurn?: (event: ZkevmActivityBurn) => Promise<void>;
32415
- zkEvmActivityTransfer?: (event: ZkevmActivityTransfer) => Promise<void>;
32416
- zkEvmActivitySale?: (event: ZkevmActivitySale) => Promise<void>;
32417
- zkEvmActivityDeposit?: (event: ZkevmActivityDeposit) => Promise<void>;
32418
- zkEvmActivityWithdrawal?: (event: ZkevmActivityWithdrawal) => Promise<void>;
32419
- zkEvmCollectionUpdated?: (event: ZkevmCollectionUpdated) => Promise<void>;
32420
- zkEvmNftUpdated?: (event: ZkevmNftUpdated) => Promise<void>;
32421
- zkEvmMetadataUpdated?: (event: ZkevmMetadataUpdated) => Promise<void>;
32422
- zkEvmTokenUpdated?: (event: ZkevmTokenUpdated) => Promise<void>;
32423
- zkEvmOrderUpdated?: (event: ZkevmOrderUpdated) => Promise<void>;
32424
- zkEvmTradeCreated?: (event: ZkevmTradeCreated) => Promise<void>;
32425
- xNftCreated?: (event: Asset) => Promise<void>;
32426
- xNftUpdated?: (event: Asset) => Promise<void>;
32427
- xOrderAccepted?: (event: OrderV3) => Promise<void>;
32428
- xOrderFilled?: (event: OrderV3) => Promise<void>;
32429
- xOrderCancelled?: (event: OrderV3) => Promise<void>;
32430
- xTransferCreated?: (event: Transfer$2) => Promise<void>;
32431
- all?: (event: any) => Promise<void>;
32432
- };
32433
- /**
32434
- * handle will validate webhook message origin and verify signature of the message and calls corresponding handlers passed in.
32435
- * @param body The request body to a webhook endpoint in json string or js object form.
32436
- * @param env The Immutable environment the webhook is set up for.
32437
- * @param handlers The optional handlers object for different events. The `all` handler will be triggered for all event types.
32438
- * @returns The event object from the webhook message after validation and verification.
32439
- */
32440
- declare const handle: (body: string | Record<string, unknown>, env: Environment, handlers?: WebhookHandlers) => Promise<any>;
32441
-
32442
- type webhook_d_BlockChainMetadata = BlockChainMetadata;
32443
- type webhook_d_Chain = Chain;
32444
- type webhook_d_WebhookHandlers = WebhookHandlers;
32445
- type webhook_d_ZkevmActivityBurn = ZkevmActivityBurn;
32446
- type webhook_d_ZkevmActivityDeposit = ZkevmActivityDeposit;
32447
- type webhook_d_ZkevmActivityMint = ZkevmActivityMint;
32448
- type webhook_d_ZkevmActivitySale = ZkevmActivitySale;
32449
- type webhook_d_ZkevmActivityTransfer = ZkevmActivityTransfer;
32450
- type webhook_d_ZkevmActivityWithdrawal = ZkevmActivityWithdrawal;
32451
- type webhook_d_ZkevmCollectionUpdated = ZkevmCollectionUpdated;
32452
- type webhook_d_ZkevmMetadataUpdated = ZkevmMetadataUpdated;
32453
- type webhook_d_ZkevmMintRequestUpdated = ZkevmMintRequestUpdated;
32454
- type webhook_d_ZkevmNftUpdated = ZkevmNftUpdated;
32455
- type webhook_d_ZkevmOrderUpdated = ZkevmOrderUpdated;
32456
- type webhook_d_ZkevmTokenUpdated = ZkevmTokenUpdated;
32457
- type webhook_d_ZkevmTradeCreated = ZkevmTradeCreated;
32458
- declare const webhook_d_handle: typeof handle;
32459
- declare namespace webhook_d {
32460
- export {
32461
- webhook_d_BlockChainMetadata as BlockChainMetadata,
32462
- webhook_d_Chain as Chain,
32463
- webhook_d_WebhookHandlers as WebhookHandlers,
32464
- webhook_d_ZkevmActivityBurn as ZkevmActivityBurn,
32465
- webhook_d_ZkevmActivityDeposit as ZkevmActivityDeposit,
32466
- webhook_d_ZkevmActivityMint as ZkevmActivityMint,
32467
- webhook_d_ZkevmActivitySale as ZkevmActivitySale,
32468
- webhook_d_ZkevmActivityTransfer as ZkevmActivityTransfer,
32469
- webhook_d_ZkevmActivityWithdrawal as ZkevmActivityWithdrawal,
32470
- webhook_d_ZkevmCollectionUpdated as ZkevmCollectionUpdated,
32471
- webhook_d_ZkevmMetadataUpdated as ZkevmMetadataUpdated,
32472
- webhook_d_ZkevmMintRequestUpdated as ZkevmMintRequestUpdated,
32473
- webhook_d_ZkevmNftUpdated as ZkevmNftUpdated,
32474
- webhook_d_ZkevmOrderUpdated as ZkevmOrderUpdated,
32475
- webhook_d_ZkevmTokenUpdated as ZkevmTokenUpdated,
32476
- webhook_d_ZkevmTradeCreated as ZkevmTradeCreated,
32477
- webhook_d_handle as handle,
32478
- };
32479
- }
32480
-
32481
- type CreateMintRequest = {
32482
- contract_address: string;
32483
- asset_id: string;
32484
- metadata: any;
32485
- owner_address: string;
32486
- amount?: number;
32487
- token_id?: string;
32488
- };
32489
- type MintRequest = {
32490
- id: string;
32491
- contract_address: string;
32492
- wallet_address: string;
32493
- asset_id: string;
32494
- metadata: any;
32495
- owner_address: string;
32496
- tried_count: number;
32497
- amount?: number;
32498
- token_id?: string;
32499
- };
32500
- type SubmittedMintRequest = {
32501
- tokenId: string | null;
32502
- status: string;
32503
- assetId: string;
32504
- contractAddress: string;
32505
- ownerAddress: string;
32506
- metadataId: string;
32507
- imtblZkevmMintRequestUpdatedId: string;
32508
- error: any | null;
32509
- amount: number | null;
32510
- };
32511
- interface MintingPersistence {
32512
- recordMint: (request: CreateMintRequest) => Promise<void>;
32513
- getNextBatchForSubmission: (limit: number) => Promise<MintRequest[]>;
32514
- updateMintingStatusToSubmitted: (ids: string[]) => Promise<void>;
32515
- updateMintingStatusToSubmissionFailed: (ids: string[]) => Promise<void>;
32516
- syncMintingStatus: (submittedMintRequest: SubmittedMintRequest) => Promise<void>;
32517
- markAsConflict: (assetIds: string[], contractAddress: string) => Promise<void>;
32518
- resetMintingStatus: (ids: string[]) => Promise<void>;
32519
- markForRetry: (ids: string[]) => Promise<void>;
32520
- getMintingRequest: (contractAddress: string, referenceId: string) => Promise<MintRequest | null>;
32521
- }
32522
-
32523
- declare const mintingPersistence$1: (client: Pool) => MintingPersistence;
32524
-
32525
- declare const mintingPersistence: (client: any) => MintingPersistence;
32526
-
32527
- interface Logger {
32528
- info: (message: string) => void;
32529
- error: (message: any) => void;
32530
- }
32531
-
32532
- declare const recordMint: (mintingPersistence: MintingPersistence, mintRequest: CreateMintRequest) => Promise<void>;
32533
- declare const submitMintingRequests: (mintingPersistence: MintingPersistence, blockchainDataSDKClient: BlockchainData, { defaultBatchSize, chainName, maxNumberOfTries, }: {
32534
- defaultBatchSize?: number | undefined;
32535
- chainName?: string | undefined;
32536
- maxNumberOfTries?: number | undefined;
32537
- }, logger?: Logger) => Promise<never>;
32538
- declare const processMint: (mintingPersistence: MintingPersistence, event: ZkevmMintRequestUpdated, logger?: Logger) => Promise<void>;
32539
-
32540
- interface MintingBackendModuleConfiguration extends ModuleConfiguration<undefined> {
32541
- persistence: MintingPersistence;
32542
- logger?: Logger;
32543
- }
32544
- declare class MintingBackendModule {
32545
- private readonly baseConfig;
32546
- private readonly persistence;
32547
- private readonly blockchainDataClient;
32548
- private readonly logger;
32549
- constructor(config: MintingBackendModuleConfiguration);
32550
- recordMint(mintRequest: CreateMintRequest): Promise<void>;
32551
- submitMintingRequests(config: {
32552
- defaultBatchSize?: number;
32553
- chainName?: string;
32554
- maxNumberOfTries?: number;
32555
- }): Promise<void>;
32556
- processMint(body: string | Record<string, unknown>, otherHandlers?: {
32557
- zkevmMintRequestUpdated: (event: ZkevmMintRequestUpdated) => Promise<void>;
32558
- }): Promise<void>;
32559
- }
32560
-
32561
- type minting_backend_d_MintingBackendModule = MintingBackendModule;
32562
- declare const minting_backend_d_MintingBackendModule: typeof MintingBackendModule;
32563
- type minting_backend_d_MintingBackendModuleConfiguration = MintingBackendModuleConfiguration;
32564
- declare const minting_backend_d_processMint: typeof processMint;
32565
- declare const minting_backend_d_recordMint: typeof recordMint;
32566
- declare const minting_backend_d_submitMintingRequests: typeof submitMintingRequests;
32567
- declare namespace minting_backend_d {
32568
- export {
32569
- minting_backend_d_MintingBackendModule as MintingBackendModule,
32570
- minting_backend_d_MintingBackendModuleConfiguration as MintingBackendModuleConfiguration,
32571
- mintingPersistence$1 as mintingPersistencePg,
32572
- mintingPersistence as mintingPersistencePrismaSqlite,
32573
- minting_backend_d_processMint as processMint,
32574
- minting_backend_d_recordMint as recordMint,
32575
- minting_backend_d_submitMintingRequests as submitMintingRequests,
32576
- };
32577
- }
32578
-
32579
- 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 };
32079
+ 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 };