@pina-rs/amm 0.1.0 → 0.2.1
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.cjs +501 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +451 -11
- package/dist/index.d.ts +451 -11
- package/dist/index.js +445 -16
- package/dist/index.js.map +1 -1
- package/package.json +59 -58
- package/src/generated/accounts/pool.ts +64 -8
- package/src/generated/errors/pinaAmm.ts +4 -2
- package/src/generated/events/configCreated.ts +80 -0
- package/src/generated/events/configUpdated.ts +64 -0
- package/src/generated/events/index.ts +5 -0
- package/src/generated/events/logs.ts +362 -2
- package/src/generated/events/poolCreatorChanged.ts +56 -0
- package/src/generated/events/poolSynced.ts +78 -0
- package/src/generated/events/poolSyncedV0.ts +44 -0
- package/src/generated/instructions/index.ts +1 -0
- package/src/generated/instructions/syncPool.ts +93 -0
- package/src/generated/pdas/ammConfig.ts +1 -1
- package/src/generated/pdas/pool.ts +1 -1
- package/src/generated/pdas/poolLpMint.ts +1 -1
- package/src/generated/pdas/poolVault.ts +1 -1
- package/src/generated/programs/pinaAmm.ts +17 -8
package/dist/index.d.cts
CHANGED
|
@@ -196,7 +196,7 @@ declare function ammConfigNeedsMigration(data: ReadonlyUint8Array): boolean;
|
|
|
196
196
|
|
|
197
197
|
declare const POOL_DISCRIMINATOR = 2;
|
|
198
198
|
declare function getPoolDiscriminatorBytes(): ReadonlyUint8Array;
|
|
199
|
-
declare const POOL_DISCRIMINATOR2 =
|
|
199
|
+
declare const POOL_DISCRIMINATOR2 = 1;
|
|
200
200
|
declare function getPoolDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
201
201
|
/**
|
|
202
202
|
* A constant-product pool for one token pair under one fee tier.
|
|
@@ -248,6 +248,34 @@ type Pool = {
|
|
|
248
248
|
creatorFeeMode: number;
|
|
249
249
|
/** Canonical bump of this pool's PDA. */
|
|
250
250
|
bump: number;
|
|
251
|
+
/**
|
|
252
|
+
* Low 128 bits of the Q64.64 price-time integral. Combine with
|
|
253
|
+
* `price_0_cumulative_high_last` as `low + high * 2^128`. Every swap, deposit,
|
|
254
|
+
* withdrawal, and `SyncPool` advances it with `reserve_0_last` and
|
|
255
|
+
* `reserve_1_last` before changing the reserves.
|
|
256
|
+
*/
|
|
257
|
+
price0CumulativeLast: bigint;
|
|
258
|
+
/**
|
|
259
|
+
* High 128 bits of the Q64.64 price-time integral. Together the limbs
|
|
260
|
+
* retain every bit for all supported reserve ratios and timestamp windows.
|
|
261
|
+
*/
|
|
262
|
+
price0CumulativeHighLast: bigint;
|
|
263
|
+
/** Unix second of the last accumulator advance; zero before the first. */
|
|
264
|
+
lastUpdateTimestamp: bigint;
|
|
265
|
+
/**
|
|
266
|
+
* Token 0 reserve at the end of the last instruction that changed or
|
|
267
|
+
* observed the reserves: `CreatePool`, a swap, a deposit, a withdrawal,
|
|
268
|
+
* or `SyncPool`. It prices the accumulator's next interval and nothing
|
|
269
|
+
* else: trades and liquidity always price from the live vault balances.
|
|
270
|
+
*/
|
|
271
|
+
reserve0Last: bigint;
|
|
272
|
+
/**
|
|
273
|
+
* Token 1 reserve at the end of the last instruction that changed or
|
|
274
|
+
* observed the reserves: `CreatePool`, a swap, a deposit, a withdrawal,
|
|
275
|
+
* or `SyncPool`. It prices the accumulator's next interval and nothing
|
|
276
|
+
* else: trades and liquidity always price from the live vault balances.
|
|
277
|
+
*/
|
|
278
|
+
reserve1Last: bigint;
|
|
251
279
|
};
|
|
252
280
|
type PoolArgs = {
|
|
253
281
|
/** Fee tier this pool was created under. */
|
|
@@ -291,6 +319,34 @@ type PoolArgs = {
|
|
|
291
319
|
creatorFeeMode: number;
|
|
292
320
|
/** Canonical bump of this pool's PDA. */
|
|
293
321
|
bump: number;
|
|
322
|
+
/**
|
|
323
|
+
* Low 128 bits of the Q64.64 price-time integral. Combine with
|
|
324
|
+
* `price_0_cumulative_high_last` as `low + high * 2^128`. Every swap, deposit,
|
|
325
|
+
* withdrawal, and `SyncPool` advances it with `reserve_0_last` and
|
|
326
|
+
* `reserve_1_last` before changing the reserves.
|
|
327
|
+
*/
|
|
328
|
+
price0CumulativeLast: number | bigint;
|
|
329
|
+
/**
|
|
330
|
+
* High 128 bits of the Q64.64 price-time integral. Together the limbs
|
|
331
|
+
* retain every bit for all supported reserve ratios and timestamp windows.
|
|
332
|
+
*/
|
|
333
|
+
price0CumulativeHighLast: number | bigint;
|
|
334
|
+
/** Unix second of the last accumulator advance; zero before the first. */
|
|
335
|
+
lastUpdateTimestamp: number | bigint;
|
|
336
|
+
/**
|
|
337
|
+
* Token 0 reserve at the end of the last instruction that changed or
|
|
338
|
+
* observed the reserves: `CreatePool`, a swap, a deposit, a withdrawal,
|
|
339
|
+
* or `SyncPool`. It prices the accumulator's next interval and nothing
|
|
340
|
+
* else: trades and liquidity always price from the live vault balances.
|
|
341
|
+
*/
|
|
342
|
+
reserve0Last: number | bigint;
|
|
343
|
+
/**
|
|
344
|
+
* Token 1 reserve at the end of the last instruction that changed or
|
|
345
|
+
* observed the reserves: `CreatePool`, a swap, a deposit, a withdrawal,
|
|
346
|
+
* or `SyncPool`. It prices the accumulator's next interval and nothing
|
|
347
|
+
* else: trades and liquidity always price from the live vault balances.
|
|
348
|
+
*/
|
|
349
|
+
reserve1Last: number | bigint;
|
|
294
350
|
};
|
|
295
351
|
/** Gets the encoder for {@link PoolArgs} account data. */
|
|
296
352
|
declare function getPoolEncoder(): FixedSizeEncoder<PoolArgs>;
|
|
@@ -311,7 +367,7 @@ declare function fetchMaybePoolFromSeeds(rpc: Parameters<typeof fetchEncodedAcco
|
|
|
311
367
|
programAddress?: Address;
|
|
312
368
|
}): Promise<MaybeAccount<Pool>>;
|
|
313
369
|
/** The account schema version this client was generated from. */
|
|
314
|
-
declare const POOL_MIGRATION_VERSION =
|
|
370
|
+
declare const POOL_MIGRATION_VERSION = 1;
|
|
315
371
|
/**
|
|
316
372
|
* Cheap envelope check for a fetched `Pool` account: `true` only when the
|
|
317
373
|
* bytes name this account's discriminator and a migration version older than
|
|
@@ -367,7 +423,9 @@ declare const PINA_AMM_ERROR__INVARIANT_VIOLATION = 12;
|
|
|
367
423
|
declare const PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH = 13;
|
|
368
424
|
/** This fee tier only lets its pool-creator authority create pools. */
|
|
369
425
|
declare const PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED = 14;
|
|
370
|
-
|
|
426
|
+
/** The pool creator may not be the default address, which can never sign or collect. */
|
|
427
|
+
declare const PINA_AMM_ERROR__DEFAULT_CREATOR = 15;
|
|
428
|
+
type PinaAmmError = typeof PINA_AMM_ERROR__DEFAULT_CREATOR | typeof PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY | typeof PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY | typeof PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE | typeof PINA_AMM_ERROR__INVALID_FEE_RATES | typeof PINA_AMM_ERROR__INVALID_MINT_ORDER | typeof PINA_AMM_ERROR__INVALID_PROGRAM_DATA | typeof PINA_AMM_ERROR__INVARIANT_VIOLATION | typeof PINA_AMM_ERROR__MATH_OVERFLOW | typeof PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH | typeof PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED | typeof PINA_AMM_ERROR__SLIPPAGE_EXCEEDED | typeof PINA_AMM_ERROR__UNAUTHORIZED | typeof PINA_AMM_ERROR__UNSUPPORTED_MINT | typeof PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH | typeof PINA_AMM_ERROR__ZERO_AMOUNT;
|
|
371
429
|
declare function getPinaAmmErrorMessage(code: PinaAmmError): string;
|
|
372
430
|
declare function isPinaAmmError<TProgramErrorCode extends PinaAmmError>(error: unknown, transactionMessage: {
|
|
373
431
|
instructions: Record<number, {
|
|
@@ -631,6 +689,258 @@ declare function getFeesCollectedEventCodec(): FixedSizeCodec<FeesCollectedEvent
|
|
|
631
689
|
/** Parses the provided bytes into {@link FeesCollectedEvent} event data. */
|
|
632
690
|
declare function parseFeesCollectedEvent(data: ReadonlyUint8Array | Uint8Array): FeesCollectedEvent;
|
|
633
691
|
|
|
692
|
+
/**
|
|
693
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
694
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
695
|
+
* to add features, then rerun Codama to update it.
|
|
696
|
+
*
|
|
697
|
+
* @see https://github.com/codama-idl/codama
|
|
698
|
+
*/
|
|
699
|
+
|
|
700
|
+
declare const POOL_SYNCED_EVENT_DISCRIMINATOR = 5;
|
|
701
|
+
declare function getPoolSyncedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
702
|
+
declare const POOL_SYNCED_EVENT_DISCRIMINATOR2 = 1;
|
|
703
|
+
declare function getPoolSyncedEventDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
704
|
+
/**
|
|
705
|
+
* Emitted by `SyncPool`. Swaps, deposits, and withdrawals advance the same
|
|
706
|
+
* accumulator and report their effect through `Swapped` and
|
|
707
|
+
* `LiquidityChanged`.
|
|
708
|
+
*/
|
|
709
|
+
type PoolSyncedEvent = {
|
|
710
|
+
discriminator: number;
|
|
711
|
+
migrationVersion: number;
|
|
712
|
+
/** The pool whose accumulator advanced. */
|
|
713
|
+
pool: Address;
|
|
714
|
+
/** Token 0 reserve recorded at the advance; it prices the next interval. */
|
|
715
|
+
reserve0: bigint;
|
|
716
|
+
/** Token 1 reserve recorded at the advance; it prices the next interval. */
|
|
717
|
+
reserve1: bigint;
|
|
718
|
+
/**
|
|
719
|
+
* Low 128 bits of the Q64.64 price-time integral after the advance.
|
|
720
|
+
* Combine with `price_0_cumulative_high_last` as `low + high * 2^128`.
|
|
721
|
+
*/
|
|
722
|
+
price0CumulativeLast: bigint;
|
|
723
|
+
/** High 128 bits of the Q64.64 price-time integral after the advance. */
|
|
724
|
+
price0CumulativeHighLast: bigint;
|
|
725
|
+
/** Unix second of the advance. */
|
|
726
|
+
lastUpdateTimestamp: bigint;
|
|
727
|
+
};
|
|
728
|
+
type PoolSyncedEventArgs = {
|
|
729
|
+
/** The pool whose accumulator advanced. */
|
|
730
|
+
pool: Address;
|
|
731
|
+
/** Token 0 reserve recorded at the advance; it prices the next interval. */
|
|
732
|
+
reserve0: number | bigint;
|
|
733
|
+
/** Token 1 reserve recorded at the advance; it prices the next interval. */
|
|
734
|
+
reserve1: number | bigint;
|
|
735
|
+
/**
|
|
736
|
+
* Low 128 bits of the Q64.64 price-time integral after the advance.
|
|
737
|
+
* Combine with `price_0_cumulative_high_last` as `low + high * 2^128`.
|
|
738
|
+
*/
|
|
739
|
+
price0CumulativeLast: number | bigint;
|
|
740
|
+
/** High 128 bits of the Q64.64 price-time integral after the advance. */
|
|
741
|
+
price0CumulativeHighLast: number | bigint;
|
|
742
|
+
/** Unix second of the advance. */
|
|
743
|
+
lastUpdateTimestamp: number | bigint;
|
|
744
|
+
};
|
|
745
|
+
/** Gets the encoder for {@link PoolSyncedEventArgs} event data. */
|
|
746
|
+
declare function getPoolSyncedEventEncoder(): FixedSizeEncoder<PoolSyncedEventArgs>;
|
|
747
|
+
/** Gets the decoder for {@link PoolSyncedEvent} event data. */
|
|
748
|
+
declare function getPoolSyncedEventDecoder(): FixedSizeDecoder<PoolSyncedEvent>;
|
|
749
|
+
/** Gets the codec for {@link PoolSyncedEvent} event data. */
|
|
750
|
+
declare function getPoolSyncedEventCodec(): FixedSizeCodec<PoolSyncedEventArgs, PoolSyncedEvent>;
|
|
751
|
+
/** Parses the provided bytes into {@link PoolSyncedEvent} event data. */
|
|
752
|
+
declare function parsePoolSyncedEvent(data: ReadonlyUint8Array | Uint8Array): PoolSyncedEvent;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
756
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
757
|
+
* to add features, then rerun Codama to update it.
|
|
758
|
+
*
|
|
759
|
+
* @see https://github.com/codama-idl/codama
|
|
760
|
+
*/
|
|
761
|
+
|
|
762
|
+
declare const POOL_SYNCED_V0_EVENT_DISCRIMINATOR = 5;
|
|
763
|
+
declare function getPoolSyncedV0EventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
764
|
+
declare const POOL_SYNCED_V0_EVENT_DISCRIMINATOR2 = 0;
|
|
765
|
+
declare function getPoolSyncedV0EventDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
766
|
+
/** Version 0 of `PoolSynced`, as emitted before its current layout. Log records carrying this version decode with this event. */
|
|
767
|
+
type PoolSyncedV0Event = {
|
|
768
|
+
discriminator: number;
|
|
769
|
+
migrationVersion: number;
|
|
770
|
+
pool: Address;
|
|
771
|
+
reserve0: bigint;
|
|
772
|
+
reserve1: bigint;
|
|
773
|
+
price0CumulativeLast: bigint;
|
|
774
|
+
lastUpdateTimestamp: bigint;
|
|
775
|
+
};
|
|
776
|
+
type PoolSyncedV0EventArgs = {
|
|
777
|
+
pool: Address;
|
|
778
|
+
reserve0: number | bigint;
|
|
779
|
+
reserve1: number | bigint;
|
|
780
|
+
price0CumulativeLast: number | bigint;
|
|
781
|
+
lastUpdateTimestamp: number | bigint;
|
|
782
|
+
};
|
|
783
|
+
/** Gets the encoder for {@link PoolSyncedV0EventArgs} event data. */
|
|
784
|
+
declare function getPoolSyncedV0EventEncoder(): FixedSizeEncoder<PoolSyncedV0EventArgs>;
|
|
785
|
+
/** Gets the decoder for {@link PoolSyncedV0Event} event data. */
|
|
786
|
+
declare function getPoolSyncedV0EventDecoder(): FixedSizeDecoder<PoolSyncedV0Event>;
|
|
787
|
+
/** Gets the codec for {@link PoolSyncedV0Event} event data. */
|
|
788
|
+
declare function getPoolSyncedV0EventCodec(): FixedSizeCodec<PoolSyncedV0EventArgs, PoolSyncedV0Event>;
|
|
789
|
+
/** Parses the provided bytes into {@link PoolSyncedV0Event} event data. */
|
|
790
|
+
declare function parsePoolSyncedV0Event(data: ReadonlyUint8Array | Uint8Array): PoolSyncedV0Event;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
794
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
795
|
+
* to add features, then rerun Codama to update it.
|
|
796
|
+
*
|
|
797
|
+
* @see https://github.com/codama-idl/codama
|
|
798
|
+
*/
|
|
799
|
+
|
|
800
|
+
declare const CONFIG_CREATED_EVENT_DISCRIMINATOR = 8;
|
|
801
|
+
declare function getConfigCreatedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
802
|
+
declare const CONFIG_CREATED_EVENT_DISCRIMINATOR2 = 0;
|
|
803
|
+
declare function getConfigCreatedEventDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
804
|
+
/** Emitted by `CreateConfig`. */
|
|
805
|
+
type ConfigCreatedEvent = {
|
|
806
|
+
discriminator: number;
|
|
807
|
+
migrationVersion: number;
|
|
808
|
+
/** The new tier. */
|
|
809
|
+
ammConfig: Address;
|
|
810
|
+
/** Signer that may update the tier and collect its protocol fees. */
|
|
811
|
+
authority: Address;
|
|
812
|
+
/**
|
|
813
|
+
* The only signer allowed to create pools under the tier, or the
|
|
814
|
+
* default address when pool creation is open to anyone. Fixed for the
|
|
815
|
+
* life of the tier.
|
|
816
|
+
*/
|
|
817
|
+
poolCreatorAuthority: Address;
|
|
818
|
+
/** Trade fee pools snapshot, in parts per million. */
|
|
819
|
+
tradeFeeRate: number;
|
|
820
|
+
/** Protocol share of the trade fee pools snapshot, in parts per million. */
|
|
821
|
+
protocolFeeRate: number;
|
|
822
|
+
/** Creator fee pools snapshot, in parts per million. */
|
|
823
|
+
creatorFeeRate: number;
|
|
824
|
+
/** Tier index used as the PDA seed. */
|
|
825
|
+
index: number;
|
|
826
|
+
};
|
|
827
|
+
type ConfigCreatedEventArgs = {
|
|
828
|
+
/** The new tier. */
|
|
829
|
+
ammConfig: Address;
|
|
830
|
+
/** Signer that may update the tier and collect its protocol fees. */
|
|
831
|
+
authority: Address;
|
|
832
|
+
/**
|
|
833
|
+
* The only signer allowed to create pools under the tier, or the
|
|
834
|
+
* default address when pool creation is open to anyone. Fixed for the
|
|
835
|
+
* life of the tier.
|
|
836
|
+
*/
|
|
837
|
+
poolCreatorAuthority: Address;
|
|
838
|
+
/** Trade fee pools snapshot, in parts per million. */
|
|
839
|
+
tradeFeeRate: number;
|
|
840
|
+
/** Protocol share of the trade fee pools snapshot, in parts per million. */
|
|
841
|
+
protocolFeeRate: number;
|
|
842
|
+
/** Creator fee pools snapshot, in parts per million. */
|
|
843
|
+
creatorFeeRate: number;
|
|
844
|
+
/** Tier index used as the PDA seed. */
|
|
845
|
+
index: number;
|
|
846
|
+
};
|
|
847
|
+
/** Gets the encoder for {@link ConfigCreatedEventArgs} event data. */
|
|
848
|
+
declare function getConfigCreatedEventEncoder(): FixedSizeEncoder<ConfigCreatedEventArgs>;
|
|
849
|
+
/** Gets the decoder for {@link ConfigCreatedEvent} event data. */
|
|
850
|
+
declare function getConfigCreatedEventDecoder(): FixedSizeDecoder<ConfigCreatedEvent>;
|
|
851
|
+
/** Gets the codec for {@link ConfigCreatedEvent} event data. */
|
|
852
|
+
declare function getConfigCreatedEventCodec(): FixedSizeCodec<ConfigCreatedEventArgs, ConfigCreatedEvent>;
|
|
853
|
+
/** Parses the provided bytes into {@link ConfigCreatedEvent} event data. */
|
|
854
|
+
declare function parseConfigCreatedEvent(data: ReadonlyUint8Array | Uint8Array): ConfigCreatedEvent;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
858
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
859
|
+
* to add features, then rerun Codama to update it.
|
|
860
|
+
*
|
|
861
|
+
* @see https://github.com/codama-idl/codama
|
|
862
|
+
*/
|
|
863
|
+
|
|
864
|
+
declare const CONFIG_UPDATED_EVENT_DISCRIMINATOR = 6;
|
|
865
|
+
declare function getConfigUpdatedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
866
|
+
declare const CONFIG_UPDATED_EVENT_DISCRIMINATOR2 = 0;
|
|
867
|
+
declare function getConfigUpdatedEventDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
868
|
+
/** Emitted by `UpdateConfig`. */
|
|
869
|
+
type ConfigUpdatedEvent = {
|
|
870
|
+
discriminator: number;
|
|
871
|
+
migrationVersion: number;
|
|
872
|
+
/** The tier that was updated. */
|
|
873
|
+
ammConfig: Address;
|
|
874
|
+
/** The tier's new authority. */
|
|
875
|
+
newAuthority: Address;
|
|
876
|
+
/** Trade fee future pools snapshot, in parts per million. */
|
|
877
|
+
tradeFeeRate: number;
|
|
878
|
+
/** Protocol share future pools snapshot, in parts per million. */
|
|
879
|
+
protocolFeeRate: number;
|
|
880
|
+
/** Creator fee future pools snapshot, in parts per million. */
|
|
881
|
+
creatorFeeRate: number;
|
|
882
|
+
};
|
|
883
|
+
type ConfigUpdatedEventArgs = {
|
|
884
|
+
/** The tier that was updated. */
|
|
885
|
+
ammConfig: Address;
|
|
886
|
+
/** The tier's new authority. */
|
|
887
|
+
newAuthority: Address;
|
|
888
|
+
/** Trade fee future pools snapshot, in parts per million. */
|
|
889
|
+
tradeFeeRate: number;
|
|
890
|
+
/** Protocol share future pools snapshot, in parts per million. */
|
|
891
|
+
protocolFeeRate: number;
|
|
892
|
+
/** Creator fee future pools snapshot, in parts per million. */
|
|
893
|
+
creatorFeeRate: number;
|
|
894
|
+
};
|
|
895
|
+
/** Gets the encoder for {@link ConfigUpdatedEventArgs} event data. */
|
|
896
|
+
declare function getConfigUpdatedEventEncoder(): FixedSizeEncoder<ConfigUpdatedEventArgs>;
|
|
897
|
+
/** Gets the decoder for {@link ConfigUpdatedEvent} event data. */
|
|
898
|
+
declare function getConfigUpdatedEventDecoder(): FixedSizeDecoder<ConfigUpdatedEvent>;
|
|
899
|
+
/** Gets the codec for {@link ConfigUpdatedEvent} event data. */
|
|
900
|
+
declare function getConfigUpdatedEventCodec(): FixedSizeCodec<ConfigUpdatedEventArgs, ConfigUpdatedEvent>;
|
|
901
|
+
/** Parses the provided bytes into {@link ConfigUpdatedEvent} event data. */
|
|
902
|
+
declare function parseConfigUpdatedEvent(data: ReadonlyUint8Array | Uint8Array): ConfigUpdatedEvent;
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
906
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
907
|
+
* to add features, then rerun Codama to update it.
|
|
908
|
+
*
|
|
909
|
+
* @see https://github.com/codama-idl/codama
|
|
910
|
+
*/
|
|
911
|
+
|
|
912
|
+
declare const POOL_CREATOR_CHANGED_EVENT_DISCRIMINATOR = 7;
|
|
913
|
+
declare function getPoolCreatorChangedEventDiscriminatorBytes(): ReadonlyUint8Array;
|
|
914
|
+
declare const POOL_CREATOR_CHANGED_EVENT_DISCRIMINATOR2 = 0;
|
|
915
|
+
declare function getPoolCreatorChangedEventDiscriminator2Bytes(): ReadonlyUint8Array;
|
|
916
|
+
/** Emitted by `SetPoolCreator`. */
|
|
917
|
+
type PoolCreatorChangedEvent = {
|
|
918
|
+
discriminator: number;
|
|
919
|
+
migrationVersion: number;
|
|
920
|
+
/** The pool whose creator-fee rights moved. */
|
|
921
|
+
pool: Address;
|
|
922
|
+
/** The previous creator. */
|
|
923
|
+
previousCreator: Address;
|
|
924
|
+
/** The new creator. */
|
|
925
|
+
newCreator: Address;
|
|
926
|
+
};
|
|
927
|
+
type PoolCreatorChangedEventArgs = {
|
|
928
|
+
/** The pool whose creator-fee rights moved. */
|
|
929
|
+
pool: Address;
|
|
930
|
+
/** The previous creator. */
|
|
931
|
+
previousCreator: Address;
|
|
932
|
+
/** The new creator. */
|
|
933
|
+
newCreator: Address;
|
|
934
|
+
};
|
|
935
|
+
/** Gets the encoder for {@link PoolCreatorChangedEventArgs} event data. */
|
|
936
|
+
declare function getPoolCreatorChangedEventEncoder(): FixedSizeEncoder<PoolCreatorChangedEventArgs>;
|
|
937
|
+
/** Gets the decoder for {@link PoolCreatorChangedEvent} event data. */
|
|
938
|
+
declare function getPoolCreatorChangedEventDecoder(): FixedSizeDecoder<PoolCreatorChangedEvent>;
|
|
939
|
+
/** Gets the codec for {@link PoolCreatorChangedEvent} event data. */
|
|
940
|
+
declare function getPoolCreatorChangedEventCodec(): FixedSizeCodec<PoolCreatorChangedEventArgs, PoolCreatorChangedEvent>;
|
|
941
|
+
/** Parses the provided bytes into {@link PoolCreatorChangedEvent} event data. */
|
|
942
|
+
declare function parsePoolCreatorChangedEvent(data: ReadonlyUint8Array | Uint8Array): PoolCreatorChangedEvent;
|
|
943
|
+
|
|
634
944
|
/**
|
|
635
945
|
* This code was AUTOGENERATED using the Codama library and Pina's migration
|
|
636
946
|
* manifest. Please DO NOT EDIT THIS FILE, instead rerun client generation.
|
|
@@ -697,10 +1007,80 @@ type DecodedFeesCollectedEvent = {
|
|
|
697
1007
|
* this event.
|
|
698
1008
|
*/
|
|
699
1009
|
declare function parseFeesCollectedEventFromLog(log: string): DecodedFeesCollectedEvent | null;
|
|
1010
|
+
/**
|
|
1011
|
+
* Decode one `poolSynced` record: only records carrying this event's migration version decode.
|
|
1012
|
+
*/
|
|
1013
|
+
declare function decodePoolSyncedEvent(data: ReadonlyUint8Array | Uint8Array): DecodedPoolSyncedEvent;
|
|
1014
|
+
/** One log entry that named this event. */
|
|
1015
|
+
type DecodedPoolSyncedEvent = {
|
|
1016
|
+
name: "poolSynced";
|
|
1017
|
+
data: PoolSyncedEvent;
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* Decode a `Program data:` log line, or return `null` when the line is not
|
|
1021
|
+
* this event.
|
|
1022
|
+
*/
|
|
1023
|
+
declare function parsePoolSyncedEventFromLog(log: string): DecodedPoolSyncedEvent | null;
|
|
1024
|
+
/**
|
|
1025
|
+
* Decode one `poolSyncedV0` record: only records carrying this event's migration version decode.
|
|
1026
|
+
*/
|
|
1027
|
+
declare function decodePoolSyncedV0Event(data: ReadonlyUint8Array | Uint8Array): DecodedPoolSyncedV0Event;
|
|
1028
|
+
/** One log entry that named this event. */
|
|
1029
|
+
type DecodedPoolSyncedV0Event = {
|
|
1030
|
+
name: "poolSyncedV0";
|
|
1031
|
+
data: PoolSyncedV0Event;
|
|
1032
|
+
};
|
|
1033
|
+
/**
|
|
1034
|
+
* Decode a `Program data:` log line, or return `null` when the line is not
|
|
1035
|
+
* this event.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function parsePoolSyncedV0EventFromLog(log: string): DecodedPoolSyncedV0Event | null;
|
|
1038
|
+
/**
|
|
1039
|
+
* Decode one `configCreated` record: only records carrying this event's migration version decode.
|
|
1040
|
+
*/
|
|
1041
|
+
declare function decodeConfigCreatedEvent(data: ReadonlyUint8Array | Uint8Array): DecodedConfigCreatedEvent;
|
|
1042
|
+
/** One log entry that named this event. */
|
|
1043
|
+
type DecodedConfigCreatedEvent = {
|
|
1044
|
+
name: "configCreated";
|
|
1045
|
+
data: ConfigCreatedEvent;
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* Decode a `Program data:` log line, or return `null` when the line is not
|
|
1049
|
+
* this event.
|
|
1050
|
+
*/
|
|
1051
|
+
declare function parseConfigCreatedEventFromLog(log: string): DecodedConfigCreatedEvent | null;
|
|
1052
|
+
/**
|
|
1053
|
+
* Decode one `configUpdated` record: only records carrying this event's migration version decode.
|
|
1054
|
+
*/
|
|
1055
|
+
declare function decodeConfigUpdatedEvent(data: ReadonlyUint8Array | Uint8Array): DecodedConfigUpdatedEvent;
|
|
1056
|
+
/** One log entry that named this event. */
|
|
1057
|
+
type DecodedConfigUpdatedEvent = {
|
|
1058
|
+
name: "configUpdated";
|
|
1059
|
+
data: ConfigUpdatedEvent;
|
|
1060
|
+
};
|
|
1061
|
+
/**
|
|
1062
|
+
* Decode a `Program data:` log line, or return `null` when the line is not
|
|
1063
|
+
* this event.
|
|
1064
|
+
*/
|
|
1065
|
+
declare function parseConfigUpdatedEventFromLog(log: string): DecodedConfigUpdatedEvent | null;
|
|
1066
|
+
/**
|
|
1067
|
+
* Decode one `poolCreatorChanged` record: only records carrying this event's migration version decode.
|
|
1068
|
+
*/
|
|
1069
|
+
declare function decodePoolCreatorChangedEvent(data: ReadonlyUint8Array | Uint8Array): DecodedPoolCreatorChangedEvent;
|
|
1070
|
+
/** One log entry that named this event. */
|
|
1071
|
+
type DecodedPoolCreatorChangedEvent = {
|
|
1072
|
+
name: "poolCreatorChanged";
|
|
1073
|
+
data: PoolCreatorChangedEvent;
|
|
1074
|
+
};
|
|
1075
|
+
/**
|
|
1076
|
+
* Decode a `Program data:` log line, or return `null` when the line is not
|
|
1077
|
+
* this event.
|
|
1078
|
+
*/
|
|
1079
|
+
declare function parsePoolCreatorChangedEventFromLog(log: string): DecodedPoolCreatorChangedEvent | null;
|
|
700
1080
|
/** Every event this program can emit, as decoded from a log line. */
|
|
701
|
-
type DecodedPinaAmmEvent = DecodedPoolCreatedEvent | DecodedSwappedEvent | DecodedLiquidityChangedEvent | DecodedFeesCollectedEvent;
|
|
1081
|
+
type DecodedPinaAmmEvent = DecodedPoolCreatedEvent | DecodedSwappedEvent | DecodedLiquidityChangedEvent | DecodedFeesCollectedEvent | DecodedPoolSyncedEvent | DecodedPoolSyncedV0Event | DecodedConfigCreatedEvent | DecodedConfigUpdatedEvent | DecodedPoolCreatorChangedEvent;
|
|
702
1082
|
/** The program whose invocation frames emit the events decoded here. */
|
|
703
|
-
declare const PINA_AMM_EVENT_SOURCE_ADDRESS = "
|
|
1083
|
+
declare const PINA_AMM_EVENT_SOURCE_ADDRESS = "pAMMzVPRwtrxQs2CjLTUUpfCAp9XdvVmwwVhpAuCobi";
|
|
704
1084
|
/**
|
|
705
1085
|
* Decode every `Program data:` line this program emitted in a transaction's
|
|
706
1086
|
* logs.
|
|
@@ -729,7 +1109,7 @@ declare function parsePinaAmmEventsFromLogs(logs: readonly string[], programAddr
|
|
|
729
1109
|
* @see https://github.com/codama-idl/codama
|
|
730
1110
|
*/
|
|
731
1111
|
|
|
732
|
-
declare const PINA_AMM_PROGRAM_ADDRESS: Address<"
|
|
1112
|
+
declare const PINA_AMM_PROGRAM_ADDRESS: Address<"pAMMzVPRwtrxQs2CjLTUUpfCAp9XdvVmwwVhpAuCobi">;
|
|
733
1113
|
declare enum PinaAmmAccount {
|
|
734
1114
|
AmmConfig = 0,
|
|
735
1115
|
Pool = 1
|
|
@@ -741,7 +1121,12 @@ declare enum PinaAmmEvent {
|
|
|
741
1121
|
PoolCreated = 0,
|
|
742
1122
|
Swapped = 1,
|
|
743
1123
|
LiquidityChanged = 2,
|
|
744
|
-
FeesCollected = 3
|
|
1124
|
+
FeesCollected = 3,
|
|
1125
|
+
PoolSynced = 4,
|
|
1126
|
+
PoolSyncedV0 = 5,
|
|
1127
|
+
ConfigCreated = 6,
|
|
1128
|
+
ConfigUpdated = 7,
|
|
1129
|
+
PoolCreatorChanged = 8
|
|
745
1130
|
}
|
|
746
1131
|
declare function identifyPinaAmmEvent(event: {
|
|
747
1132
|
data: ReadonlyUint8Array;
|
|
@@ -756,12 +1141,13 @@ declare enum PinaAmmInstruction {
|
|
|
756
1141
|
SwapExactOut = 6,
|
|
757
1142
|
CollectProtocolFees = 7,
|
|
758
1143
|
CollectCreatorFees = 8,
|
|
759
|
-
SetPoolCreator = 9
|
|
1144
|
+
SetPoolCreator = 9,
|
|
1145
|
+
SyncPool = 10
|
|
760
1146
|
}
|
|
761
1147
|
declare function identifyPinaAmmInstruction(instruction: {
|
|
762
1148
|
data: ReadonlyUint8Array;
|
|
763
1149
|
} | ReadonlyUint8Array): PinaAmmInstruction;
|
|
764
|
-
type ParsedPinaAmmInstruction<TProgram extends string = '
|
|
1150
|
+
type ParsedPinaAmmInstruction<TProgram extends string = 'pAMMzVPRwtrxQs2CjLTUUpfCAp9XdvVmwwVhpAuCobi'> = {
|
|
765
1151
|
instructionType: PinaAmmInstruction.CreateConfig;
|
|
766
1152
|
} & ParsedCreateConfigInstruction<TProgram> | {
|
|
767
1153
|
instructionType: PinaAmmInstruction.UpdateConfig;
|
|
@@ -781,7 +1167,9 @@ type ParsedPinaAmmInstruction<TProgram extends string = 'pAMMvXaqR2VVFqznf6dgvUF
|
|
|
781
1167
|
instructionType: PinaAmmInstruction.CollectCreatorFees;
|
|
782
1168
|
} & ParsedCollectCreatorFeesInstruction<TProgram> | {
|
|
783
1169
|
instructionType: PinaAmmInstruction.SetPoolCreator;
|
|
784
|
-
} & ParsedSetPoolCreatorInstruction<TProgram
|
|
1170
|
+
} & ParsedSetPoolCreatorInstruction<TProgram> | {
|
|
1171
|
+
instructionType: PinaAmmInstruction.SyncPool;
|
|
1172
|
+
} & ParsedSyncPoolInstruction<TProgram>;
|
|
785
1173
|
declare function parsePinaAmmInstruction<TProgram extends string>(instruction: Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array>): ParsedPinaAmmInstruction<TProgram>;
|
|
786
1174
|
type PinaAmmPlugin = {
|
|
787
1175
|
accounts: PinaAmmPluginAccounts;
|
|
@@ -806,6 +1194,7 @@ type PinaAmmPluginInstructions = {
|
|
|
806
1194
|
collectProtocolFees: (input: CollectProtocolFeesInput) => ReturnType<typeof getCollectProtocolFeesInstruction> & SelfPlanAndSendFunctions;
|
|
807
1195
|
collectCreatorFees: (input: CollectCreatorFeesInput) => ReturnType<typeof getCollectCreatorFeesInstruction> & SelfPlanAndSendFunctions;
|
|
808
1196
|
setPoolCreator: (input: SetPoolCreatorInput) => ReturnType<typeof getSetPoolCreatorInstruction> & SelfPlanAndSendFunctions;
|
|
1197
|
+
syncPool: (input: SyncPoolInput) => ReturnType<typeof getSyncPoolInstruction> & SelfPlanAndSendFunctions;
|
|
809
1198
|
};
|
|
810
1199
|
type PinaAmmPluginPdas = {
|
|
811
1200
|
ammConfig: typeof findAmmConfigPda;
|
|
@@ -1598,6 +1987,57 @@ type ParsedSwapExactOutInstruction<TProgram extends string = typeof PINA_AMM_PRO
|
|
|
1598
1987
|
};
|
|
1599
1988
|
declare function parseSwapExactOutInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSwapExactOutInstruction<TProgram, TAccountMetas>;
|
|
1600
1989
|
|
|
1990
|
+
/**
|
|
1991
|
+
* This code was AUTOGENERATED using the Codama library.
|
|
1992
|
+
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
1993
|
+
* to add features, then rerun Codama to update it.
|
|
1994
|
+
*
|
|
1995
|
+
* @see https://github.com/codama-idl/codama
|
|
1996
|
+
*/
|
|
1997
|
+
|
|
1998
|
+
declare const SYNC_POOL_DISCRIMINATOR = 10;
|
|
1999
|
+
declare function getSyncPoolDiscriminatorBytes(): ReadonlyUint8Array;
|
|
2000
|
+
type SyncPoolInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountPool extends string | AccountMeta<string> = string, TAccountVault0 extends string | AccountMeta<string> = string, TAccountVault1 extends string | AccountMeta<string> = string, TAccountTokenProgram0 extends string | AccountMeta<string> = string, TAccountTokenProgram1 extends string | AccountMeta<string> = string, TRemainingAccounts extends readonly AccountMeta<string>[] = []> = Instruction<TProgram> & InstructionWithData<ReadonlyUint8Array> & InstructionWithAccounts<[TAccountPool extends string ? WritableAccount<TAccountPool> : TAccountPool, TAccountVault0 extends string ? ReadonlyAccount<TAccountVault0> : TAccountVault0, TAccountVault1 extends string ? ReadonlyAccount<TAccountVault1> : TAccountVault1, TAccountTokenProgram0 extends string ? ReadonlyAccount<TAccountTokenProgram0> : TAccountTokenProgram0, TAccountTokenProgram1 extends string ? ReadonlyAccount<TAccountTokenProgram1> : TAccountTokenProgram1, ...TRemainingAccounts]>;
|
|
2001
|
+
type SyncPoolInstructionData = {
|
|
2002
|
+
discriminator: number;
|
|
2003
|
+
};
|
|
2004
|
+
type SyncPoolInstructionDataArgs = {};
|
|
2005
|
+
declare function getSyncPoolInstructionDataEncoder(): FixedSizeEncoder<SyncPoolInstructionDataArgs>;
|
|
2006
|
+
declare function getSyncPoolInstructionDataDecoder(): FixedSizeDecoder<SyncPoolInstructionData>;
|
|
2007
|
+
declare function getSyncPoolInstructionDataCodec(): FixedSizeCodec<SyncPoolInstructionDataArgs, SyncPoolInstructionData>;
|
|
2008
|
+
type SyncPoolInput<TAccountPool extends InstructionAccountInput = InstructionAccountInput, TAccountVault0 extends InstructionAccountInput = InstructionAccountInput, TAccountVault1 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput = InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput = InstructionAccountInput> = {
|
|
2009
|
+
/** The pool whose accumulator is advanced. */
|
|
2010
|
+
pool: TAccountPool;
|
|
2011
|
+
/** The pool's token 0 vault. */
|
|
2012
|
+
vault0: TAccountVault0;
|
|
2013
|
+
/** The pool's token 1 vault. */
|
|
2014
|
+
vault1: TAccountVault1;
|
|
2015
|
+
/** Token program that owns token 0. */
|
|
2016
|
+
tokenProgram0: TAccountTokenProgram0;
|
|
2017
|
+
/** Token program that owns token 1. */
|
|
2018
|
+
tokenProgram1: TAccountTokenProgram1;
|
|
2019
|
+
};
|
|
2020
|
+
declare function getSyncPoolInstruction<TAccountPool extends InstructionAccountInput, TAccountVault0 extends InstructionAccountInput, TAccountVault1 extends InstructionAccountInput, TAccountTokenProgram0 extends InstructionAccountInput, TAccountTokenProgram1 extends InstructionAccountInput, TProgramAddress extends Address = typeof PINA_AMM_PROGRAM_ADDRESS>(input: SyncPoolInput<TAccountPool, TAccountVault0, TAccountVault1, TAccountTokenProgram0, TAccountTokenProgram1>, config?: {
|
|
2021
|
+
programAddress?: TProgramAddress;
|
|
2022
|
+
}): SyncPoolInstruction<TProgramAddress, ResolvedInstructionAccountMeta<TAccountPool, InstructionAccountInputAddress<TAccountPool>>, ResolvedInstructionAccountMeta<TAccountVault0, InstructionAccountInputAddress<TAccountVault0>>, ResolvedInstructionAccountMeta<TAccountVault1, InstructionAccountInputAddress<TAccountVault1>>, ResolvedInstructionAccountMeta<TAccountTokenProgram0, InstructionAccountInputAddress<TAccountTokenProgram0>>, ResolvedInstructionAccountMeta<TAccountTokenProgram1, InstructionAccountInputAddress<TAccountTokenProgram1>>>;
|
|
2023
|
+
type ParsedSyncPoolInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM_ADDRESS, TAccountMetas extends readonly AccountMeta[] = readonly AccountMeta[]> = {
|
|
2024
|
+
programAddress: Address<TProgram>;
|
|
2025
|
+
accounts: {
|
|
2026
|
+
/** The pool whose accumulator is advanced. */
|
|
2027
|
+
pool: TAccountMetas[0];
|
|
2028
|
+
/** The pool's token 0 vault. */
|
|
2029
|
+
vault0: TAccountMetas[1];
|
|
2030
|
+
/** The pool's token 1 vault. */
|
|
2031
|
+
vault1: TAccountMetas[2];
|
|
2032
|
+
/** Token program that owns token 0. */
|
|
2033
|
+
tokenProgram0: TAccountMetas[3];
|
|
2034
|
+
/** Token program that owns token 1. */
|
|
2035
|
+
tokenProgram1: TAccountMetas[4];
|
|
2036
|
+
};
|
|
2037
|
+
data: SyncPoolInstructionData;
|
|
2038
|
+
};
|
|
2039
|
+
declare function parseSyncPoolInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedSyncPoolInstruction<TProgram, TAccountMetas>;
|
|
2040
|
+
|
|
1601
2041
|
/**
|
|
1602
2042
|
* This code was AUTOGENERATED using the Codama library.
|
|
1603
2043
|
* Please DO NOT EDIT THIS FILE, instead use visitors
|
|
@@ -1749,4 +2189,4 @@ type ParsedWithdrawInstruction<TProgram extends string = typeof PINA_AMM_PROGRAM
|
|
|
1749
2189
|
};
|
|
1750
2190
|
declare function parseWithdrawInstruction<TProgram extends string, TAccountMetas extends readonly AccountMeta[]>(instruction: Instruction<TProgram> & InstructionWithAccounts<TAccountMetas> & InstructionWithData<ReadonlyUint8Array>): ParsedWithdrawInstruction<TProgram, TAccountMetas>;
|
|
1751
2191
|
|
|
1752
|
-
export { AMM_CONFIG_DISCRIMINATOR, AMM_CONFIG_DISCRIMINATOR2, AMM_CONFIG_MIGRATION_VERSION, type AmmConfig, type AmmConfigArgs, type AmmConfigSeeds, COLLECT_CREATOR_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CREATE_CONFIG_DISCRIMINATOR, CREATE_POOL_DISCRIMINATOR, type CollectCreatorFeesInput, type CollectCreatorFeesInstruction, type CollectCreatorFeesInstructionData, type CollectCreatorFeesInstructionDataArgs, type CollectProtocolFeesInput, type CollectProtocolFeesInstruction, type CollectProtocolFeesInstructionData, type CollectProtocolFeesInstructionDataArgs, type CreateConfigInput, type CreateConfigInstruction, type CreateConfigInstructionData, type CreateConfigInstructionDataArgs, type CreatePoolAsyncInput, type CreatePoolInput, type CreatePoolInstruction, type CreatePoolInstructionData, type CreatePoolInstructionDataArgs, DEPOSIT_DISCRIMINATOR, type DecodedFeesCollectedEvent, type DecodedLiquidityChangedEvent, type DecodedPinaAmmEvent, type DecodedPoolCreatedEvent, type DecodedSwappedEvent, type DepositInput, type DepositInstruction, type DepositInstructionData, type DepositInstructionDataArgs, FEES_COLLECTED_EVENT_DISCRIMINATOR, FEES_COLLECTED_EVENT_DISCRIMINATOR2, type FeesCollectedEvent, type FeesCollectedEventArgs, LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR, LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR2, type LiquidityChangedEvent, type LiquidityChangedEventArgs, MIGRATE_DISCRIMINATOR, type MigrateInput, type MigrateInstruction, PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY, PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY, PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE, PINA_AMM_ERROR__INVALID_FEE_RATES, PINA_AMM_ERROR__INVALID_MINT_ORDER, PINA_AMM_ERROR__INVALID_PROGRAM_DATA, PINA_AMM_ERROR__INVARIANT_VIOLATION, PINA_AMM_ERROR__MATH_OVERFLOW, PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH, PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED, PINA_AMM_ERROR__SLIPPAGE_EXCEEDED, PINA_AMM_ERROR__UNAUTHORIZED, PINA_AMM_ERROR__UNSUPPORTED_MINT, PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH, PINA_AMM_ERROR__ZERO_AMOUNT, PINA_AMM_EVENT_SOURCE_ADDRESS, PINA_AMM_PROGRAM_ADDRESS, POOL_CREATED_EVENT_DISCRIMINATOR, POOL_CREATED_EVENT_DISCRIMINATOR2, POOL_DISCRIMINATOR, POOL_DISCRIMINATOR2, POOL_MIGRATION_VERSION, type ParsedCollectCreatorFeesInstruction, type ParsedCollectProtocolFeesInstruction, type ParsedCreateConfigInstruction, type ParsedCreatePoolInstruction, type ParsedDepositInstruction, type ParsedPinaAmmInstruction, type ParsedSetPoolCreatorInstruction, type ParsedSwapExactInInstruction, type ParsedSwapExactOutInstruction, type ParsedUpdateConfigInstruction, type ParsedWithdrawInstruction, PinaAmmAccount, type PinaAmmError, PinaAmmEvent, PinaAmmInstruction, type PinaAmmPlugin, type PinaAmmPluginAccounts, type PinaAmmPluginInstructions, type PinaAmmPluginPdas, type PinaAmmPluginRequirements, type Pool, type PoolArgs, type PoolCreatedEvent, type PoolCreatedEventArgs, type PoolLpMintSeeds, type PoolSeeds, type PoolVaultSeeds, SET_POOL_CREATOR_DISCRIMINATOR, SWAPPED_EVENT_DISCRIMINATOR, SWAPPED_EVENT_DISCRIMINATOR2, SWAP_EXACT_IN_DISCRIMINATOR, SWAP_EXACT_OUT_DISCRIMINATOR, type SetPoolCreatorInput, type SetPoolCreatorInstruction, type SetPoolCreatorInstructionData, type SetPoolCreatorInstructionDataArgs, type SwapExactInInput, type SwapExactInInstruction, type SwapExactInInstructionData, type SwapExactInInstructionDataArgs, type SwapExactOutInput, type SwapExactOutInstruction, type SwapExactOutInstructionData, type SwapExactOutInstructionDataArgs, type SwappedEvent, type SwappedEventArgs, UPDATE_CONFIG_DISCRIMINATOR, type UpdateConfigInput, type UpdateConfigInstruction, type UpdateConfigInstructionData, type UpdateConfigInstructionDataArgs, WITHDRAW_DISCRIMINATOR, type WithdrawInput, type WithdrawInstruction, type WithdrawInstructionData, type WithdrawInstructionDataArgs, ammConfigNeedsMigration, decodeAmmConfig, decodeFeesCollectedEvent, decodeLiquidityChangedEvent, decodePool, decodePoolCreatedEvent, decodeSwappedEvent, fetchAllAmmConfig, fetchAllMaybeAmmConfig, fetchAllMaybePool, fetchAllPool, fetchAmmConfig, fetchAmmConfigFromSeeds, fetchMaybeAmmConfig, fetchMaybeAmmConfigFromSeeds, fetchMaybePool, fetchMaybePoolFromSeeds, fetchPool, fetchPoolFromSeeds, findAmmConfigPda, findPoolLpMintPda, findPoolPda, findPoolVaultPda, getAmmConfigCodec, getAmmConfigDecoder, getAmmConfigDiscriminator2Bytes, getAmmConfigDiscriminatorBytes, getAmmConfigEncoder, getCollectCreatorFeesDiscriminatorBytes, getCollectCreatorFeesInstruction, getCollectCreatorFeesInstructionDataCodec, getCollectCreatorFeesInstructionDataDecoder, getCollectCreatorFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getCreateConfigDiscriminatorBytes, getCreateConfigInstruction, getCreateConfigInstructionDataCodec, getCreateConfigInstructionDataDecoder, getCreateConfigInstructionDataEncoder, getCreatePoolDiscriminatorBytes, getCreatePoolInstruction, getCreatePoolInstructionAsync, getCreatePoolInstructionDataCodec, getCreatePoolInstructionDataDecoder, getCreatePoolInstructionDataEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getFeesCollectedEventCodec, getFeesCollectedEventDecoder, getFeesCollectedEventDiscriminator2Bytes, getFeesCollectedEventDiscriminatorBytes, getFeesCollectedEventEncoder, getLiquidityChangedEventCodec, getLiquidityChangedEventDecoder, getLiquidityChangedEventDiscriminator2Bytes, getLiquidityChangedEventDiscriminatorBytes, getLiquidityChangedEventEncoder, getMigrateDiscriminatorBytes, getMigrateInstruction, getPinaAmmErrorMessage, getPoolCodec, getPoolCreatedEventCodec, getPoolCreatedEventDecoder, getPoolCreatedEventDiscriminator2Bytes, getPoolCreatedEventDiscriminatorBytes, getPoolCreatedEventEncoder, getPoolDecoder, getPoolDiscriminator2Bytes, getPoolDiscriminatorBytes, getPoolEncoder, getSetPoolCreatorDiscriminatorBytes, getSetPoolCreatorInstruction, getSetPoolCreatorInstructionDataCodec, getSetPoolCreatorInstructionDataDecoder, getSetPoolCreatorInstructionDataEncoder, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapExactOutDiscriminatorBytes, getSwapExactOutInstruction, getSwapExactOutInstructionDataCodec, getSwapExactOutInstructionDataDecoder, getSwapExactOutInstructionDataEncoder, getSwappedEventCodec, getSwappedEventDecoder, getSwappedEventDiscriminator2Bytes, getSwappedEventDiscriminatorBytes, getSwappedEventEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawDiscriminatorBytes, getWithdrawInstruction, getWithdrawInstructionDataCodec, getWithdrawInstructionDataDecoder, getWithdrawInstructionDataEncoder, identifyPinaAmmAccount, identifyPinaAmmEvent, identifyPinaAmmInstruction, isPinaAmmError, parseCollectCreatorFeesInstruction, parseCollectProtocolFeesInstruction, parseCreateConfigInstruction, parseCreatePoolInstruction, parseDepositInstruction, parseFeesCollectedEvent, parseFeesCollectedEventFromLog, parseLiquidityChangedEvent, parseLiquidityChangedEventFromLog, parsePinaAmmEventsFromLogs, parsePinaAmmInstruction, parsePoolCreatedEvent, parsePoolCreatedEventFromLog, parseSetPoolCreatorInstruction, parseSwapExactInInstruction, parseSwapExactOutInstruction, parseSwappedEvent, parseSwappedEventFromLog, parseUpdateConfigInstruction, parseWithdrawInstruction, pinaAmmProgram, poolNeedsMigration };
|
|
2192
|
+
export { AMM_CONFIG_DISCRIMINATOR, AMM_CONFIG_DISCRIMINATOR2, AMM_CONFIG_MIGRATION_VERSION, type AmmConfig, type AmmConfigArgs, type AmmConfigSeeds, COLLECT_CREATOR_FEES_DISCRIMINATOR, COLLECT_PROTOCOL_FEES_DISCRIMINATOR, CONFIG_CREATED_EVENT_DISCRIMINATOR, CONFIG_CREATED_EVENT_DISCRIMINATOR2, CONFIG_UPDATED_EVENT_DISCRIMINATOR, CONFIG_UPDATED_EVENT_DISCRIMINATOR2, CREATE_CONFIG_DISCRIMINATOR, CREATE_POOL_DISCRIMINATOR, type CollectCreatorFeesInput, type CollectCreatorFeesInstruction, type CollectCreatorFeesInstructionData, type CollectCreatorFeesInstructionDataArgs, type CollectProtocolFeesInput, type CollectProtocolFeesInstruction, type CollectProtocolFeesInstructionData, type CollectProtocolFeesInstructionDataArgs, type ConfigCreatedEvent, type ConfigCreatedEventArgs, type ConfigUpdatedEvent, type ConfigUpdatedEventArgs, type CreateConfigInput, type CreateConfigInstruction, type CreateConfigInstructionData, type CreateConfigInstructionDataArgs, type CreatePoolAsyncInput, type CreatePoolInput, type CreatePoolInstruction, type CreatePoolInstructionData, type CreatePoolInstructionDataArgs, DEPOSIT_DISCRIMINATOR, type DecodedConfigCreatedEvent, type DecodedConfigUpdatedEvent, type DecodedFeesCollectedEvent, type DecodedLiquidityChangedEvent, type DecodedPinaAmmEvent, type DecodedPoolCreatedEvent, type DecodedPoolCreatorChangedEvent, type DecodedPoolSyncedEvent, type DecodedPoolSyncedV0Event, type DecodedSwappedEvent, type DepositInput, type DepositInstruction, type DepositInstructionData, type DepositInstructionDataArgs, FEES_COLLECTED_EVENT_DISCRIMINATOR, FEES_COLLECTED_EVENT_DISCRIMINATOR2, type FeesCollectedEvent, type FeesCollectedEventArgs, LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR, LIQUIDITY_CHANGED_EVENT_DISCRIMINATOR2, type LiquidityChangedEvent, type LiquidityChangedEventArgs, MIGRATE_DISCRIMINATOR, type MigrateInput, type MigrateInstruction, PINA_AMM_ERROR__DEFAULT_CREATOR, PINA_AMM_ERROR__INSUFFICIENT_INITIAL_LIQUIDITY, PINA_AMM_ERROR__INSUFFICIENT_LIQUIDITY, PINA_AMM_ERROR__INVALID_CREATOR_FEE_MODE, PINA_AMM_ERROR__INVALID_FEE_RATES, PINA_AMM_ERROR__INVALID_MINT_ORDER, PINA_AMM_ERROR__INVALID_PROGRAM_DATA, PINA_AMM_ERROR__INVARIANT_VIOLATION, PINA_AMM_ERROR__MATH_OVERFLOW, PINA_AMM_ERROR__POOL_ACCOUNT_MISMATCH, PINA_AMM_ERROR__POOL_CREATOR_NOT_AUTHORIZED, PINA_AMM_ERROR__SLIPPAGE_EXCEEDED, PINA_AMM_ERROR__UNAUTHORIZED, PINA_AMM_ERROR__UNSUPPORTED_MINT, PINA_AMM_ERROR__VAULT_ACCOUNTING_MISMATCH, PINA_AMM_ERROR__ZERO_AMOUNT, PINA_AMM_EVENT_SOURCE_ADDRESS, PINA_AMM_PROGRAM_ADDRESS, POOL_CREATED_EVENT_DISCRIMINATOR, POOL_CREATED_EVENT_DISCRIMINATOR2, POOL_CREATOR_CHANGED_EVENT_DISCRIMINATOR, POOL_CREATOR_CHANGED_EVENT_DISCRIMINATOR2, POOL_DISCRIMINATOR, POOL_DISCRIMINATOR2, POOL_MIGRATION_VERSION, POOL_SYNCED_EVENT_DISCRIMINATOR, POOL_SYNCED_EVENT_DISCRIMINATOR2, POOL_SYNCED_V0_EVENT_DISCRIMINATOR, POOL_SYNCED_V0_EVENT_DISCRIMINATOR2, type ParsedCollectCreatorFeesInstruction, type ParsedCollectProtocolFeesInstruction, type ParsedCreateConfigInstruction, type ParsedCreatePoolInstruction, type ParsedDepositInstruction, type ParsedPinaAmmInstruction, type ParsedSetPoolCreatorInstruction, type ParsedSwapExactInInstruction, type ParsedSwapExactOutInstruction, type ParsedSyncPoolInstruction, type ParsedUpdateConfigInstruction, type ParsedWithdrawInstruction, PinaAmmAccount, type PinaAmmError, PinaAmmEvent, PinaAmmInstruction, type PinaAmmPlugin, type PinaAmmPluginAccounts, type PinaAmmPluginInstructions, type PinaAmmPluginPdas, type PinaAmmPluginRequirements, type Pool, type PoolArgs, type PoolCreatedEvent, type PoolCreatedEventArgs, type PoolCreatorChangedEvent, type PoolCreatorChangedEventArgs, type PoolLpMintSeeds, type PoolSeeds, type PoolSyncedEvent, type PoolSyncedEventArgs, type PoolSyncedV0Event, type PoolSyncedV0EventArgs, type PoolVaultSeeds, SET_POOL_CREATOR_DISCRIMINATOR, SWAPPED_EVENT_DISCRIMINATOR, SWAPPED_EVENT_DISCRIMINATOR2, SWAP_EXACT_IN_DISCRIMINATOR, SWAP_EXACT_OUT_DISCRIMINATOR, SYNC_POOL_DISCRIMINATOR, type SetPoolCreatorInput, type SetPoolCreatorInstruction, type SetPoolCreatorInstructionData, type SetPoolCreatorInstructionDataArgs, type SwapExactInInput, type SwapExactInInstruction, type SwapExactInInstructionData, type SwapExactInInstructionDataArgs, type SwapExactOutInput, type SwapExactOutInstruction, type SwapExactOutInstructionData, type SwapExactOutInstructionDataArgs, type SwappedEvent, type SwappedEventArgs, type SyncPoolInput, type SyncPoolInstruction, type SyncPoolInstructionData, type SyncPoolInstructionDataArgs, UPDATE_CONFIG_DISCRIMINATOR, type UpdateConfigInput, type UpdateConfigInstruction, type UpdateConfigInstructionData, type UpdateConfigInstructionDataArgs, WITHDRAW_DISCRIMINATOR, type WithdrawInput, type WithdrawInstruction, type WithdrawInstructionData, type WithdrawInstructionDataArgs, ammConfigNeedsMigration, decodeAmmConfig, decodeConfigCreatedEvent, decodeConfigUpdatedEvent, decodeFeesCollectedEvent, decodeLiquidityChangedEvent, decodePool, decodePoolCreatedEvent, decodePoolCreatorChangedEvent, decodePoolSyncedEvent, decodePoolSyncedV0Event, decodeSwappedEvent, fetchAllAmmConfig, fetchAllMaybeAmmConfig, fetchAllMaybePool, fetchAllPool, fetchAmmConfig, fetchAmmConfigFromSeeds, fetchMaybeAmmConfig, fetchMaybeAmmConfigFromSeeds, fetchMaybePool, fetchMaybePoolFromSeeds, fetchPool, fetchPoolFromSeeds, findAmmConfigPda, findPoolLpMintPda, findPoolPda, findPoolVaultPda, getAmmConfigCodec, getAmmConfigDecoder, getAmmConfigDiscriminator2Bytes, getAmmConfigDiscriminatorBytes, getAmmConfigEncoder, getCollectCreatorFeesDiscriminatorBytes, getCollectCreatorFeesInstruction, getCollectCreatorFeesInstructionDataCodec, getCollectCreatorFeesInstructionDataDecoder, getCollectCreatorFeesInstructionDataEncoder, getCollectProtocolFeesDiscriminatorBytes, getCollectProtocolFeesInstruction, getCollectProtocolFeesInstructionDataCodec, getCollectProtocolFeesInstructionDataDecoder, getCollectProtocolFeesInstructionDataEncoder, getConfigCreatedEventCodec, getConfigCreatedEventDecoder, getConfigCreatedEventDiscriminator2Bytes, getConfigCreatedEventDiscriminatorBytes, getConfigCreatedEventEncoder, getConfigUpdatedEventCodec, getConfigUpdatedEventDecoder, getConfigUpdatedEventDiscriminator2Bytes, getConfigUpdatedEventDiscriminatorBytes, getConfigUpdatedEventEncoder, getCreateConfigDiscriminatorBytes, getCreateConfigInstruction, getCreateConfigInstructionDataCodec, getCreateConfigInstructionDataDecoder, getCreateConfigInstructionDataEncoder, getCreatePoolDiscriminatorBytes, getCreatePoolInstruction, getCreatePoolInstructionAsync, getCreatePoolInstructionDataCodec, getCreatePoolInstructionDataDecoder, getCreatePoolInstructionDataEncoder, getDepositDiscriminatorBytes, getDepositInstruction, getDepositInstructionDataCodec, getDepositInstructionDataDecoder, getDepositInstructionDataEncoder, getFeesCollectedEventCodec, getFeesCollectedEventDecoder, getFeesCollectedEventDiscriminator2Bytes, getFeesCollectedEventDiscriminatorBytes, getFeesCollectedEventEncoder, getLiquidityChangedEventCodec, getLiquidityChangedEventDecoder, getLiquidityChangedEventDiscriminator2Bytes, getLiquidityChangedEventDiscriminatorBytes, getLiquidityChangedEventEncoder, getMigrateDiscriminatorBytes, getMigrateInstruction, getPinaAmmErrorMessage, getPoolCodec, getPoolCreatedEventCodec, getPoolCreatedEventDecoder, getPoolCreatedEventDiscriminator2Bytes, getPoolCreatedEventDiscriminatorBytes, getPoolCreatedEventEncoder, getPoolCreatorChangedEventCodec, getPoolCreatorChangedEventDecoder, getPoolCreatorChangedEventDiscriminator2Bytes, getPoolCreatorChangedEventDiscriminatorBytes, getPoolCreatorChangedEventEncoder, getPoolDecoder, getPoolDiscriminator2Bytes, getPoolDiscriminatorBytes, getPoolEncoder, getPoolSyncedEventCodec, getPoolSyncedEventDecoder, getPoolSyncedEventDiscriminator2Bytes, getPoolSyncedEventDiscriminatorBytes, getPoolSyncedEventEncoder, getPoolSyncedV0EventCodec, getPoolSyncedV0EventDecoder, getPoolSyncedV0EventDiscriminator2Bytes, getPoolSyncedV0EventDiscriminatorBytes, getPoolSyncedV0EventEncoder, getSetPoolCreatorDiscriminatorBytes, getSetPoolCreatorInstruction, getSetPoolCreatorInstructionDataCodec, getSetPoolCreatorInstructionDataDecoder, getSetPoolCreatorInstructionDataEncoder, getSwapExactInDiscriminatorBytes, getSwapExactInInstruction, getSwapExactInInstructionDataCodec, getSwapExactInInstructionDataDecoder, getSwapExactInInstructionDataEncoder, getSwapExactOutDiscriminatorBytes, getSwapExactOutInstruction, getSwapExactOutInstructionDataCodec, getSwapExactOutInstructionDataDecoder, getSwapExactOutInstructionDataEncoder, getSwappedEventCodec, getSwappedEventDecoder, getSwappedEventDiscriminator2Bytes, getSwappedEventDiscriminatorBytes, getSwappedEventEncoder, getSyncPoolDiscriminatorBytes, getSyncPoolInstruction, getSyncPoolInstructionDataCodec, getSyncPoolInstructionDataDecoder, getSyncPoolInstructionDataEncoder, getUpdateConfigDiscriminatorBytes, getUpdateConfigInstruction, getUpdateConfigInstructionDataCodec, getUpdateConfigInstructionDataDecoder, getUpdateConfigInstructionDataEncoder, getWithdrawDiscriminatorBytes, getWithdrawInstruction, getWithdrawInstructionDataCodec, getWithdrawInstructionDataDecoder, getWithdrawInstructionDataEncoder, identifyPinaAmmAccount, identifyPinaAmmEvent, identifyPinaAmmInstruction, isPinaAmmError, parseCollectCreatorFeesInstruction, parseCollectProtocolFeesInstruction, parseConfigCreatedEvent, parseConfigCreatedEventFromLog, parseConfigUpdatedEvent, parseConfigUpdatedEventFromLog, parseCreateConfigInstruction, parseCreatePoolInstruction, parseDepositInstruction, parseFeesCollectedEvent, parseFeesCollectedEventFromLog, parseLiquidityChangedEvent, parseLiquidityChangedEventFromLog, parsePinaAmmEventsFromLogs, parsePinaAmmInstruction, parsePoolCreatedEvent, parsePoolCreatedEventFromLog, parsePoolCreatorChangedEvent, parsePoolCreatorChangedEventFromLog, parsePoolSyncedEvent, parsePoolSyncedEventFromLog, parsePoolSyncedV0Event, parsePoolSyncedV0EventFromLog, parseSetPoolCreatorInstruction, parseSwapExactInInstruction, parseSwapExactOutInstruction, parseSwappedEvent, parseSwappedEventFromLog, parseSyncPoolInstruction, parseUpdateConfigInstruction, parseWithdrawInstruction, pinaAmmProgram, poolNeedsMigration };
|