@neutral-trade/sdk 0.2.6 → 0.2.8

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
@@ -3012,10 +3012,21 @@ interface Ntbundle {
3012
3012
  }
3013
3013
  //#endregion
3014
3014
  //#region src/constants/programs.d.ts
3015
+ type BundleProgram = Program<Ntbundle>;
3016
+ type BundleProvider = AnchorProvider;
3015
3017
  type BundleCluster = 'mainnet' | 'devnet';
3016
3018
  declare const DEFAULT_BUNDLE_PROGRAM_ID_MAINNET = "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
3019
+ /**
3020
+ * Secondary mainnet ntbundle program id (used when a vault sets `bundleProgramId` to this value).
3021
+ * Kept in sync with `sdk/src/registry/vaults.json` (e.g. vaultId 69 JLP Delta Neutral).
3022
+ */
3023
+ declare const BUNDLE_PROGRAM_ID_V2_MAINNET = "BUNDeH5A4c47bcEoAjBhN3sCjLgYnRsmt9ibMztqVkC9";
3017
3024
  declare const DEFAULT_BUNDLE_PROGRAM_ID_DEVNET = "7trSyt7d1ZRnvfGh9JaQZwZMWtfAXMvMwN3UxgMzVFbv";
3018
3025
  declare function getDefaultBundleProgramIdByCluster(cluster?: BundleCluster): string;
3026
+ /**
3027
+ * Create Bundle Program client for a specific program id.
3028
+ */
3029
+ declare function createBundleProgramById(provider: AnchorProvider, programId: string): Program<Ntbundle>;
3019
3030
  //#endregion
3020
3031
  //#region src/constants/vault-ids.d.ts
3021
3032
  /**
@@ -3410,6 +3421,10 @@ declare function buildBundleRequestWithdrawInstruction({
3410
3421
  }: BuildBundleRequestWithdrawInstructionParams): Promise<TransactionInstruction>;
3411
3422
  //#endregion
3412
3423
  //#region src/utils/pda.d.ts
3424
+ declare const SEED_ORACLE: NodeJS.NonSharedUint8Array;
3425
+ declare const SEED_USER: NodeJS.NonSharedUint8Array;
3426
+ declare const SEED_TEMP: NodeJS.NonSharedUint8Array;
3427
+ declare const SEED_PENDING_AUTH: NodeJS.NonSharedUint8Array;
3413
3428
  /**
3414
3429
  * Derive Oracle PDA for Bundle vault
3415
3430
  */
@@ -3418,10 +3433,18 @@ declare function deriveOraclePDA(bundlePDA: PublicKey, programId: PublicKey): Pu
3418
3433
  * Derive User PDA for Bundle vault
3419
3434
  */
3420
3435
  declare function deriveUserPDA(userKey: PublicKey, bundlePDA: PublicKey, programId: PublicKey): PublicKey;
3436
+ /**
3437
+ * Derive Temp Data PDA for Bundle vault
3438
+ */
3439
+ declare function deriveTempDataPDA(bundlePDA: PublicKey, programId: PublicKey): PublicKey;
3440
+ /**
3441
+ * Derive pending bundle asset authority PDA (pending deposit token ATA owner)
3442
+ */
3443
+ declare function derivePendingAuthPDA(bundlePDA: PublicKey, programId: PublicKey): PublicKey;
3421
3444
  /**
3422
3445
  * Get Vault Depositor PDA for Drift vault
3423
3446
  * Custom code to handle jlpdnv1 special case
3424
3447
  */
3425
3448
  declare function getVaultDepositorAddressSync(programId: PublicKey, vault: PublicKey, authority: PublicKey): PublicKey;
3426
3449
  //#endregion
3427
- export { type BundleAccount, type BundleCluster, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, NeutralTrade, type NeutralTradeConfig, type NeutralTradeCoreContext, type OracleData, SupportedChain, SupportedToken, type Token, type UserBalanceResult, type UserBundleAccount, type UserBundleTempData, type VaultBalanceData, VaultCategory, type VaultRegistryEntry as VaultConfig, type VaultRegistry as VaultConfigRecord, VaultId, VaultType, buildBundleDepositInstructions, buildBundleRequestWithdrawInstruction, createDummyWallet, deriveOraclePDA, deriveUserPDA, getBundleProgramId, getDefaultBundleProgramIdByCluster, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, isValidVaultAddress, tokens, vaults };
3450
+ export { BUNDLE_PROGRAM_ID_V2_MAINNET, type BundleAccount, type BundleCluster, type BundleProgram, type BundleProvider, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, NeutralTrade, type NeutralTradeConfig, type NeutralTradeCoreContext, type OracleData, SEED_ORACLE, SEED_PENDING_AUTH, SEED_TEMP, SEED_USER, SupportedChain, SupportedToken, type Token, type UserBalanceResult, type UserBundleAccount, type UserBundleTempData, type VaultBalanceData, VaultCategory, type VaultRegistryEntry as VaultConfig, type VaultRegistry as VaultConfigRecord, VaultId, VaultType, buildBundleDepositInstructions, buildBundleRequestWithdrawInstruction, createBundleProgramById, createDummyWallet, deriveOraclePDA, derivePendingAuthPDA, deriveTempDataPDA, deriveUserPDA, getBundleProgramId, getDefaultBundleProgramIdByCluster, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, isValidVaultAddress, tokens, vaults };