@jup-ag/lend 0.2.0-beta.1 → 0.2.0-beta.3
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/borrow/index.d.mts +162 -4
- package/dist/borrow/index.d.ts +162 -4
- package/dist/borrow/index.mjs +6 -3
- package/dist/dex/index.d.mts +247 -8
- package/dist/dex/index.d.ts +247 -8
- package/dist/dex/index.mjs +356 -27
- package/dist/earn/index.d.mts +23 -14
- package/dist/earn/index.d.ts +23 -14
- package/dist/earn/index.mjs +48 -2215
- package/dist/flashloan/index.d.mts +0 -1
- package/dist/flashloan/index.d.ts +0 -1
- package/dist/flashloan/index.mjs +6 -111
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.mjs +3 -3
- package/dist/refinance/index.d.mts +1 -2
- package/dist/refinance/index.d.ts +1 -2
- package/dist/refinance/index.mjs +4 -2
- package/dist/shared/lend.B80NmXTG.mjs +2184 -0
- package/dist/shared/lend.CS-bkwRq.mjs +867 -0
- package/dist/shared/{lend.CTcB5yyK.mjs → lend.CVtn-ehf.mjs} +300 -1332
- package/dist/shared/{lend.BT41yQVJ.d.mts → lend.CdoFqRFx.d.mts} +168 -474
- package/dist/shared/{lend.BT41yQVJ.d.ts → lend.CdoFqRFx.d.ts} +168 -474
- package/dist/shared/{lend.ByiEG4eI.mjs → lend.a53XYkl5.mjs} +1 -1
- package/dist/shared/lend.s0kjiHy3.mjs +29 -0
- package/package.json +1 -1
- package/dist/shared/lend.BC5Y1398.mjs +0 -18
package/dist/dex/index.d.mts
CHANGED
|
@@ -530,6 +530,23 @@ type Dex = {
|
|
|
530
530
|
];
|
|
531
531
|
};
|
|
532
532
|
},
|
|
533
|
+
{
|
|
534
|
+
name: "dexMetadata";
|
|
535
|
+
writable: true;
|
|
536
|
+
pda: {
|
|
537
|
+
seeds: [
|
|
538
|
+
{
|
|
539
|
+
kind: "const";
|
|
540
|
+
value: [100, 101, 120, 95, 109, 101, 116, 97, 100, 97, 116, 97];
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
kind: "account";
|
|
544
|
+
path: "dex_admin.next_dex_id";
|
|
545
|
+
account: "dexAdmin";
|
|
546
|
+
}
|
|
547
|
+
];
|
|
548
|
+
};
|
|
549
|
+
},
|
|
533
550
|
{
|
|
534
551
|
name: "token0";
|
|
535
552
|
},
|
|
@@ -589,6 +606,65 @@ type Dex = {
|
|
|
589
606
|
}
|
|
590
607
|
];
|
|
591
608
|
},
|
|
609
|
+
{
|
|
610
|
+
name: "initDexMetadata";
|
|
611
|
+
discriminator: [114, 167, 144, 220, 143, 73, 224, 8];
|
|
612
|
+
accounts: [
|
|
613
|
+
{
|
|
614
|
+
name: "authority";
|
|
615
|
+
writable: true;
|
|
616
|
+
signer: true;
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: "dexAdmin";
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: "dex";
|
|
623
|
+
pda: {
|
|
624
|
+
seeds: [
|
|
625
|
+
{
|
|
626
|
+
kind: "const";
|
|
627
|
+
value: [100, 101, 120];
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
kind: "arg";
|
|
631
|
+
path: "dexId";
|
|
632
|
+
}
|
|
633
|
+
];
|
|
634
|
+
};
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: "dexMetadata";
|
|
638
|
+
writable: true;
|
|
639
|
+
pda: {
|
|
640
|
+
seeds: [
|
|
641
|
+
{
|
|
642
|
+
kind: "const";
|
|
643
|
+
value: [100, 101, 120, 95, 109, 101, 116, 97, 100, 97, 116, 97];
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
kind: "arg";
|
|
647
|
+
path: "dexId";
|
|
648
|
+
}
|
|
649
|
+
];
|
|
650
|
+
};
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
name: "systemProgram";
|
|
654
|
+
address: "11111111111111111111111111111111";
|
|
655
|
+
}
|
|
656
|
+
];
|
|
657
|
+
args: [
|
|
658
|
+
{
|
|
659
|
+
name: "dexId";
|
|
660
|
+
type: "u16";
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: "lookupTable";
|
|
664
|
+
type: "pubkey";
|
|
665
|
+
}
|
|
666
|
+
];
|
|
667
|
+
},
|
|
592
668
|
{
|
|
593
669
|
name: "initPosition";
|
|
594
670
|
discriminator: [197, 20, 10, 1, 97, 160, 177, 91];
|
|
@@ -1756,6 +1832,34 @@ type Dex = {
|
|
|
1756
1832
|
}
|
|
1757
1833
|
];
|
|
1758
1834
|
},
|
|
1835
|
+
{
|
|
1836
|
+
name: "updateDexLookupTable";
|
|
1837
|
+
discriminator: [87, 149, 96, 95, 24, 20, 211, 43];
|
|
1838
|
+
accounts: [
|
|
1839
|
+
{
|
|
1840
|
+
name: "authority";
|
|
1841
|
+
signer: true;
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
name: "dexAdmin";
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
name: "dexMetadata";
|
|
1848
|
+
docs: ["@dev Verification inside instruction logic"];
|
|
1849
|
+
writable: true;
|
|
1850
|
+
}
|
|
1851
|
+
];
|
|
1852
|
+
args: [
|
|
1853
|
+
{
|
|
1854
|
+
name: "dexId";
|
|
1855
|
+
type: "u16";
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
name: "lookupTable";
|
|
1859
|
+
type: "pubkey";
|
|
1860
|
+
}
|
|
1861
|
+
];
|
|
1862
|
+
},
|
|
1759
1863
|
{
|
|
1760
1864
|
name: "updateFeeAndRevenueCut";
|
|
1761
1865
|
discriminator: [223, 251, 181, 7, 34, 61, 183, 122];
|
|
@@ -2380,6 +2484,10 @@ type Dex = {
|
|
|
2380
2484
|
name: "dexAdmin";
|
|
2381
2485
|
discriminator: [82, 155, 122, 221, 230, 96, 118, 155];
|
|
2382
2486
|
},
|
|
2487
|
+
{
|
|
2488
|
+
name: "dexMetadata";
|
|
2489
|
+
discriminator: [177, 231, 57, 253, 64, 12, 205, 37];
|
|
2490
|
+
},
|
|
2383
2491
|
{
|
|
2384
2492
|
name: "dexPosition";
|
|
2385
2493
|
discriminator: [30, 36, 219, 78, 189, 173, 170, 47];
|
|
@@ -2422,6 +2530,10 @@ type Dex = {
|
|
|
2422
2530
|
name: "logInitDex";
|
|
2423
2531
|
discriminator: [170, 65, 241, 125, 34, 194, 79, 132];
|
|
2424
2532
|
},
|
|
2533
|
+
{
|
|
2534
|
+
name: "logInitDexMetadata";
|
|
2535
|
+
discriminator: [53, 61, 248, 111, 245, 219, 167, 73];
|
|
2536
|
+
},
|
|
2425
2537
|
{
|
|
2426
2538
|
name: "logInitDexPriceParams";
|
|
2427
2539
|
discriminator: [154, 98, 101, 72, 8, 203, 37, 200];
|
|
@@ -2490,6 +2602,10 @@ type Dex = {
|
|
|
2490
2602
|
name: "logUpdateCenterPriceLimits";
|
|
2491
2603
|
discriminator: [111, 228, 61, 31, 234, 76, 5, 17];
|
|
2492
2604
|
},
|
|
2605
|
+
{
|
|
2606
|
+
name: "logUpdateDexLookupTable";
|
|
2607
|
+
discriminator: [135, 31, 232, 96, 2, 64, 116, 229];
|
|
2608
|
+
},
|
|
2493
2609
|
{
|
|
2494
2610
|
name: "logUpdateFeeAndRevenueCut";
|
|
2495
2611
|
discriminator: [187, 9, 16, 229, 8, 231, 7, 171];
|
|
@@ -2954,6 +3070,11 @@ type Dex = {
|
|
|
2954
3070
|
code: 6082;
|
|
2955
3071
|
name: "dexSwapOutResult";
|
|
2956
3072
|
msg: "dexSwapOutResult";
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
code: 6083;
|
|
3076
|
+
name: "dexAdminDexIdMismatch";
|
|
3077
|
+
msg: "dexAdminDexIdMismatch";
|
|
2957
3078
|
}
|
|
2958
3079
|
];
|
|
2959
3080
|
types: [
|
|
@@ -3217,6 +3338,28 @@ type Dex = {
|
|
|
3217
3338
|
];
|
|
3218
3339
|
};
|
|
3219
3340
|
},
|
|
3341
|
+
{
|
|
3342
|
+
name: "dexMetadata";
|
|
3343
|
+
type: {
|
|
3344
|
+
kind: "struct";
|
|
3345
|
+
fields: [
|
|
3346
|
+
{
|
|
3347
|
+
name: "dexId";
|
|
3348
|
+
type: "u16";
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
name: "lookupTable";
|
|
3352
|
+
type: "pubkey";
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
name: "reserved";
|
|
3356
|
+
type: {
|
|
3357
|
+
array: ["u8", 32];
|
|
3358
|
+
};
|
|
3359
|
+
}
|
|
3360
|
+
];
|
|
3361
|
+
};
|
|
3362
|
+
},
|
|
3220
3363
|
{
|
|
3221
3364
|
name: "dexPosition";
|
|
3222
3365
|
docs: [
|
|
@@ -3562,6 +3705,22 @@ type Dex = {
|
|
|
3562
3705
|
];
|
|
3563
3706
|
};
|
|
3564
3707
|
},
|
|
3708
|
+
{
|
|
3709
|
+
name: "logInitDexMetadata";
|
|
3710
|
+
type: {
|
|
3711
|
+
kind: "struct";
|
|
3712
|
+
fields: [
|
|
3713
|
+
{
|
|
3714
|
+
name: "dexId";
|
|
3715
|
+
type: "u16";
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
name: "lookupTable";
|
|
3719
|
+
type: "pubkey";
|
|
3720
|
+
}
|
|
3721
|
+
];
|
|
3722
|
+
};
|
|
3723
|
+
},
|
|
3565
3724
|
{
|
|
3566
3725
|
name: "logInitDexPriceParams";
|
|
3567
3726
|
type: {
|
|
@@ -3928,6 +4087,22 @@ type Dex = {
|
|
|
3928
4087
|
];
|
|
3929
4088
|
};
|
|
3930
4089
|
},
|
|
4090
|
+
{
|
|
4091
|
+
name: "logUpdateDexLookupTable";
|
|
4092
|
+
type: {
|
|
4093
|
+
kind: "struct";
|
|
4094
|
+
fields: [
|
|
4095
|
+
{
|
|
4096
|
+
name: "dexId";
|
|
4097
|
+
type: "u16";
|
|
4098
|
+
},
|
|
4099
|
+
{
|
|
4100
|
+
name: "lookupTable";
|
|
4101
|
+
type: "pubkey";
|
|
4102
|
+
}
|
|
4103
|
+
];
|
|
4104
|
+
};
|
|
4105
|
+
},
|
|
3931
4106
|
{
|
|
3932
4107
|
name: "logUpdateFeeAndRevenueCut";
|
|
3933
4108
|
type: {
|
|
@@ -4483,24 +4658,88 @@ type SwapInIxParams = {
|
|
|
4483
4658
|
amountIn: BN__default;
|
|
4484
4659
|
amountOutMin: BN__default;
|
|
4485
4660
|
recipient?: PublicKey;
|
|
4486
|
-
protocol?: PublicKey;
|
|
4487
|
-
centerPriceRemainingAccounts?: PublicKey[];
|
|
4488
4661
|
} & ConnectionParams;
|
|
4489
|
-
declare function
|
|
4662
|
+
declare function getSwapInIx(params: SwapInIxParams): Promise<{
|
|
4490
4663
|
ixs: _solana_web3_js.TransactionInstruction[];
|
|
4664
|
+
accounts: {
|
|
4665
|
+
signer: PublicKey;
|
|
4666
|
+
dex: PublicKey;
|
|
4667
|
+
userToken0Account: PublicKey;
|
|
4668
|
+
userToken1Account: PublicKey;
|
|
4669
|
+
recipient: PublicKey | undefined;
|
|
4670
|
+
recipientToken0Account: PublicKey;
|
|
4671
|
+
recipientToken1Account: PublicKey;
|
|
4672
|
+
token0: PublicKey;
|
|
4673
|
+
token1: PublicKey;
|
|
4674
|
+
token0Reserve: PublicKey;
|
|
4675
|
+
token1Reserve: PublicKey;
|
|
4676
|
+
token0RateModel: PublicKey;
|
|
4677
|
+
token1RateModel: PublicKey;
|
|
4678
|
+
token0Vault: PublicKey;
|
|
4679
|
+
token1Vault: PublicKey;
|
|
4680
|
+
dexSupplyPositionToken0: PublicKey;
|
|
4681
|
+
dexSupplyPositionToken1: PublicKey;
|
|
4682
|
+
dexBorrowPositionToken0: PublicKey;
|
|
4683
|
+
dexBorrowPositionToken1: PublicKey;
|
|
4684
|
+
liquidity: PublicKey;
|
|
4685
|
+
liquidityProgram: PublicKey;
|
|
4686
|
+
token0Program: PublicKey;
|
|
4687
|
+
token1Program: PublicKey;
|
|
4688
|
+
oracleProgram: PublicKey;
|
|
4689
|
+
associatedTokenProgram: PublicKey;
|
|
4690
|
+
};
|
|
4691
|
+
remainingAccounts: {
|
|
4692
|
+
pubkey: PublicKey;
|
|
4693
|
+
isWritable: boolean;
|
|
4694
|
+
isSigner: boolean;
|
|
4695
|
+
}[];
|
|
4696
|
+
addressLookupTableAddresses: PublicKey[];
|
|
4697
|
+
addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
|
|
4491
4698
|
}>;
|
|
4492
4699
|
type SwapOutIxParams = {
|
|
4493
4700
|
dexId: number;
|
|
4494
4701
|
swap0to1: boolean;
|
|
4495
|
-
|
|
4702
|
+
amountOut: BN__default;
|
|
4496
4703
|
amountInMax: BN__default;
|
|
4497
4704
|
recipient?: PublicKey;
|
|
4498
|
-
protocol?: PublicKey;
|
|
4499
|
-
centerPriceRemainingAccounts?: PublicKey[];
|
|
4500
4705
|
} & ConnectionParams;
|
|
4501
|
-
declare function
|
|
4706
|
+
declare function getSwapOutIx(params: SwapOutIxParams): Promise<{
|
|
4502
4707
|
ixs: _solana_web3_js.TransactionInstruction[];
|
|
4708
|
+
accounts: {
|
|
4709
|
+
signer: PublicKey;
|
|
4710
|
+
dex: PublicKey;
|
|
4711
|
+
userToken0Account: PublicKey;
|
|
4712
|
+
userToken1Account: PublicKey;
|
|
4713
|
+
recipient: PublicKey | undefined;
|
|
4714
|
+
recipientToken0Account: PublicKey;
|
|
4715
|
+
recipientToken1Account: PublicKey;
|
|
4716
|
+
token0: PublicKey;
|
|
4717
|
+
token1: PublicKey;
|
|
4718
|
+
token0Reserve: PublicKey;
|
|
4719
|
+
token1Reserve: PublicKey;
|
|
4720
|
+
token0RateModel: PublicKey;
|
|
4721
|
+
token1RateModel: PublicKey;
|
|
4722
|
+
token0Vault: PublicKey;
|
|
4723
|
+
token1Vault: PublicKey;
|
|
4724
|
+
dexSupplyPositionToken0: PublicKey;
|
|
4725
|
+
dexSupplyPositionToken1: PublicKey;
|
|
4726
|
+
dexBorrowPositionToken0: PublicKey;
|
|
4727
|
+
dexBorrowPositionToken1: PublicKey;
|
|
4728
|
+
liquidity: PublicKey;
|
|
4729
|
+
liquidityProgram: PublicKey;
|
|
4730
|
+
token0Program: PublicKey;
|
|
4731
|
+
token1Program: PublicKey;
|
|
4732
|
+
oracleProgram: PublicKey;
|
|
4733
|
+
associatedTokenProgram: PublicKey;
|
|
4734
|
+
};
|
|
4735
|
+
remainingAccounts: {
|
|
4736
|
+
pubkey: PublicKey;
|
|
4737
|
+
isWritable: boolean;
|
|
4738
|
+
isSigner: boolean;
|
|
4739
|
+
}[];
|
|
4740
|
+
addressLookupTableAddresses: PublicKey[];
|
|
4741
|
+
addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
|
|
4503
4742
|
}>;
|
|
4504
4743
|
|
|
4505
|
-
export { getDexProgram,
|
|
4744
|
+
export { getDexProgram, getSwapInIx, getSwapOutIx };
|
|
4506
4745
|
export type { ConnectionParams, SwapInIxParams, SwapOutIxParams };
|
package/dist/dex/index.d.ts
CHANGED
|
@@ -530,6 +530,23 @@ type Dex = {
|
|
|
530
530
|
];
|
|
531
531
|
};
|
|
532
532
|
},
|
|
533
|
+
{
|
|
534
|
+
name: "dexMetadata";
|
|
535
|
+
writable: true;
|
|
536
|
+
pda: {
|
|
537
|
+
seeds: [
|
|
538
|
+
{
|
|
539
|
+
kind: "const";
|
|
540
|
+
value: [100, 101, 120, 95, 109, 101, 116, 97, 100, 97, 116, 97];
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
kind: "account";
|
|
544
|
+
path: "dex_admin.next_dex_id";
|
|
545
|
+
account: "dexAdmin";
|
|
546
|
+
}
|
|
547
|
+
];
|
|
548
|
+
};
|
|
549
|
+
},
|
|
533
550
|
{
|
|
534
551
|
name: "token0";
|
|
535
552
|
},
|
|
@@ -589,6 +606,65 @@ type Dex = {
|
|
|
589
606
|
}
|
|
590
607
|
];
|
|
591
608
|
},
|
|
609
|
+
{
|
|
610
|
+
name: "initDexMetadata";
|
|
611
|
+
discriminator: [114, 167, 144, 220, 143, 73, 224, 8];
|
|
612
|
+
accounts: [
|
|
613
|
+
{
|
|
614
|
+
name: "authority";
|
|
615
|
+
writable: true;
|
|
616
|
+
signer: true;
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
name: "dexAdmin";
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
name: "dex";
|
|
623
|
+
pda: {
|
|
624
|
+
seeds: [
|
|
625
|
+
{
|
|
626
|
+
kind: "const";
|
|
627
|
+
value: [100, 101, 120];
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
kind: "arg";
|
|
631
|
+
path: "dexId";
|
|
632
|
+
}
|
|
633
|
+
];
|
|
634
|
+
};
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
name: "dexMetadata";
|
|
638
|
+
writable: true;
|
|
639
|
+
pda: {
|
|
640
|
+
seeds: [
|
|
641
|
+
{
|
|
642
|
+
kind: "const";
|
|
643
|
+
value: [100, 101, 120, 95, 109, 101, 116, 97, 100, 97, 116, 97];
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
kind: "arg";
|
|
647
|
+
path: "dexId";
|
|
648
|
+
}
|
|
649
|
+
];
|
|
650
|
+
};
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
name: "systemProgram";
|
|
654
|
+
address: "11111111111111111111111111111111";
|
|
655
|
+
}
|
|
656
|
+
];
|
|
657
|
+
args: [
|
|
658
|
+
{
|
|
659
|
+
name: "dexId";
|
|
660
|
+
type: "u16";
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
name: "lookupTable";
|
|
664
|
+
type: "pubkey";
|
|
665
|
+
}
|
|
666
|
+
];
|
|
667
|
+
},
|
|
592
668
|
{
|
|
593
669
|
name: "initPosition";
|
|
594
670
|
discriminator: [197, 20, 10, 1, 97, 160, 177, 91];
|
|
@@ -1756,6 +1832,34 @@ type Dex = {
|
|
|
1756
1832
|
}
|
|
1757
1833
|
];
|
|
1758
1834
|
},
|
|
1835
|
+
{
|
|
1836
|
+
name: "updateDexLookupTable";
|
|
1837
|
+
discriminator: [87, 149, 96, 95, 24, 20, 211, 43];
|
|
1838
|
+
accounts: [
|
|
1839
|
+
{
|
|
1840
|
+
name: "authority";
|
|
1841
|
+
signer: true;
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
name: "dexAdmin";
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
name: "dexMetadata";
|
|
1848
|
+
docs: ["@dev Verification inside instruction logic"];
|
|
1849
|
+
writable: true;
|
|
1850
|
+
}
|
|
1851
|
+
];
|
|
1852
|
+
args: [
|
|
1853
|
+
{
|
|
1854
|
+
name: "dexId";
|
|
1855
|
+
type: "u16";
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
name: "lookupTable";
|
|
1859
|
+
type: "pubkey";
|
|
1860
|
+
}
|
|
1861
|
+
];
|
|
1862
|
+
},
|
|
1759
1863
|
{
|
|
1760
1864
|
name: "updateFeeAndRevenueCut";
|
|
1761
1865
|
discriminator: [223, 251, 181, 7, 34, 61, 183, 122];
|
|
@@ -2380,6 +2484,10 @@ type Dex = {
|
|
|
2380
2484
|
name: "dexAdmin";
|
|
2381
2485
|
discriminator: [82, 155, 122, 221, 230, 96, 118, 155];
|
|
2382
2486
|
},
|
|
2487
|
+
{
|
|
2488
|
+
name: "dexMetadata";
|
|
2489
|
+
discriminator: [177, 231, 57, 253, 64, 12, 205, 37];
|
|
2490
|
+
},
|
|
2383
2491
|
{
|
|
2384
2492
|
name: "dexPosition";
|
|
2385
2493
|
discriminator: [30, 36, 219, 78, 189, 173, 170, 47];
|
|
@@ -2422,6 +2530,10 @@ type Dex = {
|
|
|
2422
2530
|
name: "logInitDex";
|
|
2423
2531
|
discriminator: [170, 65, 241, 125, 34, 194, 79, 132];
|
|
2424
2532
|
},
|
|
2533
|
+
{
|
|
2534
|
+
name: "logInitDexMetadata";
|
|
2535
|
+
discriminator: [53, 61, 248, 111, 245, 219, 167, 73];
|
|
2536
|
+
},
|
|
2425
2537
|
{
|
|
2426
2538
|
name: "logInitDexPriceParams";
|
|
2427
2539
|
discriminator: [154, 98, 101, 72, 8, 203, 37, 200];
|
|
@@ -2490,6 +2602,10 @@ type Dex = {
|
|
|
2490
2602
|
name: "logUpdateCenterPriceLimits";
|
|
2491
2603
|
discriminator: [111, 228, 61, 31, 234, 76, 5, 17];
|
|
2492
2604
|
},
|
|
2605
|
+
{
|
|
2606
|
+
name: "logUpdateDexLookupTable";
|
|
2607
|
+
discriminator: [135, 31, 232, 96, 2, 64, 116, 229];
|
|
2608
|
+
},
|
|
2493
2609
|
{
|
|
2494
2610
|
name: "logUpdateFeeAndRevenueCut";
|
|
2495
2611
|
discriminator: [187, 9, 16, 229, 8, 231, 7, 171];
|
|
@@ -2954,6 +3070,11 @@ type Dex = {
|
|
|
2954
3070
|
code: 6082;
|
|
2955
3071
|
name: "dexSwapOutResult";
|
|
2956
3072
|
msg: "dexSwapOutResult";
|
|
3073
|
+
},
|
|
3074
|
+
{
|
|
3075
|
+
code: 6083;
|
|
3076
|
+
name: "dexAdminDexIdMismatch";
|
|
3077
|
+
msg: "dexAdminDexIdMismatch";
|
|
2957
3078
|
}
|
|
2958
3079
|
];
|
|
2959
3080
|
types: [
|
|
@@ -3217,6 +3338,28 @@ type Dex = {
|
|
|
3217
3338
|
];
|
|
3218
3339
|
};
|
|
3219
3340
|
},
|
|
3341
|
+
{
|
|
3342
|
+
name: "dexMetadata";
|
|
3343
|
+
type: {
|
|
3344
|
+
kind: "struct";
|
|
3345
|
+
fields: [
|
|
3346
|
+
{
|
|
3347
|
+
name: "dexId";
|
|
3348
|
+
type: "u16";
|
|
3349
|
+
},
|
|
3350
|
+
{
|
|
3351
|
+
name: "lookupTable";
|
|
3352
|
+
type: "pubkey";
|
|
3353
|
+
},
|
|
3354
|
+
{
|
|
3355
|
+
name: "reserved";
|
|
3356
|
+
type: {
|
|
3357
|
+
array: ["u8", 32];
|
|
3358
|
+
};
|
|
3359
|
+
}
|
|
3360
|
+
];
|
|
3361
|
+
};
|
|
3362
|
+
},
|
|
3220
3363
|
{
|
|
3221
3364
|
name: "dexPosition";
|
|
3222
3365
|
docs: [
|
|
@@ -3562,6 +3705,22 @@ type Dex = {
|
|
|
3562
3705
|
];
|
|
3563
3706
|
};
|
|
3564
3707
|
},
|
|
3708
|
+
{
|
|
3709
|
+
name: "logInitDexMetadata";
|
|
3710
|
+
type: {
|
|
3711
|
+
kind: "struct";
|
|
3712
|
+
fields: [
|
|
3713
|
+
{
|
|
3714
|
+
name: "dexId";
|
|
3715
|
+
type: "u16";
|
|
3716
|
+
},
|
|
3717
|
+
{
|
|
3718
|
+
name: "lookupTable";
|
|
3719
|
+
type: "pubkey";
|
|
3720
|
+
}
|
|
3721
|
+
];
|
|
3722
|
+
};
|
|
3723
|
+
},
|
|
3565
3724
|
{
|
|
3566
3725
|
name: "logInitDexPriceParams";
|
|
3567
3726
|
type: {
|
|
@@ -3928,6 +4087,22 @@ type Dex = {
|
|
|
3928
4087
|
];
|
|
3929
4088
|
};
|
|
3930
4089
|
},
|
|
4090
|
+
{
|
|
4091
|
+
name: "logUpdateDexLookupTable";
|
|
4092
|
+
type: {
|
|
4093
|
+
kind: "struct";
|
|
4094
|
+
fields: [
|
|
4095
|
+
{
|
|
4096
|
+
name: "dexId";
|
|
4097
|
+
type: "u16";
|
|
4098
|
+
},
|
|
4099
|
+
{
|
|
4100
|
+
name: "lookupTable";
|
|
4101
|
+
type: "pubkey";
|
|
4102
|
+
}
|
|
4103
|
+
];
|
|
4104
|
+
};
|
|
4105
|
+
},
|
|
3931
4106
|
{
|
|
3932
4107
|
name: "logUpdateFeeAndRevenueCut";
|
|
3933
4108
|
type: {
|
|
@@ -4483,24 +4658,88 @@ type SwapInIxParams = {
|
|
|
4483
4658
|
amountIn: BN__default;
|
|
4484
4659
|
amountOutMin: BN__default;
|
|
4485
4660
|
recipient?: PublicKey;
|
|
4486
|
-
protocol?: PublicKey;
|
|
4487
|
-
centerPriceRemainingAccounts?: PublicKey[];
|
|
4488
4661
|
} & ConnectionParams;
|
|
4489
|
-
declare function
|
|
4662
|
+
declare function getSwapInIx(params: SwapInIxParams): Promise<{
|
|
4490
4663
|
ixs: _solana_web3_js.TransactionInstruction[];
|
|
4664
|
+
accounts: {
|
|
4665
|
+
signer: PublicKey;
|
|
4666
|
+
dex: PublicKey;
|
|
4667
|
+
userToken0Account: PublicKey;
|
|
4668
|
+
userToken1Account: PublicKey;
|
|
4669
|
+
recipient: PublicKey | undefined;
|
|
4670
|
+
recipientToken0Account: PublicKey;
|
|
4671
|
+
recipientToken1Account: PublicKey;
|
|
4672
|
+
token0: PublicKey;
|
|
4673
|
+
token1: PublicKey;
|
|
4674
|
+
token0Reserve: PublicKey;
|
|
4675
|
+
token1Reserve: PublicKey;
|
|
4676
|
+
token0RateModel: PublicKey;
|
|
4677
|
+
token1RateModel: PublicKey;
|
|
4678
|
+
token0Vault: PublicKey;
|
|
4679
|
+
token1Vault: PublicKey;
|
|
4680
|
+
dexSupplyPositionToken0: PublicKey;
|
|
4681
|
+
dexSupplyPositionToken1: PublicKey;
|
|
4682
|
+
dexBorrowPositionToken0: PublicKey;
|
|
4683
|
+
dexBorrowPositionToken1: PublicKey;
|
|
4684
|
+
liquidity: PublicKey;
|
|
4685
|
+
liquidityProgram: PublicKey;
|
|
4686
|
+
token0Program: PublicKey;
|
|
4687
|
+
token1Program: PublicKey;
|
|
4688
|
+
oracleProgram: PublicKey;
|
|
4689
|
+
associatedTokenProgram: PublicKey;
|
|
4690
|
+
};
|
|
4691
|
+
remainingAccounts: {
|
|
4692
|
+
pubkey: PublicKey;
|
|
4693
|
+
isWritable: boolean;
|
|
4694
|
+
isSigner: boolean;
|
|
4695
|
+
}[];
|
|
4696
|
+
addressLookupTableAddresses: PublicKey[];
|
|
4697
|
+
addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
|
|
4491
4698
|
}>;
|
|
4492
4699
|
type SwapOutIxParams = {
|
|
4493
4700
|
dexId: number;
|
|
4494
4701
|
swap0to1: boolean;
|
|
4495
|
-
|
|
4702
|
+
amountOut: BN__default;
|
|
4496
4703
|
amountInMax: BN__default;
|
|
4497
4704
|
recipient?: PublicKey;
|
|
4498
|
-
protocol?: PublicKey;
|
|
4499
|
-
centerPriceRemainingAccounts?: PublicKey[];
|
|
4500
4705
|
} & ConnectionParams;
|
|
4501
|
-
declare function
|
|
4706
|
+
declare function getSwapOutIx(params: SwapOutIxParams): Promise<{
|
|
4502
4707
|
ixs: _solana_web3_js.TransactionInstruction[];
|
|
4708
|
+
accounts: {
|
|
4709
|
+
signer: PublicKey;
|
|
4710
|
+
dex: PublicKey;
|
|
4711
|
+
userToken0Account: PublicKey;
|
|
4712
|
+
userToken1Account: PublicKey;
|
|
4713
|
+
recipient: PublicKey | undefined;
|
|
4714
|
+
recipientToken0Account: PublicKey;
|
|
4715
|
+
recipientToken1Account: PublicKey;
|
|
4716
|
+
token0: PublicKey;
|
|
4717
|
+
token1: PublicKey;
|
|
4718
|
+
token0Reserve: PublicKey;
|
|
4719
|
+
token1Reserve: PublicKey;
|
|
4720
|
+
token0RateModel: PublicKey;
|
|
4721
|
+
token1RateModel: PublicKey;
|
|
4722
|
+
token0Vault: PublicKey;
|
|
4723
|
+
token1Vault: PublicKey;
|
|
4724
|
+
dexSupplyPositionToken0: PublicKey;
|
|
4725
|
+
dexSupplyPositionToken1: PublicKey;
|
|
4726
|
+
dexBorrowPositionToken0: PublicKey;
|
|
4727
|
+
dexBorrowPositionToken1: PublicKey;
|
|
4728
|
+
liquidity: PublicKey;
|
|
4729
|
+
liquidityProgram: PublicKey;
|
|
4730
|
+
token0Program: PublicKey;
|
|
4731
|
+
token1Program: PublicKey;
|
|
4732
|
+
oracleProgram: PublicKey;
|
|
4733
|
+
associatedTokenProgram: PublicKey;
|
|
4734
|
+
};
|
|
4735
|
+
remainingAccounts: {
|
|
4736
|
+
pubkey: PublicKey;
|
|
4737
|
+
isWritable: boolean;
|
|
4738
|
+
isSigner: boolean;
|
|
4739
|
+
}[];
|
|
4740
|
+
addressLookupTableAddresses: PublicKey[];
|
|
4741
|
+
addressLookupTableAccounts: _solana_web3_js.AddressLookupTableAccount[];
|
|
4503
4742
|
}>;
|
|
4504
4743
|
|
|
4505
|
-
export { getDexProgram,
|
|
4744
|
+
export { getDexProgram, getSwapInIx, getSwapOutIx };
|
|
4506
4745
|
export type { ConnectionParams, SwapInIxParams, SwapOutIxParams };
|