@stableflow/bridges 3.1.3 → 3.1.4-rc-0f7f3e64ed-20260731
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.mts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -879,6 +879,17 @@ async function quoteSignature(params) {
|
|
|
879
879
|
return response.data ?? {};
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
+
// src/utils/oft.ts
|
|
883
|
+
var OFT_SHARED_DECIMALS = 6;
|
|
884
|
+
function removeOftDust(amountWei, localDecimals, sharedDecimals = OFT_SHARED_DECIMALS) {
|
|
885
|
+
const amount = BigInt(amountWei.toString());
|
|
886
|
+
if (localDecimals <= sharedDecimals) {
|
|
887
|
+
return amount.toString();
|
|
888
|
+
}
|
|
889
|
+
const rate = 10n ** BigInt(localDecimals - sharedDecimals);
|
|
890
|
+
return (amount / rate * rate).toString();
|
|
891
|
+
}
|
|
892
|
+
|
|
882
893
|
// src/usdt0/config.ts
|
|
883
894
|
var USDT0_CONFIG = {
|
|
884
895
|
Ethereum: {
|
|
@@ -1090,6 +1101,17 @@ var OFT_ABI = [
|
|
|
1090
1101
|
stateMutability: "pure",
|
|
1091
1102
|
type: "function"
|
|
1092
1103
|
},
|
|
1104
|
+
{
|
|
1105
|
+
inputs: [
|
|
1106
|
+
{ internalType: "uint256", name: "_amountLD", type: "uint256" }
|
|
1107
|
+
],
|
|
1108
|
+
name: "removeDust",
|
|
1109
|
+
outputs: [
|
|
1110
|
+
{ internalType: "uint256", name: "amountLD", type: "uint256" }
|
|
1111
|
+
],
|
|
1112
|
+
stateMutability: "view",
|
|
1113
|
+
type: "function"
|
|
1114
|
+
},
|
|
1093
1115
|
{
|
|
1094
1116
|
inputs: [
|
|
1095
1117
|
{
|
|
@@ -6642,6 +6664,6 @@ var getHopMsgFee = async (params) => {
|
|
|
6642
6664
|
}
|
|
6643
6665
|
};
|
|
6644
6666
|
|
|
6645
|
-
export { BridgeSFA, MIDDLE_CHAIN_REFOUND_ADDRESS2 as CCTP_MIDDLE_CHAIN_REFOUND_ADDRESS, MIDDLE_TOKEN_CHAIN2 as CCTP_MIDDLE_TOKEN_CHAIN, CCTP_PROXY_RELAY_CONTRACT, DATA_HEX_PROTOBUF_EXTRA, FRAXZERO_MIDDLE_TOKEN_FRXUSD, FRAXZERO_MIDDLE_TOKEN_USDC, LZ_RECEIVE_VALUE, OFT_ABI, SIGNATURE_SIZE, ServiceMap, USDT0_CONFIG, USDT0_LEGACY_MESH_TRANSFTER_FEE, addressToBytes32, buildApproveTx, buildPermitTypedData, buildSendTx, formatNumber, formatQuoteError, getHopMsgFee, getQuoteModes, quoteSignature };
|
|
6667
|
+
export { BridgeSFA, MIDDLE_CHAIN_REFOUND_ADDRESS2 as CCTP_MIDDLE_CHAIN_REFOUND_ADDRESS, MIDDLE_TOKEN_CHAIN2 as CCTP_MIDDLE_TOKEN_CHAIN, CCTP_PROXY_RELAY_CONTRACT, DATA_HEX_PROTOBUF_EXTRA, FRAXZERO_MIDDLE_TOKEN_FRXUSD, FRAXZERO_MIDDLE_TOKEN_USDC, LZ_RECEIVE_VALUE, OFT_ABI, OFT_SHARED_DECIMALS, SIGNATURE_SIZE, ServiceMap, USDT0_CONFIG, USDT0_LEGACY_MESH_TRANSFTER_FEE, addressToBytes32, buildApproveTx, buildPermitTypedData, buildSendTx, formatNumber, formatQuoteError, getHopMsgFee, getQuoteModes, quoteSignature, removeOftDust };
|
|
6646
6668
|
//# sourceMappingURL=index.mjs.map
|
|
6647
6669
|
//# sourceMappingURL=index.mjs.map
|