@percolatorct/sdk 1.0.0-beta.2 → 1.0.0-beta.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.
@@ -117,21 +117,6 @@ export declare const ACCOUNTS_UNPAUSE_MARKET: readonly AccountSpec[];
117
117
  * remember the positional order, and errors clearly on missing names.
118
118
  */
119
119
  export declare function buildAccountMetas(spec: readonly AccountSpec[], keys: PublicKey[] | Record<string, PublicKey>): AccountMeta[];
120
- /**
121
- * CreateInsuranceMint: 9 accounts
122
- * Creates SPL mint PDA for insurance LP tokens. Admin only, once per market.
123
- */
124
- export declare const ACCOUNTS_CREATE_INSURANCE_MINT: readonly AccountSpec[];
125
- /**
126
- * DepositInsuranceLP: 8 accounts
127
- * Deposit collateral into insurance fund, receive LP tokens.
128
- */
129
- export declare const ACCOUNTS_DEPOSIT_INSURANCE_LP: readonly AccountSpec[];
130
- /**
131
- * WithdrawInsuranceLP: 8 accounts
132
- * Burn LP tokens and withdraw proportional share of insurance fund.
133
- */
134
- export declare const ACCOUNTS_WITHDRAW_INSURANCE_LP: readonly AccountSpec[];
135
120
  /**
136
121
  * LpVaultWithdraw: 10 accounts (tag 39, PERC-627 / GH#1926 / PERC-8287)
137
122
  *
@@ -32,9 +32,6 @@ export declare const IX_TAG: {
32
32
  readonly AdminForceClose: 21;
33
33
  readonly UpdateRiskParams: 22;
34
34
  readonly RenounceAdmin: 23;
35
- readonly CreateInsuranceMint: 24;
36
- readonly DepositInsuranceLP: 25;
37
- readonly WithdrawInsuranceLP: 26;
38
35
  readonly PauseMarket: 27;
39
36
  readonly UnpauseMarket: 28;
40
37
  readonly AcceptAdmin: 29;
@@ -390,27 +387,6 @@ export declare const UNRESOLVE_CONFIRMATION = 16045690984503054900n;
390
387
  * to prevent accidental invocation.
391
388
  */
392
389
  export declare function encodeRenounceAdmin(): Uint8Array;
