@indigo-labs/indigo-sdk 0.4.2 → 0.4.3

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
@@ -6245,7 +6245,6 @@ function voteHelper(stakingPosLockedAmt, pollShard, voteOption, currentTime, ind
6245
6245
  async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, lucid, currentSlot) {
6246
6246
  const network = lucid.config().network;
6247
6247
  const currentTime = BigInt((0, import_lucid25.slotToUnixTime)(network, currentSlot));
6248
- const ownAddr = await lucid.wallet().address();
6249
6248
  const pollShardRefScriptUtxo = matchSingle(
6250
6249
  await lucid.utxosByOutRef([
6251
6250
  fromSystemParamsScriptRef(
@@ -6289,7 +6288,9 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
6289
6288
  BigInt(validityFrom),
6290
6289
  indyStakedAmt
6291
6290
  );
6292
- return lucid.newTx().validFrom(validityFrom).validTo(validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
6291
+ return lucid.newTx().validFrom(validityFrom).validTo(
6292
+ validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
6293
+ ).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
6293
6294
  [pollShardUtxo],
6294
6295
  serialisePollShardRedeemer({ Vote: voteOption })
6295
6296
  ).pay.ToContract(
@@ -6314,7 +6315,7 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
6314
6315
  })
6315
6316
  },
6316
6317
  stakingPosUtxo.assets
6317
- ).addSigner(ownAddr);
6318
+ ).addSignerKey((0, import_lucid25.toHex)(stakingPosDatum.owner));
6318
6319
  }
6319
6320
  async function mergeShards(pollManagerOref, shardsOutRefs, sysParams, lucid, currentSlot) {
6320
6321
  const network = lucid.config().network;
package/dist/index.mjs CHANGED
@@ -5985,7 +5985,6 @@ function voteHelper(stakingPosLockedAmt, pollShard, voteOption, currentTime, ind
5985
5985
  async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, lucid, currentSlot) {
5986
5986
  const network = lucid.config().network;
5987
5987
  const currentTime = BigInt(slotToUnixTime6(network, currentSlot));
5988
- const ownAddr = await lucid.wallet().address();
5989
5988
  const pollShardRefScriptUtxo = matchSingle(
5990
5989
  await lucid.utxosByOutRef([
5991
5990
  fromSystemParamsScriptRef(
@@ -6029,7 +6028,9 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
6029
6028
  BigInt(validityFrom),
6030
6029
  indyStakedAmt
6031
6030
  );
6032
- return lucid.newTx().validFrom(validityFrom).validTo(validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
6031
+ return lucid.newTx().validFrom(validityFrom).validTo(
6032
+ validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND
6033
+ ).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
6033
6034
  [pollShardUtxo],
6034
6035
  serialisePollShardRedeemer({ Vote: voteOption })
6035
6036
  ).pay.ToContract(
@@ -6054,7 +6055,7 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
6054
6055
  })
6055
6056
  },
6056
6057
  stakingPosUtxo.assets
6057
- ).addSigner(ownAddr);
6058
+ ).addSignerKey(toHex8(stakingPosDatum.owner));
6058
6059
  }
6059
6060
  async function mergeShards(pollManagerOref, shardsOutRefs, sysParams, lucid, currentSlot) {
6060
6061
  const network = lucid.config().network;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigo-labs/indigo-sdk",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Indigo SDK for interacting with Indigo endpoints via lucid-evolution",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -418,8 +418,6 @@ export async function vote(
418
418
  const network = lucid.config().network!;
419
419
  const currentTime = BigInt(slotToUnixTime(network, currentSlot));
420
420
 
421
- const ownAddr = await lucid.wallet().address();
422
-
423
421
  const pollShardRefScriptUtxo = matchSingle(
424
422
  await lucid.utxosByOutRef([
425
423
  fromSystemParamsScriptRef(
@@ -476,7 +474,9 @@ export async function vote(
476
474
  return lucid
477
475
  .newTx()
478
476
  .validFrom(validityFrom)
479
- .validTo(validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND)
477
+ .validTo(
478
+ validityFrom + Number(sysParams.pollManagerParams.pBiasTime) - ONE_SECOND,
479
+ )
480
480
  .readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo])
481
481
  .collectFrom([stakingPosUtxo], serialiseStakingRedeemer('Lock'))
482
482
  .collectFrom(
@@ -507,7 +507,7 @@ export async function vote(
507
507
  },
508
508
  stakingPosUtxo.assets,
509
509
  )
510
- .addSigner(ownAddr);
510
+ .addSignerKey(toHex(stakingPosDatum.owner));
511
511
  }
512
512
 
513
513
  export async function mergeShards(