@thesingularitynetwork/darkswap-sdk 0.1.38 → 0.1.40
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/config/config.d.ts +1 -0
- package/dist/darkswap-sdk.cjs.development.js +9 -3
- package/dist/darkswap-sdk.cjs.development.js.map +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js +1 -1
- package/dist/darkswap-sdk.cjs.production.min.js.map +1 -1
- package/dist/darkswap-sdk.esm.js +9 -4
- package/dist/darkswap-sdk.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/config/config.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const legacyTokenConfig: {
|
|
2
2
|
[chainId: number]: string[];
|
|
3
3
|
};
|
|
4
|
+
export declare const getConfirmations: (chainId: number) => number;
|
|
4
5
|
export declare const DEFAULT_FEE_RATIO = 300n;
|
|
5
6
|
export declare const GAS_LIMIT_MULTIPLIER = 120n;
|
|
6
7
|
export declare const GAS_LIMIT_PRECISION = 100n;
|
|
@@ -4230,8 +4230,13 @@ var ERC20_USDT = {
|
|
|
4230
4230
|
ChainId[ChainId["BASE"] = 8453] = "BASE";
|
|
4231
4231
|
})(exports.ChainId || (exports.ChainId = {}));
|
|
4232
4232
|
|
|
4233
|
-
var _legacyTokenConfig;
|
|
4233
|
+
var _legacyTokenConfig, _confirmationsConfig;
|
|
4234
4234
|
var legacyTokenConfig = (_legacyTokenConfig = {}, _legacyTokenConfig[exports.ChainId.MAINNET] = ['0xdac17f958d2ee523a2206206994597c13d831ec7'], _legacyTokenConfig[exports.ChainId.HARDHAT] = ['0xdac17f958d2ee523a2206206994597c13d831ec7'], _legacyTokenConfig);
|
|
4235
|
+
var confirmationsConfig = (_confirmationsConfig = {}, _confirmationsConfig[exports.ChainId.MAINNET] = 3, _confirmationsConfig[exports.ChainId.ARBITRUM_ONE] = 3, _confirmationsConfig[exports.ChainId.BASE] = 3, _confirmationsConfig[exports.ChainId.SEPOLIA] = 3, _confirmationsConfig[exports.ChainId.HARDHAT] = 3, _confirmationsConfig);
|
|
4236
|
+
var DEFAULT_CONFIRMATIONS = 3;
|
|
4237
|
+
var getConfirmations = function getConfirmations(chainId) {
|
|
4238
|
+
return confirmationsConfig[chainId] || DEFAULT_CONFIRMATIONS;
|
|
4239
|
+
};
|
|
4235
4240
|
var DEFAULT_FEE_RATIO = 300n;
|
|
4236
4241
|
var GAS_LIMIT_MULTIPLIER = 120n;
|
|
4237
4242
|
var GAS_LIMIT_PRECISION = 100n;
|
|
@@ -5004,7 +5009,7 @@ var DepositService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
5004
5009
|
case 3:
|
|
5005
5010
|
tx = _context4.v;
|
|
5006
5011
|
_context4.n = 4;
|
|
5007
|
-
return tx.wait();
|
|
5012
|
+
return tx.wait(getConfirmations(this._darkSwap.chainId));
|
|
5008
5013
|
case 4:
|
|
5009
5014
|
return _context4.a(2);
|
|
5010
5015
|
}
|
|
@@ -9490,7 +9495,7 @@ var RetailCreateOrderService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
9490
9495
|
case 4:
|
|
9491
9496
|
tx = _context4.v;
|
|
9492
9497
|
_context4.n = 5;
|
|
9493
|
-
return tx.wait();
|
|
9498
|
+
return tx.wait(getConfirmations(this._darkSwap.chainId));
|
|
9494
9499
|
case 5:
|
|
9495
9500
|
return _context4.a(2);
|
|
9496
9501
|
}
|
|
@@ -10206,6 +10211,7 @@ exports.createNote = createNote;
|
|
|
10206
10211
|
exports.createOrderNoteExt = createOrderNoteExt;
|
|
10207
10212
|
exports.deserializeDarkSwapMessage = deserializeDarkSwapMessage;
|
|
10208
10213
|
exports.generateKeyPair = generateKeyPair;
|
|
10214
|
+
exports.getConfirmations = getConfirmations;
|
|
10209
10215
|
exports.getFeeRatio = getFeeRatio;
|
|
10210
10216
|
exports.getMerklePathAndRoot = getMerklePathAndRoot;
|
|
10211
10217
|
exports.getNoteFooter = getNoteFooter;
|