@whetstone-research/doppler-sdk 1.0.17 → 1.0.19

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.
@@ -5120,9 +5120,7 @@ function getLaunchFeeStateEncoder() {
5120
5120
  "distributedQuoteByBeneficiary",
5121
5121
  kit.getArrayEncoder(kit.getU64Encoder(), { size: 8 })
5122
5122
  ],
5123
- ["migratedPool", kit.getAddressEncoder()],
5124
- ["migratedPosition", kit.getAddressEncoder()],
5125
- ["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 64)]
5123
+ ["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 128)]
5126
5124
  ]),
5127
5125
  (value) => ({ ...value, discriminator: LAUNCH_FEE_STATE_DISCRIMINATOR })
5128
5126
  );
@@ -5151,9 +5149,7 @@ function getLaunchFeeStateDecoder() {
5151
5149
  "distributedQuoteByBeneficiary",
5152
5150
  kit.getArrayDecoder(kit.getU64Decoder(), { size: 8 })
5153
5151
  ],
5154
- ["migratedPool", kit.getAddressDecoder()],
5155
- ["migratedPosition", kit.getAddressDecoder()],
5156
- ["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 64)]
5152
+ ["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 128)]
5157
5153
  ]);
5158
5154
  }
5159
5155
  function getLaunchFeeStateCodec() {
@@ -6142,6 +6138,84 @@ async function fetchAllMaybeEntryByMint(rpc, addresses, config) {
6142
6138
  function getEntryByMintSize() {
6143
6139
  return 112;
6144
6140
  }
6141
+ var INIT_CONFIG_DISCRIMINATOR2 = new Uint8Array([
6142
+ 97,
6143
+ 166,
6144
+ 35,
6145
+ 7,
6146
+ 20,
6147
+ 2,
6148
+ 164,
6149
+ 126
6150
+ ]);
6151
+ function getInitConfigDiscriminatorBytes() {
6152
+ return kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(INIT_CONFIG_DISCRIMINATOR2);
6153
+ }
6154
+ function getInitConfigEncoder2() {
6155
+ return kit.transformEncoder(
6156
+ kit.getStructEncoder([
6157
+ ["discriminator", kit.fixEncoderSize(kit.getBytesEncoder(), 8)],
6158
+ ["admin", kit.getAddressEncoder()],
6159
+ ["migratorAllowlistLen", kit.getU8Encoder()],
6160
+ ["migratorAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
6161
+ ["hookAllowlistLen", kit.getU8Encoder()],
6162
+ ["hookAllowlist", kit.getArrayEncoder(kit.getAddressEncoder(), { size: 32 })],
6163
+ ["bump", kit.getU8Encoder()],
6164
+ ["version", kit.getU8Encoder()],
6165
+ ["protocolFeeBps", kit.getU16Encoder()],
6166
+ ["minSwapFeeBps", kit.getU16Encoder()],
6167
+ ["maxSwapFeeBps", kit.getU16Encoder()],
6168
+ ["reserved", kit.fixEncoderSize(kit.getBytesEncoder(), 24)]
6169
+ ]),
6170
+ (value) => ({ ...value, discriminator: INIT_CONFIG_DISCRIMINATOR2 })
6171
+ );
6172
+ }
6173
+ function getInitConfigDecoder2() {
6174
+ return kit.getStructDecoder([
6175
+ ["discriminator", kit.fixDecoderSize(kit.getBytesDecoder(), 8)],
6176
+ ["admin", kit.getAddressDecoder()],
6177
+ ["migratorAllowlistLen", kit.getU8Decoder()],
6178
+ ["migratorAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
6179
+ ["hookAllowlistLen", kit.getU8Decoder()],
6180
+ ["hookAllowlist", kit.getArrayDecoder(kit.getAddressDecoder(), { size: 32 })],
6181
+ ["bump", kit.getU8Decoder()],
6182
+ ["version", kit.getU8Decoder()],
6183
+ ["protocolFeeBps", kit.getU16Decoder()],
6184
+ ["minSwapFeeBps", kit.getU16Decoder()],
6185
+ ["maxSwapFeeBps", kit.getU16Decoder()],
6186
+ ["reserved", kit.fixDecoderSize(kit.getBytesDecoder(), 24)]
6187
+ ]);
6188
+ }
6189
+ function getInitConfigCodec2() {
6190
+ return kit.combineCodec(getInitConfigEncoder2(), getInitConfigDecoder2());
6191
+ }
6192
+ function decodeInitConfig(encodedAccount) {
6193
+ return kit.decodeAccount(
6194
+ encodedAccount,
6195
+ getInitConfigDecoder2()
6196
+ );
6197
+ }
6198
+ async function fetchInitConfig(rpc, address3, config) {
6199
+ const maybeAccount = await fetchMaybeInitConfig(rpc, address3, config);
6200
+ kit.assertAccountExists(maybeAccount);
6201
+ return maybeAccount;
6202
+ }
6203
+ async function fetchMaybeInitConfig(rpc, address3, config) {
6204
+ const maybeAccount = await kit.fetchEncodedAccount(rpc, address3, config);
6205
+ return decodeInitConfig(maybeAccount);
6206
+ }
6207
+ async function fetchAllInitConfig(rpc, addresses, config) {
6208
+ const maybeAccounts = await fetchAllMaybeInitConfig(rpc, addresses, config);
6209
+ kit.assertAccountsExist(maybeAccounts);
6210
+ return maybeAccounts;
6211
+ }
6212
+ async function fetchAllMaybeInitConfig(rpc, addresses, config) {
6213
+ const maybeAccounts = await kit.fetchEncodedAccounts(rpc, addresses, config);
6214
+ return maybeAccounts.map((maybeAccount) => decodeInitConfig(maybeAccount));
6215
+ }
6216
+ function getInitConfigSize() {
6217
+ return 2123;
6218
+ }
6145
6219
  function getAccumulatorUpdatedEncoder() {
6146
6220
  return kit.getStructEncoder([
6147
6221
  ["market", kit.getAddressEncoder()],
@@ -7612,9 +7686,10 @@ var PredictionMigratorAccount = /* @__PURE__ */ ((PredictionMigratorAccount2) =>
7612
7686
  PredictionMigratorAccount2[PredictionMigratorAccount2["ClaimReceipt"] = 0] = "ClaimReceipt";
7613
7687
  PredictionMigratorAccount2[PredictionMigratorAccount2["Entry"] = 1] = "Entry";
7614
7688
  PredictionMigratorAccount2[PredictionMigratorAccount2["EntryByMint"] = 2] = "EntryByMint";
7615
- PredictionMigratorAccount2[PredictionMigratorAccount2["Launch"] = 3] = "Launch";
7616
- PredictionMigratorAccount2[PredictionMigratorAccount2["Market"] = 4] = "Market";
7617
- PredictionMigratorAccount2[PredictionMigratorAccount2["OracleState"] = 5] = "OracleState";
7689
+ PredictionMigratorAccount2[PredictionMigratorAccount2["InitConfig"] = 3] = "InitConfig";
7690
+ PredictionMigratorAccount2[PredictionMigratorAccount2["Launch"] = 4] = "Launch";
7691
+ PredictionMigratorAccount2[PredictionMigratorAccount2["Market"] = 5] = "Market";
7692
+ PredictionMigratorAccount2[PredictionMigratorAccount2["OracleState"] = 6] = "OracleState";
7618
7693
  return PredictionMigratorAccount2;
7619
7694
  })(PredictionMigratorAccount || {});
7620
7695
  function identifyPredictionMigratorAccount(account) {
@@ -7646,6 +7721,15 @@ function identifyPredictionMigratorAccount(account) {
7646
7721
  )) {
7647
7722
  return 2 /* EntryByMint */;
7648
7723
  }
7724
+ if (kit.containsBytes(
7725
+ data,
7726
+ kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(
7727
+ new Uint8Array([97, 166, 35, 7, 20, 2, 164, 126])
7728
+ ),
7729
+ 0
7730
+ )) {
7731
+ return 3 /* InitConfig */;
7732
+ }
7649
7733
  if (kit.containsBytes(
7650
7734
  data,
7651
7735
  kit.fixEncoderSize(kit.getBytesEncoder(), 8).encode(
@@ -7653,7 +7737,7 @@ function identifyPredictionMigratorAccount(account) {
7653
7737
  ),
7654
7738
  0
7655
7739
  )) {
7656
- return 3 /* Launch */;
7740
+ return 4 /* Launch */;
7657
7741
  }
7658
7742
  if (kit.containsBytes(
7659
7743
  data,
@@ -7662,7 +7746,7 @@ function identifyPredictionMigratorAccount(account) {
7662
7746
  ),
7663
7747
  0
7664
7748
  )) {
7665
- return 4 /* Market */;
7749
+ return 5 /* Market */;
7666
7750
  }
7667
7751
  if (kit.containsBytes(
7668
7752
  data,
@@ -7671,7 +7755,7 @@ function identifyPredictionMigratorAccount(account) {
7671
7755
  ),
7672
7756
  0
7673
7757
  )) {
7674
- return 5 /* OracleState */;
7758
+ return 6 /* OracleState */;
7675
7759
  }
7676
7760
  throw new kit.SolanaError(
7677
7761
  kit.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
@@ -7778,6 +7862,7 @@ function predictionMigratorProgram() {
7778
7862
  claimReceipt: programClientCore.addSelfFetchFunctions(client, getClaimReceiptCodec()),
7779
7863
  entry: programClientCore.addSelfFetchFunctions(client, getEntryCodec()),
7780
7864
  entryByMint: programClientCore.addSelfFetchFunctions(client, getEntryByMintCodec()),
7865
+ initConfig: programClientCore.addSelfFetchFunctions(client, getInitConfigCodec2()),
7781
7866
  launch: programClientCore.addSelfFetchFunctions(client, getLaunchCodec2()),
7782
7867
  market: programClientCore.addSelfFetchFunctions(client, getMarketCodec()),
7783
7868
  oracleState: programClientCore.addSelfFetchFunctions(client, getOracleStateCodec2())
@@ -8658,6 +8743,7 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
8658
8743
  CLAIM_RECEIPT_DISCRIMINATOR: () => CLAIM_RECEIPT_DISCRIMINATOR,
8659
8744
  ENTRY_BY_MINT_DISCRIMINATOR: () => ENTRY_BY_MINT_DISCRIMINATOR,
8660
8745
  ENTRY_DISCRIMINATOR: () => ENTRY_DISCRIMINATOR,
8746
+ INIT_CONFIG_DISCRIMINATOR: () => INIT_CONFIG_DISCRIMINATOR2,
8661
8747
  LAUNCH_DISCRIMINATOR: () => LAUNCH_DISCRIMINATOR2,
8662
8748
  MARKET_DISCRIMINATOR: () => MARKET_DISCRIMINATOR,
8663
8749
  MIGRATE_ENTRY_DISCRIMINATOR: () => MIGRATE_ENTRY_DISCRIMINATOR,
@@ -8690,17 +8776,20 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
8690
8776
  decodeClaimReceipt: () => decodeClaimReceipt,
8691
8777
  decodeEntry: () => decodeEntry,
8692
8778
  decodeEntryByMint: () => decodeEntryByMint,
8779
+ decodeInitConfig: () => decodeInitConfig,
8693
8780
  decodeLaunch: () => decodeLaunch,
8694
8781
  decodeMarket: () => decodeMarket,
8695
8782
  decodeOracleState: () => decodeOracleState2,
8696
8783
  fetchAllClaimReceipt: () => fetchAllClaimReceipt,
8697
8784
  fetchAllEntry: () => fetchAllEntry,
8698
8785
  fetchAllEntryByMint: () => fetchAllEntryByMint,
8786
+ fetchAllInitConfig: () => fetchAllInitConfig,
8699
8787
  fetchAllLaunch: () => fetchAllLaunch,
8700
8788
  fetchAllMarket: () => fetchAllMarket,
8701
8789
  fetchAllMaybeClaimReceipt: () => fetchAllMaybeClaimReceipt,
8702
8790
  fetchAllMaybeEntry: () => fetchAllMaybeEntry,
8703
8791
  fetchAllMaybeEntryByMint: () => fetchAllMaybeEntryByMint,
8792
+ fetchAllMaybeInitConfig: () => fetchAllMaybeInitConfig,
8704
8793
  fetchAllMaybeLaunch: () => fetchAllMaybeLaunch,
8705
8794
  fetchAllMaybeMarket: () => fetchAllMaybeMarket,
8706
8795
  fetchAllMaybeOracleState: () => fetchAllMaybeOracleState,
@@ -8708,11 +8797,13 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
8708
8797
  fetchClaimReceipt: () => fetchClaimReceipt,
8709
8798
  fetchEntry: () => fetchEntry,
8710
8799
  fetchEntryByMint: () => fetchEntryByMint,
8800
+ fetchInitConfig: () => fetchInitConfig,
8711
8801
  fetchLaunch: () => fetchLaunch,
8712
8802
  fetchMarket: () => fetchMarket,
8713
8803
  fetchMaybeClaimReceipt: () => fetchMaybeClaimReceipt,
8714
8804
  fetchMaybeEntry: () => fetchMaybeEntry,
8715
8805
  fetchMaybeEntryByMint: () => fetchMaybeEntryByMint,
8806
+ fetchMaybeInitConfig: () => fetchMaybeInitConfig,
8716
8807
  fetchMaybeLaunch: () => fetchMaybeLaunch,
8717
8808
  fetchMaybeMarket: () => fetchMaybeMarket,
8718
8809
  fetchMaybeOracleState: () => fetchMaybeOracleState,
@@ -8747,6 +8838,11 @@ chunkQ7SFCCGT_cjs.__export(predictionMigrator_exports, {
8747
8838
  getEntryRegisteredDecoder: () => getEntryRegisteredDecoder,
8748
8839
  getEntryRegisteredEncoder: () => getEntryRegisteredEncoder,
8749
8840
  getEntrySize: () => getEntrySize,
8841
+ getInitConfigCodec: () => getInitConfigCodec2,
8842
+ getInitConfigDecoder: () => getInitConfigDecoder2,
8843
+ getInitConfigDiscriminatorBytes: () => getInitConfigDiscriminatorBytes,
8844
+ getInitConfigEncoder: () => getInitConfigEncoder2,
8845
+ getInitConfigSize: () => getInitConfigSize,
8750
8846
  getLaunchCodec: () => getLaunchCodec2,
8751
8847
  getLaunchDecoder: () => getLaunchDecoder2,
8752
8848
  getLaunchDiscriminatorBytes: () => getLaunchDiscriminatorBytes,