@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/darkswap-sdk.esm.js
CHANGED
|
@@ -4228,8 +4228,13 @@ var ChainId;
|
|
|
4228
4228
|
ChainId[ChainId["BASE"] = 8453] = "BASE";
|
|
4229
4229
|
})(ChainId || (ChainId = {}));
|
|
4230
4230
|
|
|
4231
|
-
var _legacyTokenConfig;
|
|
4231
|
+
var _legacyTokenConfig, _confirmationsConfig;
|
|
4232
4232
|
var legacyTokenConfig = (_legacyTokenConfig = {}, _legacyTokenConfig[ChainId.MAINNET] = ['0xdac17f958d2ee523a2206206994597c13d831ec7'], _legacyTokenConfig[ChainId.HARDHAT] = ['0xdac17f958d2ee523a2206206994597c13d831ec7'], _legacyTokenConfig);
|
|
4233
|
+
var confirmationsConfig = (_confirmationsConfig = {}, _confirmationsConfig[ChainId.MAINNET] = 3, _confirmationsConfig[ChainId.ARBITRUM_ONE] = 3, _confirmationsConfig[ChainId.BASE] = 3, _confirmationsConfig[ChainId.SEPOLIA] = 3, _confirmationsConfig[ChainId.HARDHAT] = 3, _confirmationsConfig);
|
|
4234
|
+
var DEFAULT_CONFIRMATIONS = 3;
|
|
4235
|
+
var getConfirmations = function getConfirmations(chainId) {
|
|
4236
|
+
return confirmationsConfig[chainId] || DEFAULT_CONFIRMATIONS;
|
|
4237
|
+
};
|
|
4233
4238
|
var DEFAULT_FEE_RATIO = 300n;
|
|
4234
4239
|
var GAS_LIMIT_MULTIPLIER = 120n;
|
|
4235
4240
|
var GAS_LIMIT_PRECISION = 100n;
|
|
@@ -5003,7 +5008,7 @@ var DepositService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
5003
5008
|
case 3:
|
|
5004
5009
|
tx = _context4.v;
|
|
5005
5010
|
_context4.n = 4;
|
|
5006
|
-
return tx.wait();
|
|
5011
|
+
return tx.wait(getConfirmations(this._darkSwap.chainId));
|
|
5007
5012
|
case 4:
|
|
5008
5013
|
return _context4.a(2);
|
|
5009
5014
|
}
|
|
@@ -9489,7 +9494,7 @@ var RetailCreateOrderService = /*#__PURE__*/function (_BaseContractService) {
|
|
|
9489
9494
|
case 4:
|
|
9490
9495
|
tx = _context4.v;
|
|
9491
9496
|
_context4.n = 5;
|
|
9492
|
-
return tx.wait();
|
|
9497
|
+
return tx.wait(getConfirmations(this._darkSwap.chainId));
|
|
9493
9498
|
case 5:
|
|
9494
9499
|
return _context4.a(2);
|
|
9495
9500
|
}
|
|
@@ -10174,5 +10179,5 @@ function deserializeDarkSwapMessage(serializedMessage) {
|
|
|
10174
10179
|
};
|
|
10175
10180
|
}
|
|
10176
10181
|
|
|
10177
|
-
export { ChainId, DEFAULT_FEE_RATIO, DOMAIN_NOTE, DOMAIN_ORDER_NOTE, DarkSwap, DarkSwapError, DarkSwapProofError, DepositContext, DepositService, EMPTY_FOOTER, EMPTY_NOTE, EMPTY_NULLIFIER, EMPTY_PATH, FEE_RATIO_PRECISION, GAS_LIMIT_MULTIPLIER, GAS_LIMIT_PRECISION, JoinService, NoteOnChainStatus, PROOF_DOMAIN, ProCancelOrderService, ProCreateOrderService, ProSwapService, RetailCancelOrderService, RetailCreateOrderService, RetailSwapService, TripleJoinService, WithdrawService, calcFeeAmount, calcNullifier, contractConfig, createNote, createOrderNoteExt, deserializeDarkSwapMessage, generateKeyPair, getFeeRatio, getMerklePathAndRoot, getNoteFooter, getNoteOnChainStatusByPublicKey, getNoteOnChainStatusBySignature, getNullifierBySignature, hexlify32, isAddressEquals, isHexEquals, isNativeAsset, isNoteActive, isNoteCreated, isNoteSpent, isNoteValid, legacyTokenConfig, multiGetMerklePathAndRoot, serializeDarkSwapMessage, validateNoteWithPubKey, validateOrderNoteWithPubKey };
|
|
10182
|
+
export { ChainId, DEFAULT_FEE_RATIO, DOMAIN_NOTE, DOMAIN_ORDER_NOTE, DarkSwap, DarkSwapError, DarkSwapProofError, DepositContext, DepositService, EMPTY_FOOTER, EMPTY_NOTE, EMPTY_NULLIFIER, EMPTY_PATH, FEE_RATIO_PRECISION, GAS_LIMIT_MULTIPLIER, GAS_LIMIT_PRECISION, JoinService, NoteOnChainStatus, PROOF_DOMAIN, ProCancelOrderService, ProCreateOrderService, ProSwapService, RetailCancelOrderService, RetailCreateOrderService, RetailSwapService, TripleJoinService, WithdrawService, calcFeeAmount, calcNullifier, contractConfig, createNote, createOrderNoteExt, deserializeDarkSwapMessage, generateKeyPair, getConfirmations, getFeeRatio, getMerklePathAndRoot, getNoteFooter, getNoteOnChainStatusByPublicKey, getNoteOnChainStatusBySignature, getNullifierBySignature, hexlify32, isAddressEquals, isHexEquals, isNativeAsset, isNoteActive, isNoteCreated, isNoteSpent, isNoteValid, legacyTokenConfig, multiGetMerklePathAndRoot, serializeDarkSwapMessage, validateNoteWithPubKey, validateOrderNoteWithPubKey };
|
|
10178
10183
|
//# sourceMappingURL=darkswap-sdk.esm.js.map
|