Skip to content

Commit e8b08a8

Browse files
committed
v15.3.2: export LAYOUTS for solana exchanges
1 parent f37174c commit e8b08a8

File tree

12 files changed

+91
-3
lines changed

12 files changed

+91
-3
lines changed

dist/esm/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1620,6 +1620,11 @@ const TICK_ARRAY_LAYOUT$1 = struct([
16201620
publicKey("whirlpool"),
16211621
]);
16221622

1623+
var LAYOUTS$1 = {
1624+
TICK_ARRAY_LAYOUT: TICK_ARRAY_LAYOUT$1,
1625+
WHIRLPOOL_LAYOUT,
1626+
};
1627+
16231628
const MAX_SWAP_TICK_ARRAYS = 3;
16241629
const MAX_TICK_INDEX = 443636; // i32
16251630
const MIN_TICK_INDEX = -443636; // i32
@@ -2589,6 +2594,7 @@ var orca = (scope)=>{
25892594
getPrep: (args)=>{},
25902595
getTransaction: (args)=>Orca.getTransaction({ ...args, exchange: exchange$i }),
25912596
getPrice,
2597+
LAYOUTS: LAYOUTS$1,
25922598
})
25932599
)
25942600
};
@@ -2730,6 +2736,15 @@ const TICK_ARRAY_BITMAP_EXTENSION_LAYOUT = struct([
27302736
seq(seq(u64$1(), 8), EXTENSION_TICKARRAY_BITMAP_SIZE, "negativeTickArrayBitmap"),
27312737
]);
27322738

2739+
var LAYOUTS = {
2740+
CPMM_LAYOUT,
2741+
CPMM_CONFIG_LAYOUT,
2742+
CLMM_LAYOUT,
2743+
CLMM_CONFIG_LAYOUT,
2744+
TICK_ARRAY_LAYOUT,
2745+
TICK_ARRAY_BITMAP_EXTENSION_LAYOUT,
2746+
};
2747+
27332748
function BNDivCeil(bn1, bn2) {
27342749
const { div, mod } = bn1.divmod(bn2);
27352750

@@ -5285,6 +5300,7 @@ var raydium_cp = (scope)=>{
52855300
getPrep: (args)=>{},
52865301
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$h }),
52875302
CurveCalculator,
5303+
LAYOUTS,
52885304
})
52895305
)
52905306
};
@@ -5322,6 +5338,7 @@ var raydium_cl = (scope)=>{
53225338
getPrep: (args)=>{},
53235339
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$g }),
53245340
SwapMath,
5341+
LAYOUTS,
53255342
})
53265343
)
53275344
};

dist/esm/index.svm.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3810,6 +3810,11 @@ const TICK_ARRAY_LAYOUT$1 = struct([
38103810
publicKey("whirlpool"),
38113811
]);
38123812

3813+
var LAYOUTS$1 = {
3814+
TICK_ARRAY_LAYOUT: TICK_ARRAY_LAYOUT$1,
3815+
WHIRLPOOL_LAYOUT,
3816+
};
3817+
38133818
const MAX_SWAP_TICK_ARRAYS = 3;
38143819
const MAX_TICK_INDEX = 443636; // i32
38153820
const MIN_TICK_INDEX = -443636; // i32
@@ -4779,6 +4784,7 @@ var orca = (scope)=>{
47794784
getPrep: (args)=>{},
47804785
getTransaction: (args)=>Orca.getTransaction({ ...args, exchange: exchange$i }),
47814786
getPrice,
4787+
LAYOUTS: LAYOUTS$1,
47824788
})
47834789
)
47844790
};
@@ -4920,6 +4926,15 @@ const TICK_ARRAY_BITMAP_EXTENSION_LAYOUT = struct([
49204926
seq(seq(u64$1(), 8), EXTENSION_TICKARRAY_BITMAP_SIZE, "negativeTickArrayBitmap"),
49214927
]);
49224928

