@whetstone-research/doppler-sdk 1.0.14 → 1.0.15
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/solana/index.cjs +39 -7
- package/dist/solana/index.cjs.map +1 -1
- package/dist/solana/index.d.cts +16 -2
- package/dist/solana/index.d.ts +16 -2
- package/dist/solana/index.js +38 -8
- package/dist/solana/index.js.map +1 -1
- package/package.json +1 -1
package/dist/solana/index.d.cts
CHANGED
|
@@ -3666,6 +3666,7 @@ interface CpmmMigrationRemainingAccountsInput {
|
|
|
3666
3666
|
adminQuoteAta: Address;
|
|
3667
3667
|
recipientAtas: Address[];
|
|
3668
3668
|
cpmmProgram?: Address;
|
|
3669
|
+
cpmmMigratorProgram?: Address;
|
|
3669
3670
|
}
|
|
3670
3671
|
interface CpmmMigrationRemainingAccounts {
|
|
3671
3672
|
addresses: Address[];
|
|
@@ -3681,7 +3682,7 @@ interface CpmmMigrationRemainingAccounts {
|
|
|
3681
3682
|
launchLpPosition: Address;
|
|
3682
3683
|
migrationAuthority: Address;
|
|
3683
3684
|
}
|
|
3684
|
-
declare function buildCpmmMigrationRemainingAccounts({ launch, baseMint, quoteMint, launchAuthority, adminBaseAta, adminQuoteAta, recipientAtas, cpmmProgram, }: CpmmMigrationRemainingAccountsInput): Promise<CpmmMigrationRemainingAccounts>;
|
|
3685
|
+
declare function buildCpmmMigrationRemainingAccounts({ launch, baseMint, quoteMint, launchAuthority, adminBaseAta, adminQuoteAta, recipientAtas, cpmmProgram, cpmmMigratorProgram, }: CpmmMigrationRemainingAccountsInput): Promise<CpmmMigrationRemainingAccounts>;
|
|
3685
3686
|
declare function buildCpmmMigrationRemainingAccountsHash(input: CpmmMigrationRemainingAccountsInput): Promise<Uint8Array>;
|
|
3686
3687
|
|
|
3687
3688
|
declare function encodeRegisterLaunchPayload(args: RegisterLaunchArgsArgs): Uint8Array;
|
|
@@ -5490,4 +5491,17 @@ declare namespace index {
|
|
|
5490
5491
|
export { index_FINALIZE_DISCRIMINATOR as FINALIZE_DISCRIMINATOR, type index_FinalizeInput as FinalizeInput, type index_FinalizeInstruction as FinalizeInstruction, type index_FinalizeInstructionData as FinalizeInstructionData, type index_FinalizeInstructionDataArgs as FinalizeInstructionDataArgs, index_INITIALIZE_ORACLE_DISCRIMINATOR as INITIALIZE_ORACLE_DISCRIMINATOR, type index_InitializeOracleArgs as InitializeOracleArgs, type index_InitializeOracleArgsArgs as InitializeOracleArgsArgs, type index_InitializeOracleInput as InitializeOracleInput, type index_InitializeOracleInstruction as InitializeOracleInstruction, type index_InitializeOracleInstructionData as InitializeOracleInstructionData, type index_InitializeOracleInstructionDataArgs as InitializeOracleInstructionDataArgs, index_ORACLE_STATE_DISCRIMINATOR as ORACLE_STATE_DISCRIMINATOR, type index_OracleState as OracleState, type index_OracleStateArgs as OracleStateArgs, type index_ParsedFinalizeInstruction as ParsedFinalizeInstruction, type index_ParsedInitializeOracleInstruction as ParsedInitializeOracleInstruction, type index_ParsedTrustedOracleInstruction as ParsedTrustedOracleInstruction, index_TRUSTED_ORACLE_ERROR__ALREADY_FINALIZED as TRUSTED_ORACLE_ERROR__ALREADY_FINALIZED, index_TRUSTED_ORACLE_ERROR__INVALID_WINNING_MINT as TRUSTED_ORACLE_ERROR__INVALID_WINNING_MINT, index_TRUSTED_ORACLE_ERROR__NOT_FINALIZED as TRUSTED_ORACLE_ERROR__NOT_FINALIZED, index_TRUSTED_ORACLE_ERROR__UNAUTHORIZED as TRUSTED_ORACLE_ERROR__UNAUTHORIZED, index_TRUSTED_ORACLE_PROGRAM_ADDRESS as TRUSTED_ORACLE_PROGRAM_ADDRESS, index_TrustedOracleAccount as TrustedOracleAccount, type index_TrustedOracleError as TrustedOracleError, index_TrustedOracleInstruction as TrustedOracleInstruction, type index_TrustedOraclePlugin as TrustedOraclePlugin, type index_TrustedOraclePluginAccounts as TrustedOraclePluginAccounts, type index_TrustedOraclePluginInstructions as TrustedOraclePluginInstructions, type index_TrustedOraclePluginRequirements as TrustedOraclePluginRequirements, index_decodeOracleState as decodeOracleState, index_fetchAllMaybeOracleState as fetchAllMaybeOracleState, index_fetchAllOracleState as fetchAllOracleState, index_fetchMaybeOracleState as fetchMaybeOracleState, index_fetchOracleState as fetchOracleState, index_getFinalizeDiscriminatorBytes as getFinalizeDiscriminatorBytes, index_getFinalizeInstruction as getFinalizeInstruction, index_getFinalizeInstructionDataCodec as getFinalizeInstructionDataCodec, index_getFinalizeInstructionDataDecoder as getFinalizeInstructionDataDecoder, index_getFinalizeInstructionDataEncoder as getFinalizeInstructionDataEncoder, index_getInitializeOracleArgsCodec as getInitializeOracleArgsCodec, index_getInitializeOracleArgsDecoder as getInitializeOracleArgsDecoder, index_getInitializeOracleArgsEncoder as getInitializeOracleArgsEncoder, index_getInitializeOracleDiscriminatorBytes as getInitializeOracleDiscriminatorBytes, index_getInitializeOracleInstruction as getInitializeOracleInstruction, index_getInitializeOracleInstructionDataCodec as getInitializeOracleInstructionDataCodec, index_getInitializeOracleInstructionDataDecoder as getInitializeOracleInstructionDataDecoder, index_getInitializeOracleInstructionDataEncoder as getInitializeOracleInstructionDataEncoder, index_getOracleStateAddress as getOracleStateAddress, index_getOracleStateCodec as getOracleStateCodec, index_getOracleStateDecoder as getOracleStateDecoder, index_getOracleStateDiscriminatorBytes as getOracleStateDiscriminatorBytes, index_getOracleStateEncoder as getOracleStateEncoder, index_getOracleStateSize as getOracleStateSize, index_getTrustedOracleErrorMessage as getTrustedOracleErrorMessage, index_identifyTrustedOracleAccount as identifyTrustedOracleAccount, index_identifyTrustedOracleInstruction as identifyTrustedOracleInstruction, index_isTrustedOracleError as isTrustedOracleError, index_parseFinalizeInstruction as parseFinalizeInstruction, index_parseInitializeOracleInstruction as parseInitializeOracleInstruction, index_parseTrustedOracleInstruction as parseTrustedOracleInstruction, index_trustedOracleProgram as trustedOracleProgram };
|
|
5491
5492
|
}
|
|
5492
5493
|
|
|
5493
|
-
|
|
5494
|
+
interface SolanaCpmmProgramAddresses {
|
|
5495
|
+
cpmmProgram: Address;
|
|
5496
|
+
initializerProgram: Address;
|
|
5497
|
+
cpmmMigratorProgram: Address;
|
|
5498
|
+
cpmmHookProgram: Address;
|
|
5499
|
+
}
|
|
5500
|
+
interface SolanaCpmmDeployment extends SolanaCpmmProgramAddresses {
|
|
5501
|
+
cpmmConfig: Address;
|
|
5502
|
+
initializerConfig: Address;
|
|
5503
|
+
}
|
|
5504
|
+
declare const DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES: SolanaCpmmProgramAddresses;
|
|
5505
|
+
declare function deriveSolanaCpmmDeployment(programs?: SolanaCpmmProgramAddresses): Promise<SolanaCpmmDeployment>;
|
|
5506
|
+
|
|
5507
|
+
export { DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES, type SolanaCpmmDeployment, type SolanaCpmmProgramAddresses, index$4 as cpmm, index$2 as cpmmMigrator, deriveSolanaCpmmDeployment, index$3 as initializer, index$1 as predictionMigrator, index as trustedOracle };
|
package/dist/solana/index.d.ts
CHANGED
|
@@ -3666,6 +3666,7 @@ interface CpmmMigrationRemainingAccountsInput {
|
|
|
3666
3666
|
adminQuoteAta: Address;
|
|
3667
3667
|
recipientAtas: Address[];
|
|
3668
3668
|
cpmmProgram?: Address;
|
|
3669
|
+
cpmmMigratorProgram?: Address;
|
|
3669
3670
|
}
|
|
3670
3671
|
interface CpmmMigrationRemainingAccounts {
|
|
3671
3672
|
addresses: Address[];
|
|
@@ -3681,7 +3682,7 @@ interface CpmmMigrationRemainingAccounts {
|
|
|
3681
3682
|
launchLpPosition: Address;
|
|
3682
3683
|
migrationAuthority: Address;
|
|
3683
3684
|
}
|
|
3684
|
-
declare function buildCpmmMigrationRemainingAccounts({ launch, baseMint, quoteMint, launchAuthority, adminBaseAta, adminQuoteAta, recipientAtas, cpmmProgram, }: CpmmMigrationRemainingAccountsInput): Promise<CpmmMigrationRemainingAccounts>;
|
|
3685
|
+
declare function buildCpmmMigrationRemainingAccounts({ launch, baseMint, quoteMint, launchAuthority, adminBaseAta, adminQuoteAta, recipientAtas, cpmmProgram, cpmmMigratorProgram, }: CpmmMigrationRemainingAccountsInput): Promise<CpmmMigrationRemainingAccounts>;
|
|
3685
3686
|
declare function buildCpmmMigrationRemainingAccountsHash(input: CpmmMigrationRemainingAccountsInput): Promise<Uint8Array>;
|
|
3686
3687
|
|
|
3687
3688
|
declare function encodeRegisterLaunchPayload(args: RegisterLaunchArgsArgs): Uint8Array;
|
|
@@ -5490,4 +5491,17 @@ declare namespace index {
|
|
|
5490
5491
|
export { index_FINALIZE_DISCRIMINATOR as FINALIZE_DISCRIMINATOR, type index_FinalizeInput as FinalizeInput, type index_FinalizeInstruction as FinalizeInstruction, type index_FinalizeInstructionData as FinalizeInstructionData, type index_FinalizeInstructionDataArgs as FinalizeInstructionDataArgs, index_INITIALIZE_ORACLE_DISCRIMINATOR as INITIALIZE_ORACLE_DISCRIMINATOR, type index_InitializeOracleArgs as InitializeOracleArgs, type index_InitializeOracleArgsArgs as InitializeOracleArgsArgs, type index_InitializeOracleInput as InitializeOracleInput, type index_InitializeOracleInstruction as InitializeOracleInstruction, type index_InitializeOracleInstructionData as InitializeOracleInstructionData, type index_InitializeOracleInstructionDataArgs as InitializeOracleInstructionDataArgs, index_ORACLE_STATE_DISCRIMINATOR as ORACLE_STATE_DISCRIMINATOR, type index_OracleState as OracleState, type index_OracleStateArgs as OracleStateArgs, type index_ParsedFinalizeInstruction as ParsedFinalizeInstruction, type index_ParsedInitializeOracleInstruction as ParsedInitializeOracleInstruction, type index_ParsedTrustedOracleInstruction as ParsedTrustedOracleInstruction, index_TRUSTED_ORACLE_ERROR__ALREADY_FINALIZED as TRUSTED_ORACLE_ERROR__ALREADY_FINALIZED, index_TRUSTED_ORACLE_ERROR__INVALID_WINNING_MINT as TRUSTED_ORACLE_ERROR__INVALID_WINNING_MINT, index_TRUSTED_ORACLE_ERROR__NOT_FINALIZED as TRUSTED_ORACLE_ERROR__NOT_FINALIZED, index_TRUSTED_ORACLE_ERROR__UNAUTHORIZED as TRUSTED_ORACLE_ERROR__UNAUTHORIZED, index_TRUSTED_ORACLE_PROGRAM_ADDRESS as TRUSTED_ORACLE_PROGRAM_ADDRESS, index_TrustedOracleAccount as TrustedOracleAccount, type index_TrustedOracleError as TrustedOracleError, index_TrustedOracleInstruction as TrustedOracleInstruction, type index_TrustedOraclePlugin as TrustedOraclePlugin, type index_TrustedOraclePluginAccounts as TrustedOraclePluginAccounts, type index_TrustedOraclePluginInstructions as TrustedOraclePluginInstructions, type index_TrustedOraclePluginRequirements as TrustedOraclePluginRequirements, index_decodeOracleState as decodeOracleState, index_fetchAllMaybeOracleState as fetchAllMaybeOracleState, index_fetchAllOracleState as fetchAllOracleState, index_fetchMaybeOracleState as fetchMaybeOracleState, index_fetchOracleState as fetchOracleState, index_getFinalizeDiscriminatorBytes as getFinalizeDiscriminatorBytes, index_getFinalizeInstruction as getFinalizeInstruction, index_getFinalizeInstructionDataCodec as getFinalizeInstructionDataCodec, index_getFinalizeInstructionDataDecoder as getFinalizeInstructionDataDecoder, index_getFinalizeInstructionDataEncoder as getFinalizeInstructionDataEncoder, index_getInitializeOracleArgsCodec as getInitializeOracleArgsCodec, index_getInitializeOracleArgsDecoder as getInitializeOracleArgsDecoder, index_getInitializeOracleArgsEncoder as getInitializeOracleArgsEncoder, index_getInitializeOracleDiscriminatorBytes as getInitializeOracleDiscriminatorBytes, index_getInitializeOracleInstruction as getInitializeOracleInstruction, index_getInitializeOracleInstructionDataCodec as getInitializeOracleInstructionDataCodec, index_getInitializeOracleInstructionDataDecoder as getInitializeOracleInstructionDataDecoder, index_getInitializeOracleInstructionDataEncoder as getInitializeOracleInstructionDataEncoder, index_getOracleStateAddress as getOracleStateAddress, index_getOracleStateCodec as getOracleStateCodec, index_getOracleStateDecoder as getOracleStateDecoder, index_getOracleStateDiscriminatorBytes as getOracleStateDiscriminatorBytes, index_getOracleStateEncoder as getOracleStateEncoder, index_getOracleStateSize as getOracleStateSize, index_getTrustedOracleErrorMessage as getTrustedOracleErrorMessage, index_identifyTrustedOracleAccount as identifyTrustedOracleAccount, index_identifyTrustedOracleInstruction as identifyTrustedOracleInstruction, index_isTrustedOracleError as isTrustedOracleError, index_parseFinalizeInstruction as parseFinalizeInstruction, index_parseInitializeOracleInstruction as parseInitializeOracleInstruction, index_parseTrustedOracleInstruction as parseTrustedOracleInstruction, index_trustedOracleProgram as trustedOracleProgram };
|
|
5491
5492
|
}
|
|
5492
5493
|
|
|
5493
|
-
|
|
5494
|
+
interface SolanaCpmmProgramAddresses {
|
|
5495
|
+
cpmmProgram: Address;
|
|
5496
|
+
initializerProgram: Address;
|
|
5497
|
+
cpmmMigratorProgram: Address;
|
|
5498
|
+
cpmmHookProgram: Address;
|
|
5499
|
+
}
|
|
5500
|
+
interface SolanaCpmmDeployment extends SolanaCpmmProgramAddresses {
|
|
5501
|
+
cpmmConfig: Address;
|
|
5502
|
+
initializerConfig: Address;
|
|
5503
|
+
}
|
|
5504
|
+
declare const DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES: SolanaCpmmProgramAddresses;
|
|
5505
|
+
declare function deriveSolanaCpmmDeployment(programs?: SolanaCpmmProgramAddresses): Promise<SolanaCpmmDeployment>;
|
|
5506
|
+
|
|
5507
|
+
export { DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES, type SolanaCpmmDeployment, type SolanaCpmmProgramAddresses, index$4 as cpmm, index$2 as cpmmMigrator, deriveSolanaCpmmDeployment, index$3 as initializer, index$1 as predictionMigrator, index as trustedOracle };
|
package/dist/solana/index.js
CHANGED
|
@@ -6477,13 +6477,20 @@ async function createInitializeLaunchInstruction(accounts, args, programId = INI
|
|
|
6477
6477
|
)
|
|
6478
6478
|
)
|
|
6479
6479
|
);
|
|
6480
|
-
|
|
6481
|
-
|
|
6480
|
+
const shouldAppendCpmmMigratorAccounts = accounts.cpmmConfig !== void 0 || migratorProgram === CPMM_MIGRATOR_PROGRAM_ID;
|
|
6481
|
+
if (shouldAppendCpmmMigratorAccounts) {
|
|
6482
|
+
if (!migratorProgram) {
|
|
6482
6483
|
throw new Error(
|
|
6483
|
-
"
|
|
6484
|
+
"migratorProgram is required when cpmmConfig is provided"
|
|
6484
6485
|
);
|
|
6485
6486
|
}
|
|
6486
|
-
|
|
6487
|
+
if (!accounts.cpmmConfig) {
|
|
6488
|
+
throw new Error("cpmmConfig is required when using the CPMM migrator");
|
|
6489
|
+
}
|
|
6490
|
+
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
6491
|
+
launch,
|
|
6492
|
+
migratorProgram
|
|
6493
|
+
);
|
|
6487
6494
|
keys.push({ address: cpmmMigrationState, role: AccountRole.WRITABLE });
|
|
6488
6495
|
keys.push({ address: accounts.cpmmConfig, role: AccountRole.READONLY });
|
|
6489
6496
|
}
|
|
@@ -7007,10 +7014,14 @@ async function buildCpmmMigrationRemainingAccounts({
|
|
|
7007
7014
|
adminBaseAta,
|
|
7008
7015
|
adminQuoteAta,
|
|
7009
7016
|
recipientAtas,
|
|
7010
|
-
cpmmProgram = CPMM_PROGRAM_ID
|
|
7017
|
+
cpmmProgram = CPMM_PROGRAM_ID,
|
|
7018
|
+
cpmmMigratorProgram = CPMM_MIGRATOR_PROGRAM_ID
|
|
7011
7019
|
}) {
|
|
7012
|
-
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
7013
|
-
|
|
7020
|
+
const [cpmmMigrationState] = await getCpmmMigratorStateAddress(
|
|
7021
|
+
launch,
|
|
7022
|
+
cpmmMigratorProgram
|
|
7023
|
+
);
|
|
7024
|
+
const [migrationAuthority] = await getCpmmMigrationAuthorityAddress(cpmmMigratorProgram);
|
|
7014
7025
|
const poolInit = await getPoolInitAddresses(baseMint, quoteMint, cpmmProgram);
|
|
7015
7026
|
const pool = poolInit.pool[0];
|
|
7016
7027
|
const [launchLpPosition] = await getPositionAddress(
|
|
@@ -7759,6 +7770,25 @@ async function getOracleStateAddress(oracleAuthority, nonce) {
|
|
|
7759
7770
|
});
|
|
7760
7771
|
}
|
|
7761
7772
|
|
|
7762
|
-
|
|
7773
|
+
// src/solana/deployment.ts
|
|
7774
|
+
var DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES = {
|
|
7775
|
+
cpmmProgram: CPMM_PROGRAM_ID,
|
|
7776
|
+
initializerProgram: INITIALIZER_PROGRAM_ID,
|
|
7777
|
+
cpmmMigratorProgram: CPMM_MIGRATOR_PROGRAM_ID,
|
|
7778
|
+
cpmmHookProgram: CPMM_HOOK_PROGRAM_ID
|
|
7779
|
+
};
|
|
7780
|
+
async function deriveSolanaCpmmDeployment(programs = DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES) {
|
|
7781
|
+
const [cpmmConfig] = await getConfigAddress(programs.cpmmProgram);
|
|
7782
|
+
const [initializerConfig] = await getConfigAddress2(
|
|
7783
|
+
programs.initializerProgram
|
|
7784
|
+
);
|
|
7785
|
+
return {
|
|
7786
|
+
...programs,
|
|
7787
|
+
cpmmConfig,
|
|
7788
|
+
initializerConfig
|
|
7789
|
+
};
|
|
7790
|
+
}
|
|
7791
|
+
|
|
7792
|
+
export { DOPPLER_SOLANA_DEVNET_PROGRAM_ADDRESSES, cpmm_exports as cpmm, cpmmMigrator_exports as cpmmMigrator, deriveSolanaCpmmDeployment, initializer_exports as initializer, predictionMigrator_exports as predictionMigrator, trustedOracle_exports as trustedOracle };
|
|
7763
7793
|
//# sourceMappingURL=index.js.map
|
|
7764
7794
|
//# sourceMappingURL=index.js.map
|