@gvnrdao/dh-sdk 0.0.232 → 0.0.233
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.js +6 -6
- package/dist/index.mjs +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42541,21 +42541,21 @@ Error data: ${errorData || "none"}`
|
|
|
42541
42541
|
try {
|
|
42542
42542
|
const signer = this.getSignerOrThrow();
|
|
42543
42543
|
const contractAddresses = this.getContractAddressesOrThrow();
|
|
42544
|
-
const
|
|
42545
|
-
if (!
|
|
42546
|
-
return { success: false, error: "
|
|
42544
|
+
const btcSpendAuthorizerAddress = contractAddresses.btcSpendAuthorizer;
|
|
42545
|
+
if (!btcSpendAuthorizerAddress) {
|
|
42546
|
+
return { success: false, error: "BTCSpendAuthorizer address not configured" };
|
|
42547
42547
|
}
|
|
42548
42548
|
const utxoKey = ethers_exports.utils.solidityKeccak256(
|
|
42549
42549
|
["string", "uint32"],
|
|
42550
42550
|
[txid, vout]
|
|
42551
42551
|
);
|
|
42552
|
-
const
|
|
42553
|
-
|
|
42552
|
+
const btcSpendAuthorizer = new ethers_exports.Contract(
|
|
42553
|
+
btcSpendAuthorizerAddress,
|
|
42554
42554
|
["function cancelStaleSpend(bytes32 positionId, bytes32 utxoKey) external"],
|
|
42555
42555
|
signer
|
|
42556
42556
|
);
|
|
42557
42557
|
const positionIdBytes32 = this.toBytes32(positionId);
|
|
42558
|
-
const tx = await
|
|
42558
|
+
const tx = await btcSpendAuthorizer["cancelStaleSpend"](positionIdBytes32, utxoKey);
|
|
42559
42559
|
const receipt = await tx.wait();
|
|
42560
42560
|
return { success: true, transactionHash: receipt.transactionHash };
|
|
42561
42561
|
} catch (error) {
|
package/dist/index.mjs
CHANGED
|
@@ -42469,21 +42469,21 @@ Error data: ${errorData || "none"}`
|
|
|
42469
42469
|
try {
|
|
42470
42470
|
const signer = this.getSignerOrThrow();
|
|
42471
42471
|
const contractAddresses = this.getContractAddressesOrThrow();
|
|
42472
|
-
const
|
|
42473
|
-
if (!
|
|
42474
|
-
return { success: false, error: "
|
|
42472
|
+
const btcSpendAuthorizerAddress = contractAddresses.btcSpendAuthorizer;
|
|
42473
|
+
if (!btcSpendAuthorizerAddress) {
|
|
42474
|
+
return { success: false, error: "BTCSpendAuthorizer address not configured" };
|
|
42475
42475
|
}
|
|
42476
42476
|
const utxoKey = ethers_exports.utils.solidityKeccak256(
|
|
42477
42477
|
["string", "uint32"],
|
|
42478
42478
|
[txid, vout]
|
|
42479
42479
|
);
|
|
42480
|
-
const
|
|
42481
|
-
|
|
42480
|
+
const btcSpendAuthorizer = new ethers_exports.Contract(
|
|
42481
|
+
btcSpendAuthorizerAddress,
|
|
42482
42482
|
["function cancelStaleSpend(bytes32 positionId, bytes32 utxoKey) external"],
|
|
42483
42483
|
signer
|
|
42484
42484
|
);
|
|
42485
42485
|
const positionIdBytes32 = this.toBytes32(positionId);
|
|
42486
|
-
const tx = await
|
|
42486
|
+
const tx = await btcSpendAuthorizer["cancelStaleSpend"](positionIdBytes32, utxoKey);
|
|
42487
42487
|
const receipt = await tx.wait();
|
|
42488
42488
|
return { success: true, transactionHash: receipt.transactionHash };
|
|
42489
42489
|
} catch (error) {
|
package/package.json
CHANGED