4929+
var LAYOUTS = {
4930+
CPMM_LAYOUT,
4931+
CPMM_CONFIG_LAYOUT,
4932+
CLMM_LAYOUT,
4933+
CLMM_CONFIG_LAYOUT,
4934+
TICK_ARRAY_LAYOUT,
4935+
TICK_ARRAY_BITMAP_EXTENSION_LAYOUT,
4936+
};
4937+
49234938
function BNDivCeil(bn1, bn2) {
49244939
const { div, mod } = bn1.divmod(bn2);
49254940

@@ -7475,6 +7490,7 @@ var raydium_cp = (scope)=>{
74757490
getPrep: (args)=>{},
74767491
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$h }),
74777492
CurveCalculator,
7493+
LAYOUTS,
74787494
})
74797495
)
74807496
};
@@ -7512,6 +7528,7 @@ var raydium_cl = (scope)=>{
75127528
getPrep: (args)=>{},
75137529
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$g }),
75147530
SwapMath,
7531+
LAYOUTS,
75157532
})
75167533
)
75177534
};

dist/umd/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,11 @@
16251625
solanaWeb3_js.publicKey("whirlpool"),
16261626
]);
16271627

1628+
var LAYOUTS$1 = {
1629+
TICK_ARRAY_LAYOUT: TICK_ARRAY_LAYOUT$1,
1630+
WHIRLPOOL_LAYOUT,
1631+
};
1632+
16281633
const MAX_SWAP_TICK_ARRAYS = 3;
16291634
const MAX_TICK_INDEX = 443636; // i32
16301635
const MIN_TICK_INDEX = -443636; // i32
@@ -2594,6 +2599,7 @@
25942599
getPrep: (args)=>{},
25952600
getTransaction: (args)=>Orca.getTransaction({ ...args, exchange: exchange$i }),
25962601
getPrice,
2602+
LAYOUTS: LAYOUTS$1,
25972603
})
25982604
)
25992605
};
@@ -2735,6 +2741,15 @@
27352741
solanaWeb3_js.seq(solanaWeb3_js.seq(solanaWeb3_js.u64(), 8), EXTENSION_TICKARRAY_BITMAP_SIZE, "negativeTickArrayBitmap"),
27362742
]);
27372743

2744+
var LAYOUTS = {
2745+
CPMM_LAYOUT,
2746+
CPMM_CONFIG_LAYOUT,
2747+
CLMM_LAYOUT,
2748+
CLMM_CONFIG_LAYOUT,
2749+
TICK_ARRAY_LAYOUT,
2750+
TICK_ARRAY_BITMAP_EXTENSION_LAYOUT,
2751+
};
2752+
27382753
function BNDivCeil(bn1, bn2) {
27392754
const { div, mod } = bn1.divmod(bn2);
27402755

@@ -5290,6 +5305,7 @@
52905305
getPrep: (args)=>{},
52915306
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$h }),
52925307
CurveCalculator,
5308+
LAYOUTS,
52935309
})
52945310
)
52955311
};
@@ -5327,6 +5343,7 @@
53275343
getPrep: (args)=>{},
53285344
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$g }),
53295345
SwapMath,
5346+
LAYOUTS,
53305347
})
53315348
)
53325349
};

dist/umd/index.svm.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,11 @@
38163816
solanaWeb3_js.publicKey("whirlpool"),
38173817
]);
38183818

3819+
var LAYOUTS$1 = {
3820+
TICK_ARRAY_LAYOUT: TICK_ARRAY_LAYOUT$1,
3821+
WHIRLPOOL_LAYOUT,
3822+
};
3823+
38193824
const MAX_SWAP_TICK_ARRAYS = 3;
38203825
const MAX_TICK_INDEX = 443636; // i32
38213826
const MIN_TICK_INDEX = -443636; // i32
@@ -4785,6 +4790,7 @@
47854790
getPrep: (args)=>{},
47864791
getTransaction: (args)=>Orca.getTransaction({ ...args, exchange: exchange$i }),
47874792
getPrice,
4793+
LAYOUTS: LAYOUTS$1,
47884794
})
47894795
)
47904796
};
@@ -4926,6 +4932,15 @@
49264932
solanaWeb3_js.seq(solanaWeb3_js.seq(solanaWeb3_js.u64(), 8), EXTENSION_TICKARRAY_BITMAP_SIZE, "negativeTickArrayBitmap"),
49274933
]);
49284934