393
- /**
394
- * CreateInsuranceMint instruction data (1 byte)
395
- * Creates the SPL mint PDA for insurance LP tokens. Admin only, once per market.
396
- */
397
- export declare function encodeCreateInsuranceMint(): Uint8Array;
398
- /**
399
- * DepositInsuranceLP instruction data (9 bytes)
400
- * Deposit collateral into insurance fund, receive LP tokens proportional to share.
401
- */
402
- export interface DepositInsuranceLPArgs {
403
- amount: bigint | string;
404
- }
405
- export declare function encodeDepositInsuranceLP(args: DepositInsuranceLPArgs): Uint8Array;
406
- /**
407
- * WithdrawInsuranceLP instruction data (9 bytes)
408
- * Burn LP tokens and withdraw proportional share of insurance fund.
409
- */
410
- export interface WithdrawInsuranceLPArgs {
411
- lpAmount: bigint | string;
412
- }
413
- export declare function encodeWithdrawInsuranceLP(args: WithdrawInsuranceLPArgs): Uint8Array;
414
390
  /**
415
391
  * LpVaultWithdraw (Tag 39, PERC-627 / GH#1926 / PERC-8287) — burn LP vault tokens and
416
392
  * withdraw proportional collateral.
package/dist/index.js CHANGED
@@ -119,9 +119,8 @@ var IX_TAG = {
119
119
  AdminForceClose: 21,
120
120
  UpdateRiskParams: 22,
121
121
  RenounceAdmin: 23,
122
- CreateInsuranceMint: 24,
123
- DepositInsuranceLP: 25,
124
- WithdrawInsuranceLP: 26,
122
+ // Tags 24–26 (CreateInsuranceMint / DepositInsuranceLP / WithdrawInsuranceLP)
123
+ // were removed in SDK v1.0.0-beta.3. Replaced by percolator-stake.
125
124
  PauseMarket: 27,
126
125
  UnpauseMarket: 28,
127
126
  AcceptAdmin: 29,
@@ -428,15 +427,6 @@ function encodeRenounceAdmin() {
428
427
  encU64(RENOUNCE_ADMIN_CONFIRMATION)
429
428
  );
430
429
  }
431
- function encodeCreateInsuranceMint() {
432
- return encU8(IX_TAG.CreateInsuranceMint);
433
- }
434
- function encodeDepositInsuranceLP(args) {
435
- return concatBytes(encU8(IX_TAG.DepositInsuranceLP), encU64(args.amount));
436
- }
437
- function encodeWithdrawInsuranceLP(args) {
438
- return concatBytes(encU8(IX_TAG.WithdrawInsuranceLP), encU64(args.lpAmount));
439
- }
440
430
  function encodeLpVaultWithdraw(args) {
441
431
  return concatBytes(encU8(IX_TAG.LpVaultWithdraw), encU64(args.lpAmount));
442
432
  }
@@ -826,37 +816,6 @@ function buildAccountMetas(spec, keys) {
826
816
  isWritable: s.writable
827
817
  }));
828
818
  }
829
- var ACCOUNTS_CREATE_INSURANCE_MINT = [
830
- { name: "admin", signer: true, writable: false },
831
- { name: "slab", signer: false, writable: false },
832
- { name: "insLpMint", signer: false, writable: true },
833
- { name: "vaultAuthority", signer: false, writable: false },
834
- { name: "collateralMint", signer: false, writable: false },
835
- { name: "systemProgram", signer: false, writable: false },
836
- { name: "tokenProgram", signer: false, writable: false },
837
- { name: "rent", signer: false, writable: false },
838
- { name: "payer", signer: true, writable: true }
839
- ];
840
- var ACCOUNTS_DEPOSIT_INSURANCE_LP = [
841
- { name: "depositor", signer: true, writable: false },
842
- { name: "slab", signer: false, writable: true },
843
- { name: "depositorAta", signer: false, writable: true },
844
- { name: "vault", signer: false, writable: true },
845
- { name: "tokenProgram", signer: false, writable: false },
846
- { name: "insLpMint", signer: false, writable: true },
847
- { name: "depositorLpAta", signer: false, writable: true },
848
- { name: "vaultAuthority", signer: false, writable: false }
849
- ];
850
- var ACCOUNTS_WITHDRAW_INSURANCE_LP = [
851
- { name: "withdrawer", signer: true, writable: false },
852
- { name: "slab", signer: false, writable: true },
853
- { name: "withdrawerAta", signer: false, writable: true },
854
- { name: "vault", signer: false, writable: true },
855
- { name: "tokenProgram", signer: false, writable: false },
856
- { name: "insLpMint", signer: false, writable: true },
857
- { name: "withdrawerLpAta", signer: false, writable: true },
858
- { name: "vaultAuthority", signer: false, writable: false }
859
- ];
860
819
  var ACCOUNTS_LP_VAULT_WITHDRAW = [
861
820
  { name: "withdrawer", signer: true, writable: false },
862
821
  { name: "slab", signer: false, writable: true },
@@ -2716,12 +2675,6 @@ function deriveVaultAuthority(programId, slab) {
2716
2675
  programId
2717
2676
  );
2718
2677
  }
2719
- function deriveInsuranceLpMint(programId, slab) {
2720
- return PublicKey4.findProgramAddressSync(
2721
- [textEncoder.encode("ins_lp"), slab.toBytes()],
2722
- programId
2723
- );
2724
- }
2725
2678
  var LP_INDEX_U16_MAX = 65535;
2726
2679
  function deriveLpPda(programId, slab, lpIdx) {
2727
2680
  if (typeof lpIdx !== "number" || !Number.isInteger(lpIdx) || lpIdx < 0 || lpIdx > LP_INDEX_U16_MAX) {
@@ -5622,9 +5575,7 @@ export {
5622
5575
  ACCOUNTS_CLOSE_ACCOUNT,
5623
5576
  ACCOUNTS_CLOSE_SLAB,
5624
5577
  ACCOUNTS_CLOSE_STALE_SLABS,
5625
- ACCOUNTS_CREATE_INSURANCE_MINT,
5626
5578
  ACCOUNTS_DEPOSIT_COLLATERAL,
5627
- ACCOUNTS_DEPOSIT_INSURANCE_LP,
5628
5579
  ACCOUNTS_EXECUTE_ADL,
5629
5580
  ACCOUNTS_FUND_MARKET_INSURANCE,
5630
5581
  ACCOUNTS_INIT_LP,
@@ -5658,7 +5609,6 @@ export {
5658
5609
  ACCOUNTS_UPDATE_CONFIG,
5659
5610
  ACCOUNTS_WITHDRAW_COLLATERAL,
5660
5611
  ACCOUNTS_WITHDRAW_INSURANCE,
5661
- ACCOUNTS_WITHDRAW_INSURANCE_LP,
5662
5612
  AccountKind,
5663
5613
  CHAINLINK_ANSWER_OFFSET,
5664
5614
  CHAINLINK_DECIMALS_OFFSET,
@@ -5755,7 +5705,6 @@ export {
5755
5705
  depositAccounts,
5756
5706
  deriveCreatorLockPda,
5757
5707
  deriveDepositPda,
5758
- deriveInsuranceLpMint,
5759
5708
  deriveKeeperFund,
5760
5709
  deriveLpPda,
5761
5710
  derivePythPriceUpdateAccount,
@@ -5792,9 +5741,7 @@ export {
5792
5741
  encodeCloseAccount,
5793
5742
  encodeCloseSlab,
5794
5743
  encodeCloseStaleSlabs,
5795
- encodeCreateInsuranceMint,
5796
5744
  encodeDepositCollateral,
5797
- encodeDepositInsuranceLP,
5798
5745
  encodeExecuteAdl,
5799
5746
  encodeFundMarketInsurance,
5800
5747
  encodeInitLP,
@@ -5855,7 +5802,6 @@ export {
5855
5802
  encodeUpdateRiskParams,
5856
5803
  encodeWithdrawCollateral,
5857
5804
  encodeWithdrawInsurance,
5858
- encodeWithdrawInsuranceLP,
5859
5805
  fetchAdlRankedPositions,
5860
5806
  fetchAdlRankings,
5861
5807
  fetchSlab,