@imtbl/sdk 1.39.5-alpha → 1.39.6-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/blockchain_data.js +2 -2
- package/dist/browser/checkout/sdk.js +4 -4
- package/dist/checkout.js +5 -6
- package/dist/config.js +1 -1
- package/dist/index.browser.js +5 -5
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +483 -451
- package/dist/index.d.ts +4 -14
- package/dist/index.js +483 -451
- package/dist/minting_backend.d.ts +0 -6
- package/dist/minting_backend.js +10 -25
- package/dist/orderbook.d.ts +4 -8
- package/dist/orderbook.js +2 -3
- package/dist/passport.js +1585 -1537
- package/dist/webhook.js +1 -1
- package/dist/x.js +3 -3
- package/package.json +2 -3
|
@@ -26,8 +26,6 @@ type CreateMintRequest = {
|
|
|
26
26
|
asset_id: string;
|
|
27
27
|
metadata: any;
|
|
28
28
|
owner_address: string;
|
|
29
|
-
amount?: number;
|
|
30
|
-
token_id?: string;
|
|
31
29
|
};
|
|
32
30
|
type MintRequest = {
|
|
33
31
|
id: string;
|
|
@@ -37,8 +35,6 @@ type MintRequest = {
|
|
|
37
35
|
metadata: any;
|
|
38
36
|
owner_address: string;
|
|
39
37
|
tried_count: number;
|
|
40
|
-
amount?: number;
|
|
41
|
-
token_id?: string;
|
|
42
38
|
};
|
|
43
39
|
type SubmittedMintRequest = {
|
|
44
40
|
tokenId: string | null;
|
|
@@ -49,7 +45,6 @@ type SubmittedMintRequest = {
|
|
|
49
45
|
metadataId: string;
|
|
50
46
|
imtblZkevmMintRequestUpdatedId: string;
|
|
51
47
|
error: any | null;
|
|
52
|
-
amount: number | null;
|
|
53
48
|
};
|
|
54
49
|
interface MintingPersistence {
|
|
55
50
|
recordMint: (request: CreateMintRequest) => Promise<void>;
|
|
@@ -3504,7 +3499,6 @@ type MintRequestEvent = {
|
|
|
3504
3499
|
} | null;
|
|
3505
3500
|
created_at: string;
|
|
3506
3501
|
updated_at: string;
|
|
3507
|
-
amount?: number;
|
|
3508
3502
|
};
|
|
3509
3503
|
};
|
|
3510
3504
|
declare const processMint: (mintingPersistence: MintingPersistence, event: MintRequestEvent, logger?: Logger) => Promise<void>;
|
package/dist/minting_backend.js
CHANGED
|
@@ -5286,7 +5286,7 @@ const flattenProperties = (properties) => {
|
|
|
5286
5286
|
};
|
|
5287
5287
|
|
|
5288
5288
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
5289
|
-
const SDK_VERSION = '1.39.
|
|
5289
|
+
const SDK_VERSION = '1.39.6-alpha.2';
|
|
5290
5290
|
const getFrameParentDomain = () => {
|
|
5291
5291
|
if (isNode()) {
|
|
5292
5292
|
return '';
|
|
@@ -5554,7 +5554,7 @@ class APIError extends Error {
|
|
|
5554
5554
|
|
|
5555
5555
|
/* eslint-disable implicit-arrow-linebreak */
|
|
5556
5556
|
const defaultHeaders = {
|
|
5557
|
-
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.39.
|
|
5557
|
+
sdkVersion: 'ts-immutable-sdk-multi-rollup-api-client-1.39.6-alpha.2',
|
|
5558
5558
|
};
|
|
5559
5559
|
/**
|
|
5560
5560
|
* createAPIConfiguration to create a custom Configuration
|
|
@@ -6105,12 +6105,9 @@ const mintingPersistence$1 = (client) => {
|
|
|
6105
6105
|
return {
|
|
6106
6106
|
recordMint: async (request) => {
|
|
6107
6107
|
const r = await client.query(`
|
|
6108
|
-
INSERT INTO im_assets (asset_id, contract_address, owner_address, metadata
|
|
6109
|
-
VALUES ($1, $2, $3, $4
|
|
6110
|
-
`, [
|
|
6111
|
-
request.asset_id, request.contract_address, request.owner_address,
|
|
6112
|
-
request.metadata, request.amount, request.token_id
|
|
6113
|
-
]);
|
|
6108
|
+
INSERT INTO im_assets (asset_id, contract_address, owner_address, metadata)
|
|
6109
|
+
VALUES ($1, $2, $3, $4) ON CONFLICT (asset_id, contract_address) DO NOTHING;
|
|
6110
|
+
`, [request.asset_id, request.contract_address, request.owner_address, request.metadata]);
|
|
6114
6111
|
if (r.rowCount === 0) {
|
|
6115
6112
|
throw new Error('Duplicated mint');
|
|
6116
6113
|
}
|
|
@@ -6139,9 +6136,8 @@ const mintingPersistence$1 = (client) => {
|
|
|
6139
6136
|
minting_status,
|
|
6140
6137
|
metadata_id,
|
|
6141
6138
|
last_imtbl_zkevm_mint_request_updated_id,
|
|
6142
|
-
error
|
|
6143
|
-
|
|
6144
|
-
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) ON CONFLICT (asset_id, contract_address)
|
|
6139
|
+
error
|
|
6140
|
+
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) ON CONFLICT (asset_id, contract_address)
|
|
6145
6141
|
DO UPDATE SET
|
|
6146
6142
|
owner_address = $3,
|
|
6147
6143
|
token_id = $4,
|
|
@@ -6161,8 +6157,7 @@ const mintingPersistence$1 = (client) => {
|
|
|
6161
6157
|
submittedMintRequest.status,
|
|
6162
6158
|
submittedMintRequest.metadataId,
|
|
6163
6159
|
submittedMintRequest.imtblZkevmMintRequestUpdatedId,
|
|
6164
|
-
submittedMintRequest.error
|
|
6165
|
-
submittedMintRequest.amount
|
|
6160
|
+
submittedMintRequest.error
|
|
6166
6161
|
]);
|
|
6167
6162
|
},
|
|
6168
6163
|
markAsConflict: async (assetIds, contractAddress) => {
|
|
@@ -6217,9 +6212,7 @@ const mintingPersistence = (client) => {
|
|
|
6217
6212
|
assetId: request.asset_id,
|
|
6218
6213
|
contractAddress: request.contract_address,
|
|
6219
6214
|
ownerAddress: request.owner_address,
|
|
6220
|
-
metadata: JSON.stringify(request.metadata),
|
|
6221
|
-
amount: request.amount || null,
|
|
6222
|
-
tokenId: request.token_id || null,
|
|
6215
|
+
metadata: JSON.stringify(request.metadata), // Serialize JSON metadata
|
|
6223
6216
|
},
|
|
6224
6217
|
});
|
|
6225
6218
|
// Since upsert does not throw on update and does not tell directly if it updated or inserted,
|
|
@@ -6262,8 +6255,6 @@ const mintingPersistence = (client) => {
|
|
|
6262
6255
|
metadata: asset.metadata ? JSON.parse(asset.metadata) : null,
|
|
6263
6256
|
owner_address: asset.ownerAddress,
|
|
6264
6257
|
tried_count: asset.triedCount,
|
|
6265
|
-
amount: asset.amount || null,
|
|
6266
|
-
token_id: asset.tokenId || null,
|
|
6267
6258
|
}));
|
|
6268
6259
|
},
|
|
6269
6260
|
updateMintingStatusToSubmitted: async (ids) => {
|
|
@@ -6306,7 +6297,6 @@ const mintingPersistence = (client) => {
|
|
|
6306
6297
|
metadataId: submittedMintRequest.metadataId,
|
|
6307
6298
|
lastImtblZkevmMintRequestUpdatedId: submittedMintRequest.imtblZkevmMintRequestUpdatedId,
|
|
6308
6299
|
error: submittedMintRequest.error,
|
|
6309
|
-
amount: submittedMintRequest.amount || null
|
|
6310
6300
|
}
|
|
6311
6301
|
});
|
|
6312
6302
|
}
|
|
@@ -6322,7 +6312,6 @@ const mintingPersistence = (client) => {
|
|
|
6322
6312
|
metadataId: submittedMintRequest.metadataId,
|
|
6323
6313
|
lastImtblZkevmMintRequestUpdatedId: submittedMintRequest.imtblZkevmMintRequestUpdatedId,
|
|
6324
6314
|
error: submittedMintRequest.error,
|
|
6325
|
-
amount: submittedMintRequest.amount || null
|
|
6326
6315
|
}
|
|
6327
6316
|
});
|
|
6328
6317
|
}
|
|
@@ -6410,8 +6399,7 @@ const mintingPersistence = (client) => {
|
|
|
6410
6399
|
metadata: asset.metadata ? JSON.parse(asset.metadata) : null,
|
|
6411
6400
|
owner_address: asset.ownerAddress,
|
|
6412
6401
|
tried_count: asset.triedCount,
|
|
6413
|
-
wallet_address: asset.ownerAddress
|
|
6414
|
-
amount: asset.amount || null
|
|
6402
|
+
wallet_address: asset.ownerAddress
|
|
6415
6403
|
};
|
|
6416
6404
|
}
|
|
6417
6405
|
};
|
|
@@ -6478,8 +6466,6 @@ const submitMintingRequests = async (mintingPersistence, blockchainDataSDKClient
|
|
|
6478
6466
|
reference_id: row.asset_id,
|
|
6479
6467
|
owner_address: row.owner_address,
|
|
6480
6468
|
metadata: row.metadata,
|
|
6481
|
-
token_id: row.token_id,
|
|
6482
|
-
amount: row.amount ? `${row.amount}` : null,
|
|
6483
6469
|
})),
|
|
6484
6470
|
},
|
|
6485
6471
|
};
|
|
@@ -6568,7 +6554,6 @@ const processMint = async (mintingPersistence, event, logger = console) => {
|
|
|
6568
6554
|
metadataId: event.data.metadata_id,
|
|
6569
6555
|
imtblZkevmMintRequestUpdatedId: event.event_id,
|
|
6570
6556
|
error: event.data.error ? JSON.stringify(event.data.error) : null,
|
|
6571
|
-
amount: event.data.amount || null,
|
|
6572
6557
|
});
|
|
6573
6558
|
};
|
|
6574
6559
|
|
package/dist/orderbook.d.ts
CHANGED
|
@@ -778,7 +778,7 @@ type Item = (NativeItem$1 | ERC20Item$1 | ERC721Item$1 | ERC1155Item$1);
|
|
|
778
778
|
|
|
779
779
|
type ProtocolData = {
|
|
780
780
|
/**
|
|
781
|
-
* Seaport order type
|
|
781
|
+
* Seaport order type
|
|
782
782
|
*/
|
|
783
783
|
order_type: ProtocolData.order_type;
|
|
784
784
|
/**
|
|
@@ -800,7 +800,7 @@ type ProtocolData = {
|
|
|
800
800
|
};
|
|
801
801
|
declare namespace ProtocolData {
|
|
802
802
|
/**
|
|
803
|
-
* Seaport order type
|
|
803
|
+
* Seaport order type
|
|
804
804
|
*/
|
|
805
805
|
enum order_type {
|
|
806
806
|
FULL_RESTRICTED = "FULL_RESTRICTED",
|
|
@@ -856,9 +856,6 @@ type Chain = {
|
|
|
856
856
|
name: string;
|
|
857
857
|
};
|
|
858
858
|
|
|
859
|
-
/**
|
|
860
|
-
* The ratio of the order that has been filled, an order that has been fully filled will have the same numerator and denominator values.
|
|
861
|
-
*/
|
|
862
859
|
type FillStatus = {
|
|
863
860
|
/**
|
|
864
861
|
* The numerator of the fill status
|
|
@@ -1182,7 +1179,7 @@ declare class OrdersService {
|
|
|
1182
1179
|
*/
|
|
1183
1180
|
pageSize?: PageSize;
|
|
1184
1181
|
/**
|
|
1185
|
-
* Order field to sort by
|
|
1182
|
+
* Order field to sort by
|
|
1186
1183
|
*/
|
|
1187
1184
|
sortBy?: 'created_at' | 'updated_at' | 'buy_item_amount';
|
|
1188
1185
|
/**
|
|
@@ -1238,10 +1235,9 @@ declare class OrdersService {
|
|
|
1238
1235
|
* @returns ListTradeResult OK response.
|
|
1239
1236
|
* @throws ApiError
|
|
1240
1237
|
*/
|
|
1241
|
-
listTrades({ chainName, accountAddress,
|
|
1238
|
+
listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }: {
|
|
1242
1239
|
chainName: ChainName;
|
|
1243
1240
|
accountAddress?: string;
|
|
1244
|
-
sellItemContractAddress?: string;
|
|
1245
1241
|
/**
|
|
1246
1242
|
* From indexed at including given date
|
|
1247
1243
|
*/
|
package/dist/orderbook.js
CHANGED
|
@@ -132,7 +132,7 @@ const flattenProperties = (properties) => {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
// WARNING: DO NOT CHANGE THE STRING BELOW. IT GETS REPLACED AT BUILD TIME.
|
|
135
|
-
const SDK_VERSION = '1.39.
|
|
135
|
+
const SDK_VERSION = '1.39.6-alpha.2';
|
|
136
136
|
const getFrameParentDomain = () => {
|
|
137
137
|
if (isNode()) {
|
|
138
138
|
return '';
|
|
@@ -867,7 +867,7 @@ class OrdersService {
|
|
|
867
867
|
* @returns ListTradeResult OK response.
|
|
868
868
|
* @throws ApiError
|
|
869
869
|
*/
|
|
870
|
-
listTrades({ chainName, accountAddress,
|
|
870
|
+
listTrades({ chainName, accountAddress, fromIndexedAt, pageSize, sortBy, sortDirection, pageCursor, }) {
|
|
871
871
|
return this.httpRequest.request({
|
|
872
872
|
method: 'GET',
|
|
873
873
|
url: '/v1/chains/{chain_name}/trades',
|
|
@@ -876,7 +876,6 @@ class OrdersService {
|
|
|
876
876
|
},
|
|
877
877
|
query: {
|
|
878
878
|
'account_address': accountAddress,
|
|
879
|
-
'sell_item_contract_address': sellItemContractAddress,
|
|
880
879
|
'from_indexed_at': fromIndexedAt,
|
|
881
880
|
'page_size': pageSize,
|
|
882
881
|
'sort_by': sortBy,
|