4935+
var LAYOUTS = {
4936+
CPMM_LAYOUT,
4937+
CPMM_CONFIG_LAYOUT,
4938+
CLMM_LAYOUT,
4939+
CLMM_CONFIG_LAYOUT,
4940+
TICK_ARRAY_LAYOUT,
4941+
TICK_ARRAY_BITMAP_EXTENSION_LAYOUT,
4942+
};
4943+
49294944
function BNDivCeil(bn1, bn2) {
49304945
const { div, mod } = bn1.divmod(bn2);
49314946

@@ -7481,6 +7496,7 @@
74817496
getPrep: (args)=>{},
74827497
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$h }),
74837498
CurveCalculator,
7499+
LAYOUTS,
74847500
})
74857501
)
74867502
};
@@ -7518,6 +7534,7 @@
75187534
getPrep: (args)=>{},
75197535
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange: exchange$g }),
75207536
SwapMath,
7537+
LAYOUTS,
75217538
})
75227539
)
75237540
};

package.evm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges-evm",
33
"moduleName": "Web3Exchanges",
4-
"version": "15.3.1",
4+
"version": "15.3.2",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.evm.js",
77
"module": "dist/esm/index.evm.js",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges",
33
"moduleName": "Web3Exchanges",
4-
"version": "15.3.1",
4+
"version": "15.3.2",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.js",
77
"module": "dist/esm/index.js",

package.svm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@depay/web3-exchanges-svm",
33
"moduleName": "Web3Exchanges",
4-
"version": "15.3.1",
4+
"version": "15.3.2",
55
"description": "JavaScript library simplifying decentralized web3 exchange routing for multiple blockchains and exchanges.",
66
"main": "dist/umd/index.svm.js",
77
"module": "dist/esm/index.svm.js",

src/exchanges/orca.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Exchange from '../classes/Exchange'
22
import Orca from '../platforms/solana/orca'
33
import { getPrice } from '../platforms/solana/orca/price'
4+
import LAYOUTS from '../platforms/solana/orca/layouts'
45

56
const exchange = {
67

@@ -34,6 +35,7 @@ export default (scope)=>{
3435
getPrep: (args)=>{},
3536
getTransaction: (args)=>Orca.getTransaction({ ...args, exchange }),
3637
getPrice,
38+
LAYOUTS,
3739
})
3840
)
3941
}

src/exchanges/raydium_cl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Exchange from '../classes/Exchange'
22
import Raydium from '../platforms/solana/raydium'
33
import { SwapMath } from '../platforms/solana/raydium/clmm/pairs'
4+
import LAYOUTS from '../platforms/solana/raydium/layouts'
45

56
const exchange = {
67

@@ -35,6 +36,7 @@ export default (scope)=>{
3536
getPrep: (args)=>{},
3637
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange }),
3738
SwapMath,
39+
LAYOUTS,
3840
})
3941
)
4042
}

src/exchanges/raydium_cp.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Exchange from '../classes/Exchange'
22
import Raydium from '../platforms/solana/raydium'
33
import { CurveCalculator } from '../platforms/solana/raydium/cpmm/price'
4+
import LAYOUTS from '../platforms/solana/raydium/layouts'
45

56
const exchange = {
67

@@ -35,6 +36,7 @@ export default (scope)=>{
3536
getPrep: (args)=>{},
3637
getTransaction: (args)=>Raydium.getTransaction({ ...args, exchange }),
3738
CurveCalculator,
39+
LAYOUTS,
3840
})
3941
)
4042
}

0 commit comments

Comments
 (0)