@argonprotocol/mainchain 1.4.5-dev.9ca6e414 → 1.4.5-dev.b0ac0a8f
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/browser/index.d.ts +2 -0
- package/browser/index.js +4 -0
- package/browser/index.js.map +1 -1
- package/lib/index.cjs +12 -8
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -0
- package/lib/index.js.map +1 -1
- package/package.json +2 -2
package/lib/index.cjs
CHANGED
|
@@ -800,6 +800,7 @@ var BitcoinLock = class _BitcoinLock {
|
|
|
800
800
|
|
|
801
801
|
|
|
802
802
|
|
|
803
|
+
|
|
803
804
|
constructor(data) {
|
|
804
805
|
this.utxoId = data.utxoId;
|
|
805
806
|
this.p2wshScriptHashHex = data.p2wshScriptHashHex;
|
|
@@ -820,6 +821,7 @@ var BitcoinLock = class _BitcoinLock {
|
|
|
820
821
|
this.isFunded = data.isFunded;
|
|
821
822
|
this.fundHoldExtensionsByBitcoinExpirationHeight = data.fundHoldExtensionsByBitcoinExpirationHeight;
|
|
822
823
|
this.createdAtArgonBlock = data.createdAtArgonBlock;
|
|
824
|
+
this.couponFeesPaid = _nullishCoalesce(data.couponFeesPaid, () => ( 0n));
|
|
823
825
|
}
|
|
824
826
|
/**
|
|
825
827
|
* Gets the UTXO reference by ID.
|
|
@@ -1197,6 +1199,7 @@ var BitcoinLock = class _BitcoinLock {
|
|
|
1197
1199
|
const fundHoldExtensionsByBitcoinExpirationHeight = Object.fromEntries(
|
|
1198
1200
|
[...utxo.fundHoldExtensions.entries()].map(([x, y]) => [x.toNumber(), y.toBigInt()])
|
|
1199
1201
|
);
|
|
1202
|
+
const couponFeesPaid = _nullishCoalesce(_optionalChain([utxo, 'access', _30 => _30.couponPaidFees, 'optionalAccess', _31 => _31.toBigInt, 'call', _32 => _32()]), () => ( 0n));
|
|
1200
1203
|
return new _BitcoinLock({
|
|
1201
1204
|
utxoId,
|
|
1202
1205
|
p2wshScriptHashHex,
|
|
@@ -1215,6 +1218,7 @@ var BitcoinLock = class _BitcoinLock {
|
|
|
1215
1218
|
createdAtHeight,
|
|
1216
1219
|
securityFees,
|
|
1217
1220
|
isFunded,
|
|
1221
|
+
couponFeesPaid,
|
|
1218
1222
|
fundHoldExtensionsByBitcoinExpirationHeight,
|
|
1219
1223
|
createdAtArgonBlock
|
|
1220
1224
|
});
|
|
@@ -7254,7 +7258,7 @@ var gatewayActivityEvents = [
|
|
|
7254
7258
|
function findEthereumTransferToArgonStartedLogIndexes(receipt, gatewayAddress) {
|
|
7255
7259
|
const normalizedGatewayAddress = _viem.getAddress.call(void 0, gatewayAddress).toLowerCase();
|
|
7256
7260
|
const indexes = receipt.logs.flatMap(
|
|
7257
|
-
(log, index) => log.address.toLowerCase() === normalizedGatewayAddress && _optionalChain([log, 'access',
|
|
7261
|
+
(log, index) => log.address.toLowerCase() === normalizedGatewayAddress && _optionalChain([log, 'access', _33 => _33.topics, 'access', _34 => _34[0], 'optionalAccess', _35 => _35.toLowerCase, 'call', _36 => _36()]) === MintingGatewayEvents.TransferToArgonStarted.topic ? [index] : []
|
|
7258
7262
|
);
|
|
7259
7263
|
if (indexes.length === 0) {
|
|
7260
7264
|
throw new Error(
|
|
@@ -7274,7 +7278,7 @@ function decodeEthereumTransferToArgonStartedLog(log) {
|
|
|
7274
7278
|
return transfer;
|
|
7275
7279
|
}
|
|
7276
7280
|
function decodeEthereumGatewayActivityLog(log) {
|
|
7277
|
-
const topic = _optionalChain([log, 'access',
|
|
7281
|
+
const topic = _optionalChain([log, 'access', _37 => _37.topics, 'access', _38 => _38[0], 'optionalAccess', _39 => _39.toLowerCase, 'call', _40 => _40()]);
|
|
7278
7282
|
if (!topic) {
|
|
7279
7283
|
throw new Error("Gateway activity log is missing an event signature topic");
|
|
7280
7284
|
}
|
|
@@ -7595,8 +7599,8 @@ async function loadRetainedExecutionHeaderAnchorAtOrAfterBlock(client, earliestB
|
|
|
7595
7599
|
args: [],
|
|
7596
7600
|
pageSize: 1,
|
|
7597
7601
|
startKey: executionHeaderAnchorsByBlockNumber.key(scanBlockNumberKey)
|
|
7598
|
-
})), 'access', async
|
|
7599
|
-
const scannedAnchor = _optionalChain([matchingEntry, 'optionalAccess',
|
|
7602
|
+
})), 'access', async _41 => _41[0], 'optionalAccess', async _42 => _42[1]]);
|
|
7603
|
+
const scannedAnchor = _optionalChain([matchingEntry, 'optionalAccess', _43 => _43.isSome]) ? matchingEntry.unwrap() : null;
|
|
7600
7604
|
if (!scannedAnchor) {
|
|
7601
7605
|
return null;
|
|
7602
7606
|
}
|
|
@@ -7622,9 +7626,9 @@ async function collectProofChunksForArgonFinalizedExecutionHeader(executionClien
|
|
|
7622
7626
|
if (blockNumber > plan.argonFinalizedExecutionHeader.blockNumber) {
|
|
7623
7627
|
break;
|
|
7624
7628
|
}
|
|
7625
|
-
let targetHeader = _optionalChain([loadedTargetHeaders, 'access',
|
|
7629
|
+
let targetHeader = _optionalChain([loadedTargetHeaders, 'access', _44 => _44.find, 'call', _45 => _45(
|
|
7626
7630
|
(loadedHeader) => loadedHeader.blockHash.toLowerCase() === blockHash.toLowerCase()
|
|
7627
|
-
), 'optionalAccess',
|
|
7631
|
+
), 'optionalAccess', _46 => _46.targetHeader]);
|
|
7628
7632
|
if (!targetHeader) {
|
|
7629
7633
|
targetHeader = await loadExecutionHeader(executionClient, blockHash);
|
|
7630
7634
|
loadedTargetHeaders.push({ blockHash, targetHeader });
|
|
@@ -7764,7 +7768,7 @@ async function getNextEthereumBeaconSyncTxs(client, beaconApiUrl) {
|
|
|
7764
7768
|
await new Promise((resolve) => setTimeout(resolve, lightClientUpdateRetryIntervalMs));
|
|
7765
7769
|
continue;
|
|
7766
7770
|
}
|
|
7767
|
-
const currentPeriodUpdate = _optionalChain([periodUpdates, 'access',
|
|
7771
|
+
const currentPeriodUpdate = _optionalChain([periodUpdates, 'access', _47 => _47[0], 'optionalAccess', _48 => _48.data]);
|
|
7768
7772
|
if (updateCarriesCommitteeForPeriod(
|
|
7769
7773
|
currentPeriodUpdate,
|
|
7770
7774
|
requiredCommitteePeriod,
|
|
@@ -7862,7 +7866,7 @@ function buildFork(spec, name) {
|
|
|
7862
7866
|
};
|
|
7863
7867
|
}
|
|
7864
7868
|
function hasNextSyncCommitteeUpdate(update) {
|
|
7865
|
-
return !!_optionalChain([update, 'optionalAccess',
|
|
7869
|
+
return !!_optionalChain([update, 'optionalAccess', _49 => _49.next_sync_committee]) && !!_optionalChain([update, 'optionalAccess', _50 => _50.next_sync_committee_branch]);
|
|
7866
7870
|
}
|
|
7867
7871
|
function getRequiredCommitteePeriod({
|
|
7868
7872
|
storedPeriod,
|