@percolatorct/sdk 1.0.0-beta.26 → 1.0.0-beta.28

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.
@@ -40,7 +40,6 @@ export declare const IX_TAG: {
40
40
  readonly DepositFeeCredits: 27;
41
41
  readonly ConvertReleasedPnl: 28;
42
42
  readonly ResolvePermissionless: 29;
43
- /** @deprecated Use ResolvePermissionless */ readonly AcceptAdmin: 29;
44
43
  readonly ForceCloseResolved: 30;
45
44
  readonly SetPythOracle: 32;
46
45
  readonly UpdateMarkPrice: 33;
@@ -131,6 +130,8 @@ export declare const IX_TAG: {
131
130
  readonly SetDisputeParams: 80;
132
131
  /** PERC-315: Set LP collateral params (enabled + ltv_bps, admin only). */
133
132
  readonly SetLpCollateralParams: 81;
133
+ /** Phase E (2026-04-17): Accept a pending admin transfer. Signer must match pending_admin. */
134
+ readonly AcceptAdmin: 82;
134
135
  };
135
136
  /**
136
137
  * InitMarket instruction data (256 bytes total)
@@ -1194,3 +1195,22 @@ export interface SetLpCollateralParamsArgs {
1194
1195
  ltvBps: number;
1195
1196
  }
1196
1197
  export declare function encodeSetLpCollateralParams(args: SetLpCollateralParamsArgs): Uint8Array;
1198
+ /**
1199
+ * AcceptAdmin (Tag 82, Phase E 2026-04-17) — complete a two-step admin transfer.
1200
+ *
1201
+ * Called by the PROPOSED new admin (the pubkey passed to UpdateAdmin with
1202
+ * `new_admin != default()`). The signer must match config.pending_admin
1203
+ * exactly. On success, header.admin is swapped to pending_admin and
1204
+ * pending_admin is cleared.
1205
+ *
1206
+ * Use `try_update_admin` then `try_accept_admin` for a full rotation, or
1207
+ * skip AcceptAdmin entirely to leave a pending transfer that the old
1208
+ * admin can overwrite (propose-again) or the new admin can never accept.
1209
+ *
1210
+ * Accounts:
1211
+ * [0] new admin (signer, must match pending_admin)
1212
+ * [1] slab (writable)
1213
+ *
1214
+ * Instruction data: tag(1) = 1 byte. No payload.
1215
+ */
1216
+ export declare function encodeAcceptAdmin(): Uint8Array;
package/dist/index.js CHANGED
@@ -138,8 +138,8 @@ var IX_TAG = {
138
138
  ConvertReleasedPnl: 28,
139
139
  // Tags 29-30: on-chain = ResolvePermissionless/ForceCloseResolved.
140
140
  ResolvePermissionless: 29,
141
- /** @deprecated Use ResolvePermissionless */
142
- AcceptAdmin: 29,
141
+ // Note: `AcceptAdmin` used to be a @deprecated alias for tag 29; removed in
142
+ // beta.27 because AcceptAdmin is now a real instruction at tag 82 (Phase E).
143
143
  ForceCloseResolved: 30,
144
144
  // Tag 31: gap (no decode arm on-chain)
145
145
  SetPythOracle: 32,
@@ -234,7 +234,9 @@ var IX_TAG = {
234
234
  /** PERC-314: Set dispute params (window_slots + bond_amount, admin only). */
235
235
  SetDisputeParams: 80,
236
236
  /** PERC-315: Set LP collateral params (enabled + ltv_bps, admin only). */
237
- SetLpCollateralParams: 81
237
+ SetLpCollateralParams: 81,
238
+ /** Phase E (2026-04-17): Accept a pending admin transfer. Signer must match pending_admin. */
239
+ AcceptAdmin: 82
238
240
  // 78: removed (keeper fund)
239
241
  };
240
242
  Object.freeze(IX_TAG);
@@ -785,6 +787,9 @@ function encodeSetLpCollateralParams(args) {
785
787
  encU16(args.ltvBps)
786
788
  );
787
789
  }
790
+ function encodeAcceptAdmin() {
791
+ return encU8(IX_TAG.AcceptAdmin);
792
+ }
788
793
 
789
794
  // src/abi/accounts.ts
790
795
  import {
@@ -6589,6 +6594,7 @@ export {
6589
6594
  encU32,
6590
6595
  encU64,
6591
6596
  encU8,
6597
+ encodeAcceptAdmin,
6592
6598
  encodeAdminForceClose,
6593
6599
  encodeAdvanceEpoch,
6594
6600
  encodeAdvanceOraclePhase,