@kasarlabs/vesu-mcp 0.1.2 → 0.1.4
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/build/index.js +86 -6
- package/build/index.js.map +1 -1
- package/build/interfaces/index.d.ts +661 -8
- package/build/interfaces/index.js +57 -1
- package/build/interfaces/index.js.map +1 -1
- package/build/lib/abis/ekuboCore.d.ts +92 -0
- package/build/lib/abis/ekuboCore.js +1341 -0
- package/build/lib/abis/ekuboCore.js.map +1 -0
- package/build/lib/abis/multiplyAbi.d.ts +245 -0
- package/build/lib/abis/multiplyAbi.js +341 -0
- package/build/lib/abis/multiplyAbi.js.map +1 -0
- package/build/lib/abis/poolAbi.d.ts +289 -0
- package/build/lib/abis/poolAbi.js +402 -0
- package/build/lib/abis/poolAbi.js.map +1 -0
- package/build/lib/abis/routerAbi.d.ts +88 -0
- package/build/lib/abis/routerAbi.js +86 -0
- package/build/lib/abis/routerAbi.js.map +1 -0
- package/build/lib/constants/index.d.ts +9 -3
- package/build/lib/constants/index.js +8 -3
- package/build/lib/constants/index.js.map +1 -1
- package/build/lib/utils/contracts.d.ts +535 -89
- package/build/lib/utils/contracts.js +39 -5
- package/build/lib/utils/contracts.js.map +1 -1
- package/build/lib/utils/ekubo.d.ts +55 -0
- package/build/lib/utils/ekubo.js +81 -0
- package/build/lib/utils/ekubo.js.map +1 -0
- package/build/lib/utils/getEkuboQuote.d.ts +4 -0
- package/build/lib/utils/getEkuboQuote.js +116 -0
- package/build/lib/utils/getEkuboQuote.js.map +1 -0
- package/build/lib/utils/math.d.ts +8 -0
- package/build/lib/utils/math.js +22 -0
- package/build/lib/utils/math.js.map +1 -0
- package/build/lib/utils/multiplyCalls.d.ts +10 -0
- package/build/lib/utils/multiplyCalls.js +248 -0
- package/build/lib/utils/multiplyCalls.js.map +1 -0
- package/build/lib/utils/pools.d.ts +8 -0
- package/build/lib/utils/pools.js +72 -0
- package/build/lib/utils/pools.js.map +1 -0
- package/build/lib/utils/tokens.d.ts +6 -0
- package/build/lib/utils/tokens.js +23 -0
- package/build/lib/utils/tokens.js.map +1 -0
- package/build/schemas/index.d.ts +176 -0
- package/build/schemas/index.js +201 -1
- package/build/schemas/index.js.map +1 -1
- package/build/tools/read/getPools.d.ts +3 -0
- package/build/tools/read/getPools.js +57 -0
- package/build/tools/read/getPools.js.map +1 -0
- package/build/tools/read/getPositions.d.ts +3 -0
- package/build/tools/read/getPositions.js +43 -0
- package/build/tools/read/getPositions.js.map +1 -0
- package/build/tools/read/getTokens.d.ts +3 -0
- package/build/tools/read/getTokens.js +50 -0
- package/build/tools/read/getTokens.js.map +1 -0
- package/build/tools/write/deposit_borrow.d.ts +10 -0
- package/build/tools/write/deposit_borrow.js +312 -0
- package/build/tools/write/deposit_borrow.js.map +1 -0
- package/build/tools/write/deposit_earn.d.ts +10 -0
- package/build/tools/write/deposit_earn.js +82 -0
- package/build/tools/write/deposit_earn.js.map +1 -0
- package/build/tools/write/deposit_multiply.d.ts +10 -0
- package/build/tools/write/deposit_multiply.js +140 -0
- package/build/tools/write/deposit_multiply.js.map +1 -0
- package/build/tools/write/repay_borrow.d.ts +10 -0
- package/build/tools/write/repay_borrow.js +358 -0
- package/build/tools/write/repay_borrow.js.map +1 -0
- package/build/tools/write/update_multiply.d.ts +10 -0
- package/build/tools/write/update_multiply.js +264 -0
- package/build/tools/write/update_multiply.js.map +1 -0
- package/build/tools/write/withdraw_earn.d.ts +10 -0
- package/build/tools/write/withdraw_earn.js +116 -0
- package/build/tools/write/withdraw_earn.js.map +1 -0
- package/build/tools/write/withdraw_multiply.d.ts +9 -0
- package/build/tools/write/withdraw_multiply.js +187 -0
- package/build/tools/write/withdraw_multiply.js.map +1 -0
- package/package.json +6 -5
- package/build/lib/abis/erc20Abi.d.ts +0 -89
- package/build/lib/abis/erc20Abi.js +0 -128
- package/build/lib/abis/erc20Abi.js.map +0 -1
- package/build/tools/depositService.d.ts +0 -19
- package/build/tools/depositService.js +0 -117
- package/build/tools/depositService.js.map +0 -1
- package/build/tools/withdrawService.d.ts +0 -20
- package/build/tools/withdrawService.js +0 -122
- package/build/tools/withdrawService.js.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export declare const routerAbi: readonly [{
|
|
2
|
+
readonly type: "struct";
|
|
3
|
+
readonly name: "ekubo::types::keys::PoolKey";
|
|
4
|
+
readonly members: readonly [{
|
|
5
|
+
readonly name: "token0";
|
|
6
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
7
|
+
}, {
|
|
8
|
+
readonly name: "token1";
|
|
9
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "fee";
|
|
12
|
+
readonly type: "core::integer::u128";
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "tick_spacing";
|
|
15
|
+
readonly type: "core::integer::u128";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "extension";
|
|
18
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
19
|
+
}];
|
|
20
|
+
}, {
|
|
21
|
+
readonly type: "struct";
|
|
22
|
+
readonly name: "ekubo::router::RouteNode";
|
|
23
|
+
readonly members: readonly [{
|
|
24
|
+
readonly name: "pool_key";
|
|
25
|
+
readonly type: "ekubo::types::keys::PoolKey";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "sqrt_ratio_limit";
|
|
28
|
+
readonly type: "core::integer::u256";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "skip_ahead";
|
|
31
|
+
readonly type: "core::integer::u128";
|
|
32
|
+
}];
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "struct";
|
|
35
|
+
readonly name: "ekubo::types::i129::i129";
|
|
36
|
+
readonly members: readonly [{
|
|
37
|
+
readonly name: "mag";
|
|
38
|
+
readonly type: "core::integer::u128";
|
|
39
|
+
}, {
|
|
40
|
+
readonly name: "sign";
|
|
41
|
+
readonly type: "core::bool";
|
|
42
|
+
}];
|
|
43
|
+
}, {
|
|
44
|
+
readonly type: "struct";
|
|
45
|
+
readonly name: "ekubo::router::TokenAmount";
|
|
46
|
+
readonly members: readonly [{
|
|
47
|
+
readonly name: "token";
|
|
48
|
+
readonly type: "core::starknet::contract_address::ContractAddress";
|
|
49
|
+
}, {
|
|
50
|
+
readonly name: "amount";
|
|
51
|
+
readonly type: "ekubo::types::i129::i129";
|
|
52
|
+
}];
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "struct";
|
|
55
|
+
readonly name: "ekubo::router::Swap";
|
|
56
|
+
readonly members: readonly [{
|
|
57
|
+
readonly name: "route";
|
|
58
|
+
readonly type: "core::array::Array::<ekubo::router::RouteNode>";
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "token_amount";
|
|
61
|
+
readonly type: "ekubo::router::TokenAmount";
|
|
62
|
+
}];
|
|
63
|
+
}, {
|
|
64
|
+
readonly type: "struct";
|
|
65
|
+
readonly name: "ekubo::types::delta::Delta";
|
|
66
|
+
readonly members: readonly [{
|
|
67
|
+
readonly name: "amount0";
|
|
68
|
+
readonly type: "ekubo::types::i129::i129";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "amount1";
|
|
71
|
+
readonly type: "ekubo::types::i129::i129";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "interface";
|
|
75
|
+
readonly name: "ekubo::router::IRouter";
|
|
76
|
+
readonly items: readonly [{
|
|
77
|
+
readonly type: "function";
|
|
78
|
+
readonly name: "quote_multi_multihop_swap";
|
|
79
|
+
readonly inputs: readonly [{
|
|
80
|
+
readonly name: "swaps";
|
|
81
|
+
readonly type: "core::array::Array::<ekubo::router::Swap>";
|
|
82
|
+
}];
|
|
83
|
+
readonly outputs: readonly [{
|
|
84
|
+
readonly type: "core::array::Array::<core::array::Array::<ekubo::types::delta::Delta>>";
|
|
85
|
+
}];
|
|
86
|
+
readonly state_mutability: "view";
|
|
87
|
+
}];
|
|
88
|
+
}];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
export const routerAbi = [
|
|
2
|
+
{
|
|
3
|
+
type: 'struct',
|
|
4
|
+
name: 'ekubo::types::keys::PoolKey',
|
|
5
|
+
members: [
|
|
6
|
+
{
|
|
7
|
+
name: 'token0',
|
|
8
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'token1',
|
|
12
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
13
|
+
},
|
|
14
|
+
{ name: 'fee', type: 'core::integer::u128' },
|
|
15
|
+
{ name: 'tick_spacing', type: 'core::integer::u128' },
|
|
16
|
+
{
|
|
17
|
+
name: 'extension',
|
|
18
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'struct',
|
|
24
|
+
name: 'ekubo::router::RouteNode',
|
|
25
|
+
members: [
|
|
26
|
+
{ name: 'pool_key', type: 'ekubo::types::keys::PoolKey' },
|
|
27
|
+
{ name: 'sqrt_ratio_limit', type: 'core::integer::u256' },
|
|
28
|
+
{ name: 'skip_ahead', type: 'core::integer::u128' },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'struct',
|
|
33
|
+
name: 'ekubo::types::i129::i129',
|
|
34
|
+
members: [
|
|
35
|
+
{ name: 'mag', type: 'core::integer::u128' },
|
|
36
|
+
{ name: 'sign', type: 'core::bool' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'struct',
|
|
41
|
+
name: 'ekubo::router::TokenAmount',
|
|
42
|
+
members: [
|
|
43
|
+
{
|
|
44
|
+
name: 'token',
|
|
45
|
+
type: 'core::starknet::contract_address::ContractAddress',
|
|
46
|
+
},
|
|
47
|
+
{ name: 'amount', type: 'ekubo::types::i129::i129' },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'struct',
|
|
52
|
+
name: 'ekubo::router::Swap',
|
|
53
|
+
members: [
|
|
54
|
+
{ name: 'route', type: 'core::array::Array::<ekubo::router::RouteNode>' },
|
|
55
|
+
{ name: 'token_amount', type: 'ekubo::router::TokenAmount' },
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'struct',
|
|
60
|
+
name: 'ekubo::types::delta::Delta',
|
|
61
|
+
members: [
|
|
62
|
+
{ name: 'amount0', type: 'ekubo::types::i129::i129' },
|
|
63
|
+
{ name: 'amount1', type: 'ekubo::types::i129::i129' },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'interface',
|
|
68
|
+
name: 'ekubo::router::IRouter',
|
|
69
|
+
items: [
|
|
70
|
+
{
|
|
71
|
+
type: 'function',
|
|
72
|
+
name: 'quote_multi_multihop_swap',
|
|
73
|
+
inputs: [
|
|
74
|
+
{ name: 'swaps', type: 'core::array::Array::<ekubo::router::Swap>' },
|
|
75
|
+
],
|
|
76
|
+
outputs: [
|
|
77
|
+
{
|
|
78
|
+
type: 'core::array::Array::<core::array::Array::<ekubo::types::delta::Delta>>',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
state_mutability: 'view',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
//# sourceMappingURL=routerAbi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routerAbi.js","sourceRoot":"","sources":["../../../src/lib/abis/routerAbi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,mDAAmD;aAC1D;YACD;gBACE,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,mDAAmD;aA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;YACrD,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,0BAA0B,EAAE;SACtD;KACF;IACD;QACE,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,wBAAwB;QAC9B,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,2BAA2B;gBACjC,MAAM,EAAE;oBACN,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,2CAA2C,EAAE;iBACrE;gBACD,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,wEAAwE;qBAC/E;iBACF;gBACD,gBAAgB,EAAE,MAAM;aACzB;SACF;KACF;CACO,CAAC"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { BigDecimal } from '../../interfaces/index.js';
|
|
2
|
-
|
|
2
|
+
import type { Address } from '../../interfaces/index.js';
|
|
3
|
+
export declare const GENESIS_POOLID = "0x0451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5";
|
|
3
4
|
export declare const VESU_API_URL = "https://staging.api.vesu.xyz";
|
|
4
5
|
export declare const DEFAULT_DECIMALS = 18;
|
|
5
|
-
export declare const SINGLETON_ADDRESS = "0x02545b2e5d519fc230e9cd781046d3a64e092114f07e44771e0d719d148725ef";
|
|
6
|
-
export declare const EXTENSION_ADDRESS = "0x7cf3881eb4a58e76b41a792fa151510e7057037d80eda334682bd3e73389ec0";
|
|
7
6
|
export declare const ZERO: BigDecimal;
|
|
7
|
+
export declare const MULTIPLY_CONTRACT_ADDRESS: Address;
|
|
8
|
+
export declare const EKUBO_CORE: Address;
|
|
9
|
+
export declare const EKUBO_ROUTER_ADDRESSES: {
|
|
10
|
+
readonly sepolia: "0x0045f933adf0607292468ad1c1dedaa74d5ad166392590e72676a34d01d7b763";
|
|
11
|
+
readonly mainnet: "0x0199741822c2dc722f6f605204f35e56dbc23bceed54818168c4c49e4fb8737e";
|
|
12
|
+
};
|
|
13
|
+
export declare const WAD = 1000000000000000000n;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
export const GENESIS_POOLID = '
|
|
1
|
+
export const GENESIS_POOLID = '0x0451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5';
|
|
2
2
|
export const VESU_API_URL = 'https://staging.api.vesu.xyz';
|
|
3
3
|
export const DEFAULT_DECIMALS = 18;
|
|
4
|
-
export const SINGLETON_ADDRESS = '0x02545b2e5d519fc230e9cd781046d3a64e092114f07e44771e0d719d148725ef';
|
|
5
|
-
export const EXTENSION_ADDRESS = '0x7cf3881eb4a58e76b41a792fa151510e7057037d80eda334682bd3e73389ec0';
|
|
6
4
|
export const ZERO = { value: 0n, decimals: 0 };
|
|
5
|
+
export const MULTIPLY_CONTRACT_ADDRESS = '0x7964760e90baa28841ec94714151e03fbc13321797e68a874e88f27c9d58513';
|
|
6
|
+
export const EKUBO_CORE = '0x00000005dd3D2F4429AF886cD1a3b08289DBcEa99A294197E9eB43b0e0325b4b';
|
|
7
|
+
export const EKUBO_ROUTER_ADDRESSES = {
|
|
8
|
+
sepolia: '0x0045f933adf0607292468ad1c1dedaa74d5ad166392590e72676a34d01d7b763',
|
|
9
|
+
mainnet: '0x0199741822c2dc722f6f605204f35e56dbc23bceed54818168c4c49e4fb8737e',
|
|
10
|
+
};
|
|
11
|
+
export const WAD = 1000000000000000000n;
|
|
7
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constants/index.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,cAAc,GACzB,oEAAoE,CAAC;AAEvE,MAAM,CAAC,MAAM,YAAY,GAAG,8BAA8B,CAAC;AAE3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC,MAAM,CAAC,MAAM,IAAI,GAAe,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAG3D,MAAM,CAAC,MAAM,yBAAyB,GACpC,mEAAmE,CAAC;AAEtE,MAAM,CAAC,MAAM,UAAU,GACrB,oEAAoE,CAAC;AAEvE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,oEAAoE;IAC7E,OAAO,EAAE,oEAAoE;CACrE,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG,oBAA0B,CAAC"}
|