@percolatorct/sdk 1.0.0-beta.31 → 1.0.0-beta.33

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  TypeScript SDK for building clients, bots, and UIs on top of the [Percolator](https://github.com/dcccrypto/percolator) perpetual futures protocol on Solana.
4
4
 
5
- > **EXPERIMENTAL — NOT AUDITED.** `1.0.0-beta.31`. 742 tests passing. Do NOT use with real funds.
5
+ > **EXPERIMENTAL — NOT AUDITED.** `1.0.0-beta.33`. 765 tests passing. Do NOT use with real funds.
6
6
 
7
7
  [![npm](https://img.shields.io/npm/v/@percolator/sdk?color=14F195)](https://www.npmjs.com/package/@percolator/sdk)
8
8
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
@@ -210,6 +210,9 @@ export declare const ACCOUNTS_CANCEL_QUEUED_WITHDRAWAL: readonly AccountSpec[];
210
210
  * pass additional oracle accounts at accounts[4..].
211
211
  */
212
212
  export declare const ACCOUNTS_EXECUTE_ADL: readonly AccountSpec[];
213
+ export declare const ACCOUNTS_RESOLVE_PERMISSIONLESS: readonly AccountSpec[];
214
+ export declare const ACCOUNTS_FORCE_CLOSE_RESOLVED: readonly AccountSpec[];
215
+ export declare const ACCOUNTS_ADMIN_FORCE_CLOSE: readonly AccountSpec[];
213
216
  /**
214
217
  * CloseStaleSlabs: 2 accounts (tag 51)
215
218
  * Admin closes a slab of an invalid/old layout and recovers rent SOL.
@@ -230,11 +233,25 @@ export declare const ACCOUNTS_AUDIT_CRANK: readonly AccountSpec[];
230
233
  * Permissionless — no signer required beyond fee payer.
231
234
  */
232
235
  export declare const ACCOUNTS_ADVANCE_ORACLE_PHASE: readonly AccountSpec[];
236
+ export declare const ACCOUNTS_UPDATE_HYPERP_MARK: readonly AccountSpec[];
237
+ export declare const ACCOUNTS_CREATE_LP_VAULT: readonly AccountSpec[];
238
+ export declare const ACCOUNTS_LP_VAULT_DEPOSIT: readonly AccountSpec[];
239
+ export declare const ACCOUNTS_LP_VAULT_CRANK_FEES: readonly AccountSpec[];
240
+ export declare const ACCOUNTS_CHALLENGE_SETTLEMENT: readonly AccountSpec[];
241
+ export declare const ACCOUNTS_RESOLVE_DISPUTE: readonly AccountSpec[];
242
+ export declare const ACCOUNTS_DEPOSIT_LP_COLLATERAL: readonly AccountSpec[];
243
+ export declare const ACCOUNTS_WITHDRAW_LP_COLLATERAL: readonly AccountSpec[];
244
+ export declare const ACCOUNTS_SET_OFFSET_PAIR: readonly AccountSpec[];
245
+ export declare const ACCOUNTS_ATTEST_CROSS_MARGIN: readonly AccountSpec[];
233
246
  /**
234
247
  * SetOiImbalanceHardBlock: 2 accounts
235
248
  * Sets the OI imbalance hard-block threshold (admin only)
236
249
  */
237
250
  export declare const ACCOUNTS_SET_OI_IMBALANCE_HARD_BLOCK: readonly AccountSpec[];
251
+ export declare const ACCOUNTS_SET_MAX_PNL_CAP: readonly AccountSpec[];
252
+ export declare const ACCOUNTS_SET_OI_CAP_MULTIPLIER: readonly AccountSpec[];
253
+ export declare const ACCOUNTS_SET_DISPUTE_PARAMS: readonly AccountSpec[];
254
+ export declare const ACCOUNTS_SET_LP_COLLATERAL_PARAMS: readonly AccountSpec[];
238
255
  /**
239
256
  * MintPositionNft: 10 accounts
240
257
  * Creates a Token-2022 position NFT for an open position.
@@ -262,11 +279,14 @@ export declare const ACCOUNTS_SET_PENDING_SETTLEMENT: readonly AccountSpec[];
262
279
  * Protected by admin allowlist (GH#1475).
263
280
  */
264
281
  export declare const ACCOUNTS_CLEAR_PENDING_SETTLEMENT: readonly AccountSpec[];
282
+ export declare const ACCOUNTS_TRANSFER_OWNERSHIP_CPI: readonly AccountSpec[];
265
283
  /**
266
284
  * SetWalletCap: 2 accounts
267
285
  * Sets the per-wallet position cap (admin only). capE6=0 disables.
268
286
  */
269
287
  export declare const ACCOUNTS_SET_WALLET_CAP: readonly AccountSpec[];
288
+ export declare const ACCOUNTS_RESCUE_ORPHAN_VAULT: readonly AccountSpec[];
289
+ export declare const ACCOUNTS_CLOSE_ORPHAN_SLAB: readonly AccountSpec[];
270
290
  /**
271
291
  * SetDexPool: 3 accounts
272
292
  * Admin pins the approved DEX pool address for a HYPERP market.
@@ -382,7 +382,7 @@ export interface TradeCpiV2Args {
382
382
  bump: number;
383
383
  }
384
384
  /** @deprecated Tag 35 removed in v12.17. Use encodeTradeCpi with limitPriceE6 instead. */
385
- export declare function encodeTradeCpiV2(args: TradeCpiV2Args): Uint8Array;
385
+ export declare function encodeTradeCpiV2(_args: TradeCpiV2Args): Uint8Array;
386
386
  /**
387
387
  * @deprecated Tag 36 removed in v12.17. Will fail on-chain with InvalidInstructionData.
388
388
  */
@@ -390,7 +390,7 @@ export interface UnresolveMarketArgs {
390
390
  confirmation: bigint | string;
391
391
  }
392
392
  /** @deprecated Tag 36 removed in v12.17. Will fail on-chain. */
393
- export declare function encodeUnresolveMarket(args: UnresolveMarketArgs): Uint8Array;
393
+ export declare function encodeUnresolveMarket(_args: UnresolveMarketArgs): Uint8Array;
394
394
  /**
395
395
  * @deprecated Tag 11 removed in v12.17. Insurance floor is now set at InitMarket.
396
396
  * Sending this instruction will fail with InvalidInstructionData.
@@ -399,7 +399,7 @@ export interface SetRiskThresholdArgs {
399
399
  newThreshold: bigint | string;
400
400
  }
401
401
  /** @deprecated Tag 11 removed in v12.17. Will fail on-chain. */
402
- export declare function encodeSetRiskThreshold(args: SetRiskThresholdArgs): Uint8Array;
402
+ export declare function encodeSetRiskThreshold(_args: SetRiskThresholdArgs): Uint8Array;
403
403
  /**
404
404
  * UpdateAdmin instruction data (33 bytes)
405
405
  */
@@ -433,7 +433,7 @@ export interface SetMaintenanceFeeArgs {
433
433
  newFee: bigint | string;
434
434
  }
435
435
  /** @deprecated Tag 15 removed in v12.17. Will fail on-chain. */
436
- export declare function encodeSetMaintenanceFee(args: SetMaintenanceFeeArgs): Uint8Array;
436
+ export declare function encodeSetMaintenanceFee(_args: SetMaintenanceFeeArgs): Uint8Array;
437
437
  /**
438
438
  * SetOraclePriceCap instruction data (9 bytes)
439
439
  * Set oracle price circuit breaker cap (admin only).
@@ -482,7 +482,7 @@ export interface UpdateRiskParamsArgs {
482
482
  tradingFeeBps?: bigint | string;
483
483
  }
484
484
  /** @deprecated Use encodeSetInsuranceWithdrawPolicy (tag 22). This sends wrong wire format. */
485
- export declare function encodeUpdateRiskParams(args: UpdateRiskParamsArgs): Uint8Array;
485
+ export declare function encodeUpdateRiskParams(_args: UpdateRiskParamsArgs): Uint8Array;
486
486
  /**
487
487
  * On-chain confirmation code for RenounceAdmin (must match program constant).
488
488
  * ASCII "RENOUNCE" as u64 LE = 0x52454E4F554E4345.
package/dist/abi/nft.d.ts CHANGED
@@ -109,7 +109,8 @@ export declare function deriveMintAuthority(programId?: PublicKey): [PublicKey,
109
109
  * [128..144] last_funding_index_e18 i128
110
110
  * [144..152] minted_at i64
111
111
  * [152..160] account_id u64
112
- * [160..208] _reserved
112
+ * [160..192] position_owner [u8; 32]
113
+ * [192..208] _reserved
113
114
  */
114
115
  export declare const POSITION_NFT_STATE_LEN = 208;
115
116
  export interface PositionNftState {
@@ -118,6 +119,7 @@ export interface PositionNftState {
118
119
  slab: PublicKey;
119
120
  userIdx: number;
120
121
  nftMint: PublicKey;
122
+ positionOwner: PublicKey;
121
123
  entryPriceE6: bigint;
122
124
  positionSize: bigint;
123
125
  isLong: boolean;