@indigo-labs/indigo-sdk 0.2.9 → 0.2.10

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 CHANGED
@@ -1565,8 +1565,8 @@ declare function distributeReward(snapshotAda: bigint, adaReward: bigint, totalS
1565
1565
  declare function calculateAdaReward(currentSnapshotAda: bigint, oldSnapshotAda: bigint, existingIndyAmount: bigint): bigint;
1566
1566
 
1567
1567
  declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1568
- declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1569
- declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1568
+ declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1569
+ declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1570
1570
  declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1571
1571
 
1572
1572
  declare const StakingParamsSchema: _lucid_evolution_lucid.TObject<{
package/dist/index.d.ts CHANGED
@@ -1565,8 +1565,8 @@ declare function distributeReward(snapshotAda: bigint, adaReward: bigint, totalS
1565
1565
  declare function calculateAdaReward(currentSnapshotAda: bigint, oldSnapshotAda: bigint, existingIndyAmount: bigint): bigint;
1566
1566
 
1567
1567
  declare function openStakingPosition(amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1568
- declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1569
- declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1568
+ declare function adjustStakingPosition(stakingPositionRef: OutRef, amount: bigint, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1569
+ declare function closeStakingPosition(stakingPositionRef: OutRef, params: SystemParams, lucid: LucidEvolution, currentSlot: number, stakingManagerRef?: OutRef): Promise<TxBuilder>;
1570
1570
  declare function distributeAda(stakingManagerRef: OutRef, collectorRefs: OutRef[], params: SystemParams, lucid: LucidEvolution): Promise<TxBuilder>;
1571
1571
 
1572
1572
  declare const StakingParamsSchema: _lucid_evolution_lucid.TObject<{
package/dist/index.js CHANGED
@@ -4785,9 +4785,8 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
4785
4785
  }
4786
4786
  ).addSignerKey(pkh.hash);
4787
4787
  }
4788
- async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, stakingManagerRef) {
4788
+ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, currentSlot, stakingManagerRef) {
4789
4789
  const network = lucid.config().network;
4790
- const currentSlot = lucid.currentSlot();
4791
4790
  const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot) - ONE_SECOND;
4792
4791
  const stakingPositionOut = await findStakingPositionByOutRef(
4793
4792
  stakingPositionRef,
@@ -4847,9 +4846,8 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
4847
4846
  }
4848
4847
  ).addSignerKey((0, import_lucid35.toHex)(stakingPositionOut.datum.owner));
4849
4848
  }
4850
- async function closeStakingPosition(stakingPositionRef, params, lucid, stakingManagerRef) {
4849
+ async function closeStakingPosition(stakingPositionRef, params, lucid, currentSlot, stakingManagerRef) {
4851
4850
  const network = lucid.config().network;
4852
- const currentSlot = lucid.currentSlot();
4853
4851
  const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot) - ONE_SECOND;
4854
4852
  const stakingPositionOut = await findStakingPositionByOutRef(
4855
4853
  stakingPositionRef,
package/dist/index.mjs CHANGED
@@ -4603,9 +4603,8 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
4603
4603
  }
4604
4604
  ).addSignerKey(pkh.hash);
4605
4605
  }
4606
- async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, stakingManagerRef) {
4606
+ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, currentSlot, stakingManagerRef) {
4607
4607
  const network = lucid.config().network;
4608
- const currentSlot = lucid.currentSlot();
4609
4608
  const currentTime = slotToUnixTime5(network, currentSlot) - ONE_SECOND;
4610
4609
  const stakingPositionOut = await findStakingPositionByOutRef(
4611
4610
  stakingPositionRef,
@@ -4665,9 +4664,8 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
4665
4664
  }
4666
4665
  ).addSignerKey(toHex2(stakingPositionOut.datum.owner));
4667
4666
  }
4668
- async function closeStakingPosition(stakingPositionRef, params, lucid, stakingManagerRef) {
4667
+ async function closeStakingPosition(stakingPositionRef, params, lucid, currentSlot, stakingManagerRef) {
4669
4668
  const network = lucid.config().network;
4670
- const currentSlot = lucid.currentSlot();
4671
4669
  const currentTime = slotToUnixTime5(network, currentSlot) - ONE_SECOND;
4672
4670
  const stakingPositionOut = await findStakingPositionByOutRef(
4673
4671
  stakingPositionRef,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indigo-labs/indigo-sdk",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
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",
@@ -121,11 +121,10 @@ export async function adjustStakingPosition(
121
121
  amount: bigint,
122
122
  params: SystemParams,
123
123
  lucid: LucidEvolution,
124
+ currentSlot: number,
124
125
  stakingManagerRef?: OutRef,
125
126
  ): Promise<TxBuilder> {
126
-
127
127
  const network = lucid.config().network!;
128
- const currentSlot = lucid.currentSlot();
129
128
  const currentTime = slotToUnixTime(network, currentSlot) - ONE_SECOND;
130
129
 
131
130
  const stakingPositionOut = await findStakingPositionByOutRef(
@@ -215,10 +214,10 @@ export async function closeStakingPosition(
215
214
  stakingPositionRef: OutRef,
216
215
  params: SystemParams,
217
216
  lucid: LucidEvolution,
217
+ currentSlot: number,
218
218
  stakingManagerRef?: OutRef,
219
219
  ): Promise<TxBuilder> {
220
220
  const network = lucid.config().network!;
221
- const currentSlot = lucid.currentSlot();
222
221
  const currentTime = slotToUnixTime(network, currentSlot) - ONE_SECOND;
223
222
 
224
223
  const stakingPositionOut = await findStakingPositionByOutRef(