@gvnrdao/dh-sdk 0.0.233 → 0.0.234

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 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 btcSpendAuthorizerAddress = contractAddresses.btcSpendAuthorizer;
42545
- if (!btcSpendAuthorizerAddress) {
42546
- return { success: false, error: "BTCSpendAuthorizer address not configured" };
42544
+ const positionManagerAddress = contractAddresses.positionManager;
42545
+ if (!positionManagerAddress) {
42546
+ return { success: false, error: "PositionManager 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 btcSpendAuthorizer = new ethers_exports.Contract(
42553
- btcSpendAuthorizerAddress,
42552
+ const positionManager = new ethers_exports.Contract(
42553
+ positionManagerAddress,
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 btcSpendAuthorizer["cancelStaleSpend"](positionIdBytes32, utxoKey);
42558
+ const tx = await positionManager["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 btcSpendAuthorizerAddress = contractAddresses.btcSpendAuthorizer;
42473
- if (!btcSpendAuthorizerAddress) {
42474
- return { success: false, error: "BTCSpendAuthorizer address not configured" };
42472
+ const positionManagerAddress = contractAddresses.positionManager;
42473
+ if (!positionManagerAddress) {
42474
+ return { success: false, error: "PositionManager 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 btcSpendAuthorizer = new ethers_exports.Contract(
42481
- btcSpendAuthorizerAddress,
42480
+ const positionManager = new ethers_exports.Contract(
42481
+ positionManagerAddress,
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 btcSpendAuthorizer["cancelStaleSpend"](positionIdBytes32, utxoKey);
42486
+ const tx = await positionManager["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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-sdk",
3
- "version": "0.0.233",
3
+ "version": "0.0.234",
4
4
  "description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",